- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-24-2024 06:43 AM
I am trying to remove the 'Deploy Catalog Builder Item' option from the choices if the logged in user does not have the catalog_builder_editor role.
Currently this catalog item is nested in an Order Guide. I have tried added Client Scripts to the Catalog Item and the Order Guide with no success.
Below is the script I have put together from looking at other similar postings. Is there something obvious I am doing wrong? Thanks in advanced!
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-24-2024 08:12 AM
Change the UI Type on the client script to all. You have it set to desktop which mean it will only work in the standard UI.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-24-2024 08:12 AM
Change the UI Type on the client script to all. You have it set to desktop which mean it will only work in the standard UI.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-24-2024 08:19 AM
That worked! thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-24-2024 07:43 AM
hi @melsarrazin
try bellow updated script once:
function onLoad() {
// Check if the user has the 'catalog_builder_editor' role
var userRole = g_user.hasRoleExactly('catalog_builder_editor');
if (!userRole) {
// If the user does not have the role, remove the option
g_form.removeOption('what_type_of_catalog_request', 'deploy_catalog_builder_item');
} else {
// If the user has the role, add the option back
g_form.addOption('what_type_of_catalog_request', 'deploy_catalog_builder_item', 'Deploy Catalog Builder Item');
}
}
i hope my answer helps you to resolve your issue, if yes please mark my answer helpful and correct.
thank you
rajesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-24-2024 08:11 AM
Thank you for the response. This script was unsuccessful in hiding that option.