The Notes feature in Microsoft Dynamics CRM is great for capturing notes on customer interactions or for adding quick details to an account record. The only drawback with Notes is that it only stores data in plain text and does not allow for the text to be formatted. In some use cases, users may want to highlight words or maybe format them to emphasize significance. With a few steps, you can format text in Notes, and today’s blog will show you exactly how! So let’s begin!
Below is a screenshot of how Notes appear in CRM out-of-the-box.
A quick way to capture and view formatted notes is by creating a custom notes control and storing the data in the notes entity itself. The first step is to create an HTML web resource that will contain a div element to capture the user formatted text input. A textarea cannot be used here as it does not allow the user to add formatting to the data. Please find the snippet for the same.
style=”width: 100%; height: 60px; overflow-y: scroll; font-size: small” contenteditable=”true” ></div>
The contenteditable is the property that allows you to enter data into a div and make its behaviour similar to a textarea.
The HTML will contain a div and an Add button as shown below.
When you click the Add button, a new note is created using the Rest/Soap endpoint. The note record will store the HTML content of the div in the NoteText field. Since we are storing the HTML content, the formatting is stored as well. The data can be formatted using the keyboard shortcuts (cntrl+I for italics, etc.). The formatted data can also be copied from a word document with the formatting being preserved.
That’s all for the blog today, folks! If you are interested in giving PowerGrid a try, make sure you download your free 30-day trail!