To Show Error Msg on incident list view

Krutika Valanj2
Tera Contributor

Hi,

I am having a link on my service portal redirecting to incidents in native UI, I have to show an error message on the incident list view when user with no roles is getting redirected to the incident list view.

8 REPLIES 8

Shraddha Kadam
Mega Sage

Hello @Krutika Valanj2 ,

 

Create a Query business rule on the Incident table and add below line of code. In addition to that if you want to add condition then in the "When to apply" section add your condition.

gs.addErrorMessage('This is the Incident list layout');

 

If my response was helpful, please mark it as correct and helpful.
Thank you.

Ankur Bawiskar
Tera Patron
Tera Patron

@Krutika Valanj2 

This will be taken care by OOTB table level READ ACLs on incident table and Query business rule.

Only valid role users can see the table data.

what's your use-case?

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

Hello @Ankur Bawiskar 

I have a portal link to incident table, I want to show a info msg to end users that as they don't have roles in servicenow they will only be seeing incidents created by them. See the attached screenshotnative uinative uiportalportal

@Krutika Valanj2 

I already informed the OOTB table level ACL and query business rule should handle this.

There is the OOTB incident query BR and you can update the logic there.

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