Adding custom Cancel Error message to your workflows
Dynamics 365 CRM allow using the workflows and the easy functionality to validate and create logic for your business process, but when creating validation error or warning messages the only way to do this with workflows is to use the stop the workflow function or custom action, the action will enable providing a message, to show and display to the end user.
The following is the typical representation of the Stop Workflow Cancel Error Message
But the message and the system out of the box representation loses focus and will need a lot of attention to understand what the message was intended.
I was playing on how to have a better display of the error message and encounter the following tips to share:
- How to Add line brakes on the message
- You can add line brakes using the following combination of special character within your message “\r\n”, at the end of the line you want to present as part of the error message
- How to Include Bold or different size font for the message
- You can change the font size using the HTML tags for Headers like H1, H2, H3
- The workflow error message is injected to a Span tag on the form, so you will use any of the HTML components that the Span tag will allow
The following is a sample screen shot with the changes on the message:
“<h2>FOUND THE TASK EXHIBIT</h2> \r\n Detail Message for the Error! \r\n”
hope you enjoy the tips!
Get membership Access to all Content!
Get Access to the most updated content for Dynamics 365 and other technologies, receive emails when we post New Content and when we have new Videos, and Live Sessions! Subscribe to get our latest content by email. Also to get and download the source code on the new blog post!