After BR causing duplicate entry in audit history
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-22-2022 04:49 AM
Hi Team,
I have "Primary interface" field with same backend name on two table(custom extended attributes and business application).
1. after br - update :
if primary interface changes in custom extended attributes table , this script updates the primary interface field on business application table.
2. after br - update:
if primary interface changes in business application table, this script updates the primary interface field on custom extended attributes table.
history list on custom extended attributes table.:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-27-2022 08:22 AM
It sounds like one BR is triggering the other - you can verify this if you do a BR debugging.
Try adding .setWorkflow(false) to the the BRs to prevent this, i.e.
bapp.setWorkflow(false);
in the first BR just before your bapp.update(); line, and
customE.setWorkflow(false);
in the second BR, just before your customE.update(); line.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-27-2022 08:25 AM
Hi @revathy muruga1,
There may be another after update business rule is running after this business rule. Hence it adds two updates record in audit.
Thanks,
Sagar Pagar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-27-2022 11:03 AM
Your code
customE.update()
and bapp.update()
should be within "If" blocks.
Thanks and Regards,
Saurabh Gupta