Audit – Get Last Update

This activity gets the last audit history detail for the record the workflow runs on, and returns the details as an HTML table for an email or a CSV table for a task or other record.

This activity was built for a client of mine who needed email alerts when certain entities were updated. They had a lot of configuration data stored in Dynamics 365 and when those values changed, a manager should be notified with the old and the new values. They didn’t want to prevent the user from making the change, only that the manager was made aware of it.

 

Input Parameters

Parameter Name Type Description Default
Last Update with This Field… Text If you want the last audit update that contains a specific field.
Include Header for Table? Boolean Indicates if the Header row should be rendered. Header column names are based off the query results. True
Table – Border Color Text The color of the grid lines. #000000 (Black)
Header – Background Color Text The background color for the header. #6495ED (Cornflower Blue)
Header – Font Color Text The font color of text in the header. #FFFFFF (White)
Header – Make Font Bold Boolean Indicated if the header text should be bolded True
Row – Background Color Text The background color of data rows 1, 3, 5… #FFFFFF (White)
Row – Font Color Text The font color of data rows 1, 3, 5… #000000 (Black)
Alternating Row – Background Color Text The background color of data rows 2, 4, 6… #F0F8FF (Alice Blue)
Alternating Row – Font Color Text The font color of data rows 2, 4, 6… #000000 (Black)

Output Parameters

Parameter Name Type Description
Number of Fields in Audit Result Whole Number The number of fields in the audit detail.
Audit History (HTML) Text The audit record, formatted as HTML based on the default styles. This can be used for emails or other HTML enabled fields.
Audit History (CSV) Text The audit record with no special formatting. The cells are separated with a comma (,) and rows with a line break. This should be used when for non-HTML fields like Description on an activity or more other text fields.