On Catalog item (sc_cat_item) form how to make "Meta" field editable to item owner

Aparajita_ACN
Tera Contributor

We have a requirement to make "Meta" field editable to "Item Owner" (custom field).

 

There are two existing write ACL on sc_cat_item.*

 

1. which allows catalog_admin and catalog_manager role user to edit all fields on the form

2. Another ACL having "catalog_builder_editor" role to have write access to all fields if the user have this role and is "Owner"(OOB field)

 

Is it possible to allow "Item Owner" (custom field) user to have access to specifically on "Meta" field to have Write access.

1 ACCEPTED SOLUTION

Robert H
Mega Sage

Hello @Aparajita_ACN ,

 

Please create an ACL on the Catalog Item table, like this:

 

RobertH_1-1745233349042.png

RobertH_0-1745233452775.png

 

 

Please note that there is an OOTB Owner field on that table as well so please make sure you select the correct one.

 

Then create another ACL with the same configuration, but for the Catalog Item.Meta field. 

 

Regards,

Robert

View solution in original post

4 REPLIES 4

Nilesh Pol
Tera Guru

@Aparajita_ACN 

es, it’s possible to allow users listed in a custom field (like "Item Owner") to have write access to a specific field (like "Meta") on the sc_cat_item table, while still respecting the existing ACLs. Create a new Write Field ACL for the sc_cat_item.Meta field.

In this ACL, you’ll write a script to check if the current user is the one listed in the custom "Item Owner" field.

 

var itemOwner = current.u_item_owner; // Replace u_item_owner with your actual field name

answer = (gs.getUserID() == itemOwner);

J Siva
Tera Sage

Hi @Aparajita_ACN 
As per OOB ACl, user with ITIL role has access (read) to Catalog item records.
So you can create field level write ACL with ITIL role and the data condition as "Owner" is (dynamic) Me & advanced script validation.

JSiva_0-1745232911887.pngJSiva_1-1745232932418.png

JSiva_1-1745233248880.png

 

if (gs.getUserID() == current.owner) {
    answer = true;
} else {
    answer = false;
}

Note: Replace the owner field with your custom owner field.

Regards,
Siva

 

Robert H
Mega Sage

Hello @Aparajita_ACN ,

 

Please create an ACL on the Catalog Item table, like this:

 

RobertH_1-1745233349042.png

RobertH_0-1745233452775.png

 

 

Please note that there is an OOTB Owner field on that table as well so please make sure you select the correct one.

 

Then create another ACL with the same configuration, but for the Catalog Item.Meta field. 

 

Regards,

Robert

Ankur Bawiskar
Tera Patron
Tera Patron

@Aparajita_ACN 

Remember that user should pass table level WRITE ACL so that field can be updated

if you don't wish to mess with ACLs then you can use onLoad client script as well

function onLoad() {
    if (g_user.userID != g_form.getValue('u_item_owner'))
        g_form.setReadOnly('meta', true);
}

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader