Audit logs multiple redundant entries for the same property
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.
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.
The 'When' rule was configured incorrectly. As a result, the declare trigger rule resulted in inconsistent behavior.
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.