- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-08-2022 06:56 AM
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?
Thanks in advance.
Solved! Go to Solution.
- Labels:
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-08-2022 07:01 AM
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
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-09-2022 12:59 AM
it worked for me
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-09-2022 01:05 AM
It did the trick, thanks a lot!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-09-2022 01:06 AM
Glad to help.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-08-2022 07:54 AM
Hi
Please find my suggestion below to your query below:
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 --> Technically it might be possible with Client Script using DOM but suggestion would be not to use it as ServiceNow does not suggest to use DOM and is not a good practice.
What is the use case for which you are looking to hide this using script?
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?
For this you need to modify the UI Action condition itself by adding condition to existing UI Actions as below:
Existing Condition && (current.cat_item.name!='Provide the Name here' || current.cat_item.name!='Provide the Name here')
Would like to add an important point here, few of the UI Actions which you have mentioned in your post above like "Save" .
Be mindful these are global UI Actions unless you have customized at your end. Please do not add the above conditions directly to these UI Actions and make a clone of it first and then modify it as a good practice if needed.
First navigate to each of these UI Actions as per steps below:
1) Open your RITM form. Scroll down and you will see the same Buttons as on TOP.
2) Right click on the Button and then select Edit UI Action as shown below:
Now please ensure to check the Table first on which the Button or UI Action is written on.
If it says Global then please clone it by changing the Table from Global to Requested Item and then Right click on the Header and select Insert and Stay and then modify your changes as suggested above.
If it is already on Requested item then you can make the changes directly.
This way the changes you do will apply only for Requested Item Table and not at the global level on the platform as shown below:
Hope this helps. Please mark the answer as correct/helpful based on impact.
Regards,
Shloke
Regards,
Shloke
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-08-2022 11:24 PM
Hi
Glad to help here, if you have a follow up query do let me know else please mark the answer as correct and close this thread.
Regards,
Shloke
Regards,
Shloke