Interested in a ServiceNow event built for developers? Registration for now[dev]26 is officially open!

HOw to get the Description field only editable by the user who create the incident

User687957
Mega Guru

Dear all,

 

I have a use case where I need to get the desciption field of an incident only editable by the user who create the incident. This from the self service view

For that I have created a incident.description ACL rule where I have add a script as below in advance section:

answer = (current.getValue('sys_created_by') == gs.getUserName());

 

chrome_tNda2yznzx.png

 

chrome_7wmXhtizuT.png
When I login to an other user who did not create the incident, the description field is still editable

 

Any idea ?

2 REPLIES 2

Sachin_Nasa
Kilo Sage

Hi @User687957 ,

There are several OOB write ACLs configured for the Incident table and Description field.
Because of that, the custom ACL may not be restricting access as expected.
Could you please update the ACL Decision Type from 'Allow If' to 'Deny Unless' and test again using the same configuration and script? This will explicitly deny write access to users who do not meet the ACL condition. Please let me know if the issue still persists after making this change.


If you found this helpful, please mark it as Helpful and Accept as Solution so it can reach others too.

Thanks & Regards,
Sachin Narayanasamy

This does not work.
I am login as system admin and open by user for the incident is not admin so description should normally be read only but in fact not

chrome_l60FH6ZsEI.png

 

Any  other idea ?