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.

Set a value visible

Rafael Batistot
Kilo Patron

Hi team,

 

in the Incident table, when the state is close (6) all fields change to read only by default

But i want add a new String field (motive) that only user with role user_admin can write in this field even thar state is closed

i've tried by Business Rule, Client Scrip... some logic like 

if (adminRole) {
    current.setReadyOnly('u_motive', true);
}


But all my attempts were fail. 

 Thank you support

If you found this response helpful, please mark it as Helpful. If it fully answered your question, consider marking it as Correct. Doing so helps other users find accurate and useful information more easily.
1 REPLY 1

Brad Bowman
Kilo Patron
Kilo Patron

You probably have a write ACL on the table when state = 6.  Create a new one for this field and the role and state condition.  It should override the table-level one, but these can be tricky to troubleshoot.