controlling UI action visibility from related list changes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hey Community ,
I have a requirement to control the Visibility of a UI Action.
UI action : Revert to New.
Table : change_request
requirement : I need to hide the UI action "revert to new" on the table "change_request" when in the related list approvers any one of the approver approves .
step to reproduce :
1 create a normal change
2. When record is in new state add a manual approver to the approver list.
3. complete any task (if any ) and move to assess state
4. button will be visible in form context menu.
the idea is when some approved the record there should be no chance to revert the the record and make the changes in record.
Any insight would be appreciated.
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
in the UI action condition you can call script include function
That script include function will check if this CHG is approved by 1 approver
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
if this will hide the button immediately or needs a reload
because by default it is visible and in the assess state itself we need to approve the record . So it should hide immediately.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
UI action condition evaluates only once when form loads.
Button is on CHG table so when in related list somebody approves and if form doesn't reload then it won't work.
That's OOTB behavior.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
You can tweak the below script includes to match your conditions and use it in UI action
If this helped to answer your query, please mark it helpful & accept the solution.
Thanks,
Bhuvan