VARIABLE EDIT ACCESS

Shabbir1
Tera Contributor

Hi

we have ten Variables on the catalog task which is available on service portal we need to give edit access to the five variables to the current logged in user and another five variables edit access to the group name "A" how to achieve this can anyone share script for this

 

 

regards

Shabbir

 

2 REPLIES 2

Ankur Bawiskar
Tera Patron
Tera Patron

@Shabbir1 

it should be simple enough.

you should use onLoad catalog client script which applies on Catalog task and use GlideAjax to check the group membership

What script did you start with and where are you stuck?

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

Hi Ankur 

 

Thank you for reply I am using Following on load client script but it is not working on the service portal can you please assist on this. We would like to proceed with Service portal script on task table any suggestions on this how to achieve this 

 

 

 

function onLoad() {
    //Type appropriate comment here, and begin script below
    var user = g_user.userID;
    var open = g_form.getValue("opened_by");
    alert("check user" + user);
    alert("check user2" + open);

    if (user == open) {
        alert("item name" + request_item.cat_item);
        if (request_item.cat_item == "88390a53db6d6010d2784705059619ed") {
            g_form.setReadOnly('vr_teaching_faculty_non_insead'true);
        }
    }
}