gs.addInfoMessage() not display onBefore BusinessRule
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2023 08:42 PM
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.
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2023 11:20 PM
you are deleting record from sys_template table but BR might be on some other table
Hence that message won't be shown
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2023 11:34 PM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2023 11:37 PM
can you share BR script and BR configuration screenshots?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2023 12:00 AM
here screen short of BR
Image 1
Image 2