How to clear Messages on a Business Rule

Meloper
Kilo Sage

i tried:

gs.clearOutputMessages();

and

gs.clearMessages();

but it does not work

1 ACCEPTED SOLUTION

BALAJI40
Mega Sage

Hi,

Clear/hide messages will work only on the client side.

or you can try with the flush message on the server-side.

find_real_file.png

 

View solution in original post

14 REPLIES 14

@Meloper 

That is not possible.

Once the UI action runs it would run completely and not row wise.

Can you share the UI action script?

Regards
Ankur

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

It is possible.

 

If you have to approve more than one Approval.

you can got to the List of Table "sysapproval_approver".

Search all Records where you are the Approver.

Select more than one Record on the List.

search the Drop Down on the Bottom of the list.

 

Select the UI Action Approve (list Action) - Edit the Ui Action (create a log)

 

Approve 

 

Search the Logs

 

@Meloper 

I believe there is some configuration that restricts approving only 10 records.

please check that script.

Regards
Ankur

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

Ankur 😄

yes that is my script 😄 😉

an i dont want 11 Messages, i only want one Message, because of that, i asked how i can clear Messages on Serverside.

 

The Approval UI Action updates every select Record. So of course the Message is created for every Record.

@Meloper 

If you have added that message in BR then BR will anyhow run for all records and not once since you selected more than 1 record

Regards
Ankur

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