Need Help Creating ACL on alm_hardware Table Based on "Managed By Group"

sattar3
Tera Contributor

Hi Everyone,

 

I am trying to create an ACL on the alm_hardware table in ServiceNow. We have a custom field called u_managed_by_group on the hardware asset record.

 

The requirement is:

Only users who are members of the group specified in the u_managed_by_group field should be allowed to edit that hardware record.
All other users should have read-only access/not allowed to update.

 

Could someone please guide me through the step-by-step process to build this ACL?
If any scripts need to be written (for conditions or scripts within the ACL), please share those script as well.

 

@Ankur Bawiskar @Amit Gujarathi @Ravi Gaurav 

 

Thanks,

Sattar

2 REPLIES 2

Jaspal Singh
Mega Patron

Hi,

Try below with alm_hardware.* with type Write.

answer=false;

if(gs.getUser().isMemberOf(current.u_managed_by_group))
{
answer=true;
]

 

Ankur Bawiskar
Tera Patron

@sattar3 

it's an easy requirement and can be achieved without scripting

you can modify the existing Table.None WRITE ACL or Create a new one if it's not present

something like this in condition

u_managed_by_group [IS DYNAMIC] ONE OF MY GROUPS
55.png

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

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