Business rule triggering multiple times

AnkushH
Tera Contributor

before business rule 
insert and updated checked 
some conditions
when i am creating a incident there should be just one log but i can see 4 logs 
i don't know why it is happening.

9 REPLIES 9

pavani_paluri
Giga Guru

Hi @AnkushH ,

 

Even during an insert, the record might get updated internally multiple times due to UI Policies, Client Scripts, Other Business Rules or Workflows/Flows

These can cause update() to be triggered implicitly before the record is actually inserted.
Add a condition to your Business Rule like:
if (current.operation() === 'insert' && !current.changes()) {
return;
}

 

Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Pavani P

Hello @pavani_paluri 
It is not working.

Pradeep Thipani
Mega Sage

Hi @AnkushH ,

 

Can you pls share your script and conditions to debug the issue. 

 

Thanks,

Pradeep

 

"If this response was useful, please select 'Accept as Solution' and mark it as 'Helpful.' This helps me provide better answers and assists the community ".

Regards,
Pradeep

Its a before business rule 
when to run = before, runs on Insert and update meaning checked for insert and update on business rule page 
some conditions (which are not related to the issue)
my only concern is that it is triggering multiple times and i can see it in logs 
is that due to internal updates i dont know.

Ankur Bawiskar
Tera Patron
Tera Patron

@AnkushH 

since you said it's before insert & update.

Are you sure the BR is triggering only once because if you are updating something and your BR is updating some field, some other BR might again trigger and your condition will evaluate to true.

try to debug business rule in details

Debugging Business Rules 

If my response helped please mark it correct and close the thread so that it benefits future readers.

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