Write ACL for State field on sysapproval_approver table

priyanka1028
Tera Contributor

Hi All,

 

I have requirement to restrict editability of state field on User approval [sysapproval_approver]  table and the requirement is I have a field named as approval flag and if the approval flag is set to true then I need to restrict editability of state field.

 

I have tried with write ACL but it is not working, Can anyone help me with this.

1 ACCEPTED SOLUTION

Anand Kumar P
Giga Patron
Giga Patron

Hi @priyanka1028 ,

Below OOB write acl on state field is restricting to edit approval flag and if the approval flag is set to true then I need to restrict editability of state field.

https://YouInstanceID.service-now.com/sys_security_acl.do?sys_id=476967a60a0a0b0c0019e98fbc0a83d8&sy...

 

If my response helped, please mark it as the accepted solution and give a thumbs up👍.
Thanks,
Anand

View solution in original post

10 REPLIES 10

Hi @Anand Kumar P , I have tried by deactivating the above ACL still my ACL is not working

Hi @priyanka1028 ,

 

i hope you created write acl on sysapproval_approver table field state 

 

condition if approval flag true use below script 

 

(function() {

    if (current.Approvalflag field backendname == true) {

        return false;

    }

    return true;

})();

 

If my response helped, please mark it as the accepted solution and give a thumbs up👍.
Thanks,
Anand

the link which you have shared it not working and also tell me where to find that acl for state

Did you change the URL to your own instance, because with me it opens the OOB ACL immediately.


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

Anurag Tripathi
Mega Patron
Mega Patron

Can you show a screenshot of ACL you have tried?

You need to make sure that the same restriction is applied on ALL write ACL on sysapproval_approver.state as you need only one acl on the same level to return true to pass. So if there are 2 or more ACL and one returns true and one returns false, overall its true.

-Anurag