- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2025 03:40 AM
Hi
I have created 'Asset Lifecycle'(asset_lifecycle) section on cmdb_ci_computer',cmdb_ci_server','cmdb_ci_win_server','cmdb_ci_ip_firewall', 'cmdb_ci_ip_switch','cmdb_ci_ip_device','cmdb_ci_wap_network and added custom fields which are created on cmdb_ci table. so users who has these custom role"x_cmdb_write" should only see the section
For that I have written below script incude and 7 client scripts on each table by calling same script include Now it is working fine.
Script inlcude:-
Client script:-
But the requirement is please consolidate the 7 client scripts you created on each table to a single client script on the cmdb_ci table . How we can do this one
Tried with below script on cmdb_ci table but not wrking
Any suggestions would be greatly appreciated. Thanks in advance
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2025 06:16 AM
in normal client script did you check "Inherited" so that it runs on extended tables
Also did you add logs?
Also ensure the table on which you are running that form section doesn't have any mandatory fields? if it has then it won't hide the form section
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
05-07-2025 03:44 AM - edited 05-07-2025 03:45 AM
script looks fine and should work if section name is correct on each of those tables
what debugging did you do?
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
05-07-2025 06:11 AM
@Ankur Bawiskar while running on Ctrl+shift+J console the above script is working, but normal client script is not working. Any Idea
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2025 06:16 AM
in normal client script did you check "Inherited" so that it runs on extended tables
Also did you add logs?
Also ensure the table on which you are running that form section doesn't have any mandatory fields? if it has then it won't hide the form section
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
05-07-2025 07:08 AM
Thank you @Ankur Bawiskar . I checked Inherited tab then it is working