Adding a digital signature box on Microsoft Dynamics 365 forms

Digital signature Microsoft Dynamics 365

We often hear the term “paperless” office and if you are an organisation that historically deals with a lot of physical documents you might be considering moving some of those forms to the cloud as part of a digital transformation project. Using Microsoft Dynamics 365 to create customised input forms with digital signatures can help you to move towards that goal.  There are a lot of scenarios where a customer signature is required, such as training documents, orders and customer approvals. Imagine that you are a visiting field engineer, you are on the customer site and you need customer approval. You just hand the customer your tablet and they sign right then and there to approve the work. Then within a couple of minutes, an email copy of the approval form (complete with signature) is sent back to the customer.

The Pen control in Microsoft Dynamics 365 allows us to create a box for a customer signature on a Microsoft Dynamics 365 form. The signature box can be displayed on a mobile device (it cannot be currently displayed on the web client) and can then be rendered onto a Word document if you need to send a copy to the customer. In the scenario above you could use a Dynamics Workflow to automate the email back to the customer.

Below are the steps to create a digital signature box and then render it onto a Word document.

Digital signature Microsoft Dynamics 365

Part One: Creating your signature field

Firstly, create a new field on your form. In my example, I have called the field new_signature.

Digital signature Microsoft Dynamics 365

The field needs to be;

  • A memo (Multiple lines of text) field
  • At least 15,000 characters

Next, navigate to the properties of the field and select the controls box

Field Properties

Click the “Add Control” link and select to add the pen control to your forms.

Tip: make sure you scroll down and tick the box “Hide Default Control” as this will hide the field on all the forms that don’t support this type of control (i.e. the web form)

Hide Default Control image

If you didn’t hide the field on the web form it would display as a bunch text that doesn’t mean anything to us ordinary folk who don’t speak geek (see below)

Base 64 encoded text

Now when you open the form on a mobile device you will see the signature box available and ready to use.

Once the signature is saved it becomes read only.

Digital signature Microsoft Dynamics 365

Part Two rendering the field onto a Microsoft Word template


Before we start it is important to take a quick look at how the signature is stored in Dynamics 365. If you take a look at the field on the web form you can see how the image is stored.

raw data

Notice the prefix ‘ data:image/png;base64, ‘ : this is what tells the mobile client that this is an image control. If we want to render this onto a Word template as a signature we will need to remove that prefix or the template will display an error and will refuse to open. You might decide to write some custom code to copy the text into a new field as it is written (minus the prefix) or you may find another way to do this. For the purposes of testing for this blog, you can just remove the prefix manually. Just remember, this means that you won’t be able to render the signature on the mobile form anymore.


Firstly click on Word Templates in the ribbon of your Dynamics 365 entity and select “Create Word Template”.

Choose “Select Entity” and download your template

Once you have downloaded your new template make sure you have turned on the developer tab, selected the XML mapping pane and selected the XML part beginning with “urn:Microsoft-crm…”

Expand the fields list and you will see your signature field


XML Mapping Pane

right-click on new_signature and select the “picture” option.

It will appear as below.

sig field in Word Template

Add any remaining fields as appropriate and upload the template back into CRM.

Now when you run the template you will see the signature appears as it did when it was created on the mobile device.

Digital signature Microsoft Dynamics 365

Hope that’s made it easy for you to understand how to create a signature mobile control and render it into a Word template.

Did you find this digital signature Microsoft Dynamics 365 information useful? Great, share and spread the knowledge.

Rocket CRM founders graphic

Kyle and Iain at Rocket CRM work with UK based companies to help them get the most out of their Microsoft Dynamics 365 investment.

Talk to us about improving your Dynamics 365 user experience.

About Iain Wicks

Iain has been working in the CRM industry since 1999 and has a wealth of experience of implementing CRM for small to medium sized business teams. Iain’s focus is on “Keeping it simple” and on user adoption.