Change task able to edit only assignment group and change manager

chinna
Mega Guru

Hi All,

 

i have a requirement like in the change task  all the fields should be editable by only the change manager and assignment group members(i mean CTask assignment group only).

 

How can i acheive this, if we need to write on load client script, Or by through acls.

can anyone help me on this.

 

Regards,

Chinna

 

1 ACCEPTED SOLUTION

Hi Chinna,

My previous code was to check for a user, which is assigned as a change manager(in the field "change_manager_field_name") on the change ticket. if you need to validate it for "change_manager" role the script will be like

answer = false;

if(gs.getUser().isMemberOf(current.assignment_group) || gs.hasRole('change_manager'){
answer = true
}

Regards
Air

View solution in original post

13 REPLIES 13

Hi,

 

Here i attached my screenshots.

pls find it.

Hi airsquire,

 

it works fine , the code shared bu you.

 

actually in my instance some one written a client script for similar requirement,that why its not working on that utime.

 

thanks for sharing the code.

Hi Chinna,

In similar cases, if a field is not visible or editable for a user. You can use debugging security rules, to verify if ACL is preventing some action or is it not. If it is not Field watcher can give you a better insight, field watcher in your case could have helped you identify that some client script is making it read-only.

Adding to the above info, I would like to say that ACLs are the best way(performance-wise) to make some field read-only/visible if there are some roles involved.

Regards
Air

chinna
Mega Guru

hi airsquire,

 

i have one another requirement based on approvals.

 

pls check the follow link

 

https://community.servicenow.com/community?id=community_question&sys_id=652eac8cdb3f2700190dfb2439961995

 

can you help me on this.

 

regards,

chinna