·
1 min read

How to Add Comments to Workflow Notifications

A common request from people using workflow is how can the notifications sent to approvers be modified to include comments?  To be more precise when you submitted a workflow you entered a comment but the notification sent as an alert to the approver did not contain your comment – how can you get that comment included in the notification?

The text for the notification/alert comes from the workflow configuration. The configuration needs to be modified to include the comments made while submitting (or rejecting, requesting a change, cancelling, etc.) a workflow. To modify the configuration so that it includes the comments you need to add the Workflow.Last note placeholder to the message. To do this, in AX go to the module that contains your workflow. For example, if you are doing purchase requisitions navigate to the Accounts Payable module. In that module go to the Setup > Workflow configurations form. Find the configuration in the list and click on the General tab within that same form. Find the version that is marked with a checkbox and click the Modify button. Click on the Details tab and choose one of the elements in the workflow. When you select the element the task details for that element should then be displayed at the bottom of the form. Click on the Notifications tab in the task details area and find the notifications that you are interested in adding comments to. Click on the Define button which opens up the text editor for the messages that get sent. In the list of available placeholders find the one listed as %Workflow.Last note% and click the Insert button. Adding the Last note to the message will include the comments added to the workflow during that event (submission, rejection, etc.) to the notification that is sent. Save your changes to the notifications and close the windows until you are back at the Workflow configurations form. You should now have a new version number listed. Mark the new version of the workflow as the Active one.