Stop a business rule when an update is done to the backend record through workflow

Hari1
Mega Sage

Hi,

I need to stop processing the business rule when an update is done to the back-end record through workflow.

When a request(RITM) is submitted to update a record value from the record producer the workflow is triggered to updated the record on the backend. We have a business rule written to create logs on a custom table when a record is updated, So even when a user updates the table record a log is created and when a request is submitted also a log is created. But we need to create records on when a workflow is triggered or when a user manually updates the record.

 

I tried using gs.getSession().isInteractive() but returns true for both of the above cases.

7 REPLIES 7

Ankur Bawiskar
Tera Patron
Tera Patron

@Hari1 

so the record in log should be created only when record gets updated from workflow and not from UI or from any user?

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

@Ankur BawiskarThe record in the log should get created when an request(RITM) is submitted and well as when a admin directly updates the ABC table. Ideally the log table record gets created when an update is made on the ABC table through the RITM or by the admin.

 

So we have business rule to create log records that runs when a value gets changed on the ABC table which is getting triggered. Because when a RITM is submitted the workflow will update the backend ABC table record and create a log record even the business rule will get triggered as there is an updated on the backend table. So duplicate records are getting triggered because of this.

 

So when an update happens to the backend record from the workflow we don't want the business rule to be triggered.

@Hari1 

It would be nice if you share screenshots and relevant scripts for better understanding

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

@Ankur Bawiskar, Please find the below snapshots.

Hari1_0-1695281738210.png