Info message populated many times on the form from Business Rule

Saranya2
Tera Contributor

We have a before update BR on change table, whenever the record has been updated, it will populate info message on the form multiple times.

what could be the cause? any suggestion please.

 

ci br.PNG

1 ACCEPTED SOLUTION

jaheerhattiwale
Mega Sage
Mega Sage

@Saranya2 Add below line at top of business rule script that will remove old messages and new message will appear. in this way there is only one message.

 

gs.flushMessages()

 

Please mark as correct answer if this solves your issue.

Please mark the answer as correct or helpful based on impact
ServiceNow Community Rising Star, Class of 2023

View solution in original post

9 REPLIES 9

Hi @Saranya2 ,

 

1. Have you checked if there is any other Before Insert BR present on this table?

2. Best to also check the history want is changing on the form.

3. Increase the order of your script (something like 1000 or more than that).

 

Regards,

Reshma

**Please mark my answer correct or helpful based on the impact**

@Saranya2 Cant exactly say that what is the root cause because I don't know the exact implementation of other scripts.

 

Please mark as correct answer if this solves your issue. 

Please mark the answer as correct or helpful based on impact
ServiceNow Community Rising Star, Class of 2023

Hi @jaheerhattiwale,

I found there is another after Insert/update BR we have created recently, when I am deactivated this BR, then the info message has not populated. Is this because of condition we given in BR?risk calc.PNG

 

risk calc1.PNG

@Saranya2 Yes might be. One business rule is triggering other. So adjust the condition so that one BR should not trigger other and it should not break the existing logic.

 

Please mark as correct answer if this solves your issue.

Please mark the answer as correct or helpful based on impact
ServiceNow Community Rising Star, Class of 2023

Hi @Saranya2 ,

 

Use high order to your BR.

 
Script Execution Order:

reshmapatil_1-1671534080631.png

 

 

 

Regards,

Reshma

**Please mark my answer correct or helpful based on the impact**