Restrict fields to edit for group of people when it is assigned to particular person

vamsi pamujula
Kilo Contributor

Hi There, 

Once the ticket got assigned to a specific person with some specific description then the fields in that ticket should be read only to other users.

Could anyone suggest how to implement this scenario.

Thanks,

Vamsi

5 REPLIES 5

Musab Rasheed
Tera Sage
Tera Sage

Hi @vamsi pamujula,

You can do this with UI policy, you will get lot of stuff related to UI policy. Mark my answer as correct if that helps.

Regards

Please hit like and mark my response as correct if that helps
Regards,
Musab

vamsi pamujula
Kilo Contributor

Hi,

 

We can do this using ACL?

 

Regards,

Vamsi.

Yes, you can do it, you can update the write ACL for those fields in the advanced script with server side code, something like if assigned_to is xyz user, and gs.getUserID() is user of this role or group set answer as false; that will make the fields as read only

 

Sample script:

answer = checkGroup();

function checkMaintGroup() {
    var mainGrp = new GlideRecord("sys_user_grmember");
    mainGrp.addQuery("group", groupSysID);
    mainGrp.addQuery("user", gs.getUserID());
    mainGrp.query();
    if (mainGrp.next()) {
        return true;
    }
    return false;
}
Best Regards
Aman Kumar

UI policies are fine only for form interaction, but not truly makes the correct solution as the user will still be able to edit field if they want from list layout.

SO UI policies are incomplete solution, and if you want to protect from all ways go for ACL.

Even if you go with UI policy, you need to create list edit ACL, which is extra config and futile effort

Best Regards
Aman Kumar