Turn All Catalog Items in a Catalog Readonly if part of a group
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2025 12:53 PM
I have the follow
Catalog - Marketplace
Catalog items = 800+'
Group = Wishlister
What do we want..
When the Users in the group go through the portal to access the catalog Marketplace we want them to be able to see all Catalog items. but we don't want them to submit anything so the two options is to make all the variables read only or hide the Add to Cart and Order Now buttons with a popup message letting them know the only option they have is to add to the Wish List.
what is the best way to go about this and any help on how will be great
I tried
Widget update to the Server Script
(function() {
data.readOnlyMode = false;
// Replace with your group sys_id
var targetGroup = 'YOUR_GROUP_SYS_ID';
// Check membership
var grp = new GlideRecord('sys_user_grmember');
grp.addQuery('user', gs.getUserID());
grp.addQuery('group', targetGroup);
grp.query();
if (grp.hasNext()) {
data.readOnlyMode = true; // user is in group → lock variables
}
})();
but that didn't work
I tried a Client script and a script include that didnt; work either