Support Article
Audit logs multiple redundant entries for the same property
SA-57862
Summary
A declare trigger is configured to add an audit to a case when the configured properties are modified during user interaction. However, the audit entries are created even when the property values are not modified.
Error Messages
Not Applicable
Steps to Reproduce
- Configure a declare trigger on the respective class where the properties are present.
- Set the invoke type for declare trigger as 'Saved'.
- Configure a When condition in the declare trigger rule. This ensures that the pyTrackSecurityForChanges trigger activity is executed only when the configured 'When' rule evaluates to true.
Root Cause
The 'When' rule was configured incorrectly. As a result, the declare trigger rule resulted in inconsistent behavior.
Resolution
Perform the following local-change:
- Modify the 'Trigger when an instance is' declare trigger rule field to use 'Saved and..'. This causes the rule to execute when an instance of the class is saved and the properties listed have values which are different from the previous values.
- Configure the When condition in the declare trigger rule to use the logic specific to the application requirement. Therefore, the trigger operation is performed only when the When rule evaluates to true.
Published August 24, 2018 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.