We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

gs.addInfoMessage() not display onBefore BusinessRule

SNOW44
Mega Guru

Hi Everyone,

 

I have a requirement to stop create/delete without customize OOB ACL's. I went with approach of Business rule to abort action of create/delete on one of custom role base. This is for sys_template table. We are stopping custom role to abort certain operations. 

In Business rule, when a user have that specific role, I'm aborting action. It is working as excepted on form level UI actions(insert, insert & stay, delete) where showing info message but it is not working at list level.

There is a option on list layout to select record and perform delete action. on this time i want to show info message but it is not working. How to tackle this gs.addInfoMessage() from onBefore-update business rule.

SNOW44_0-1686886674287.png

Is there a way to show info message in listlayout on the deletion operation based on users role. Can someone share approach on this.

 

Regards,

Ravi

5 REPLIES 5

Ankur Bawiskar
Tera Patron

@SNOW44 

you are deleting record from sys_template table but BR might be on some other table

Hence that message won't be shown

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

Hi @Ankur Bawiskar ,

 

I wrote on sys_template table to abort action. We have given extra access to custom role like adding (template_editor_group). 

User having custom role and template_editor_group.

@SNOW44 

can you share BR script and BR configuration screenshots?

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

here screen short of BR

Image 1

SNOW44_0-1686898721116.png

Image 2

SNOW44_1-1686898774873.png