How we can hide the CI asset tab on the for users who dont have a customer role
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-28-2025 05:50 AM
How we can hide the CI asset data tab on the "cmdb_ci_computer" for users who don't have a customer role like "x_cmdb_write"
Tried below script but it is not working
Thanks in advance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-28-2025 06:13 AM
use this -> section name should be in lower case and separated with _
function onLoad() {
if(g_user.hasRoleExactly('x_cmdb_ci_customer_write')){
g_form.setSectionDisplay('ci_asset_data', true);
}else{
g_form.setSectionDisplay('ci_asset_data',false);
}
}
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-04-2025 08:56 AM
Hope you are doing good.
Did my reply answer your question?
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:42 AM
@Ankur Bawiskar
Tried with above script but it is not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2025 03:46 AM
it should work fine provided the role name and section name is correct
share what debugging did you do?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader