- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-29-2020 08:48 PM
Hello,
I have created a new Module under change managenet Menu, which will display only the change requests which are submitted for approval state.
I have created a UI action on change request form, this UI button i wanted to display like List bottom button.
But this button is now visible for all the change request modules like, open requests, closed requests.
I wanted to display it only for one module which i have created now.
List view of newly created Module:
----------
List of view of OOB modules: Here that Notify button should not be visible
-----------------------------------------
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-02-2020 11:35 PM
Hi Lalitha,
it seems the UI action condition doesn't evaluate the url in condition field
https://hi.service-now.com/kb_view.do?sysparm_article=KB0681797
I have taken another approach and it is working fine and showing the button only when that module is opened
1) created UI script - notify_button
URL: https://dev59996.service-now.com/sys_ui_script.do?sys_id=3858001fdb1210108ab0a0f2ca96196d
2) in that added script to check the url contains the module sys_id or not
3) if not then hide that button using DOM
Note: this is not recommended
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
‎07-31-2020 08:08 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-31-2020 08:45 AM
Hi Lalitha,
One thing you can try is this in the UI Action condition as below
Remove all other conditions
give your module sys_id here in the condition and check if it hides for other modules
gs.action.getGlideURI().toString().indexOf('sysparm_userpref_module=3264ded3c611227a019523c8448d2d91') >= 0
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
‎07-31-2020 09:19 AM
Ankur,
I have tried the same way by giving the below condition now the button itself not visible on the same module.
gs.action.getGlideURI().toString().indexOf('sysparm_userpref_module=b24979411b92dc906d9886ae6e4bcb3f') >= 0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-31-2020 10:51 AM
Hi Lalitha,
If the url contains that module sys_id it should show
If this is for your PDI then please share details
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
‎08-02-2020 10:16 PM
Hello Ankur,
Good MOrning, the same i have tried it on my PDI. Still its not working.
Credentials:
Username : admin
Password : pkqLFOLh63Sy
Emergency Change MOdule : Here i want to show the button, for remaning modules it should not show the button
UI Action :