How to make fields read only if logged in user is not part of assignment group in CI

raj149
Giga Guru

Hello Experts,

In user table there is one field called cmdb this field type is select box as per now if logged in user cmdb=true then he can able to edit all the fields in all ci classes. if cmdb=false then he cannot edit all field will be read only.

 

now the requirement is

 

In any CI classes current logged in user is a part of support group and he is not part of assignment group and cmdb=true then we need make read only  2 fields (status and support group)

remaining fields need to be editable because cmdb=true.

 

note.

above change will not applicable for Admins and config admin roles

 

How to achieve this instead of ACLs.

 

Best Regards,

Raj.

 

11 REPLIES 11

@raj149 

I would suggest to discuss this requirement with your customer as it will impact every CI class.

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

Hello @Ankur Bawiskar 

 

I already had a discussion with my customer they agreed.

They really required 2 fields read only.

Best regards,

Raj.

@raj149 

did you discuss this requirement with your technical team/architect?

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

Hello @Ankur Bawiskar 

I will test it in my PDI if everything is working well then defiantly i will do the same changes in my real instance 

Please share the onload client script . That will help to me 

 

Best Regards,

Raj

Having client side code to make it read only is not a good practice. Like Ankur said, please discuss with your Tech Lead to address this.

 

The best solution is to tackle this through an ACL only.

 

Thanks,
Dhruv