The CreatorCon Call for Content is officially open! Get started here.

How to make a readonly field as editable for users in particular group

test1231998
Tera Contributor

I have a field company on cmdb_ci table which is read only for all users except admin. I want to make this field editable for only those users belonging to a particular group. can anyone please help me with the code or solution

17 REPLIES 17

Also modify this condition 

if(g_scratchpad.isMember.toString() == 'true')

{

//make necessary actions.

}


Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP

no this isnt working, If you can let me know how to make the company field in the personal instance for cmdb_ci table as not read only for any of the group then I think this should work

 

Actually I tried both the ways which you have mentioned

Hi,

if user is not a member then you want to make it readonly so you need to use this

if(g_scratchpad.isMember.toString() == 'false'){

 // this means user is not member so do actions

}

Regards
Ankur

 

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

Ability to populate/update Company attribute on all CIs in CMDB.

 

This is what I want exactly

Hi,

if user is not a member then you want to make it readonly so you need to use this

if(g_scratchpad.isMember.toString() == 'false'){

 

}

Regards
Ankur

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