Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

rying to allow write access for one field for a user with no role (but listed as a reader)

chennessy
Kilo Expert

End users on this instance have no role.   They have read access only to forms that include them as a reader.

The script on the Access Control that allows read access for designated readers (with no role) works:

var answer = false;

if (current.u_readers.indexOf(gs.getUserID() > -1 )) {

answer = true;

}

Next, I need to allow write access for one field (a checkbox for concurrence, called u_customer_concurrence).

When the customer checks the box, the customer's name and date will be populated in additional fields.   But I need to allow them to be able to check the box.

I have tried an Access Control of field/write/ u_operation.u_customer_concurrence, with the above-mentioned script that works for readers, but no luck.

I have also tried record/write/u_operation.u_customer_concurrence just out of curiosity but that didn't work either.

Any ideas or suggestions are much appreciated!

1 ACCEPTED SOLUTION

OK, I got it to work.    


The solution is:


write   /     record   /       u_operation.*         /       role:   itil


write /       record /       u_operation.u_customer_concurrence       /   No role required



The field name overrides the * in the first ACL.


My error was that I had       write /   field /     u_operation.u_customer_concurrence   /   No role required


Once I switched to write/ record,     it worked!



Thanks everyone for your input!


View solution in original post

10 REPLIES 10

Interesting... it was already working for read access, with the extra ) after the -1;     editing it as you suggested made no difference.       hmmmm....


Thanks for the suggestion.