Hide UI actions for RITMs raised from a specific catalog item

karolisjon
Tera Contributor

Hello, we have one TSC which generates RITMs containing sensitive information. Most of the fields/variables in those RITMs are now hidden with the help of ACLs and catalog UI policy, if users dont have the required role. I'm however struggling with these two things:

1. How do you hide Activities formatter from the form? I was not able to do that neither with ACL nor with cat UI policy

2. What would be the best way to hide UI actions, f.e save and stay, cancel order etc? Is that somehow possible with UI policies or should I change the setup of each UI action, so that they would be excluded from such RITMs? 

find_real_file.png

Thanks in advance.

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

for UI actions you can update conditions and add the name of catalog item for which you want to hide

Existing Condition && current.cat_item.name != 'Your Item Name'

to hide activity formatter check this

no direct way but to use onLoad client script and DOM manipulation

Hide Activity and comments in requested item

regards
Ankur

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

View solution in original post

9 REPLIES 9

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

for UI actions you can update conditions and add the name of catalog item for which you want to hide

Existing Condition && current.cat_item.name != 'Your Item Name'

to hide activity formatter check this

no direct way but to use onLoad client script and DOM manipulation

Hide Activity and comments in requested item

regards
Ankur

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

@karolisjon 

Thank you for marking my response as helpful.

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards
Ankur

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

Hi @Ankur Bawiskar thanks for sharing the idea, but that didnt help, or maybe I did something incorrectly. I created an onLoad client script as below:


find_real_file.png

I know that the condition is correct, because the test info message is shown to users who dont have the required role, but for some reason Activities is still shown:

find_real_file.png

Ensure Isolate Script field for your client script is False

This field if not on form can be set as False from list layout

find_real_file.png

Regards
Ankur

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