Make the parent and child form read only when status is closed in process list using acl.

sushil sinha
Giga Contributor

Hi,

I have to make the parent and child form read only when status is closed in process list using ACL.

I know how to make readonly through client script but requirement is to use ACL.

 

find_real_file.png

 

 

1 ACCEPTED SOLUTION

Sushil, Using the conditions on the ACL you can "dot-walk" to the parent record and look at its states as a condition.  First make sure you scroll to the bottom of the "choose field" list and select Show Related Fields and then use your Parent ==> Task Fields or whatever linkage you have back to the parent record and choose the state field and condition.

 

So for example, as mentioned out of the box the incident becomes read only while in a state of closed.  However the Incident Task (incident_task) does not.  I modified the write ACL on incident_task to include a condition of Incident.State is not one of Closed or Cancelled:

find_real_file.png

 

This makes the record read only for the ITIL users.

 

Please mark this post or any as helpful or the correct answer to your question if applicable so others viewing can benefit.

View solution in original post

5 REPLIES 5

Michael Ritchie
ServiceNow Employee
ServiceNow Employee

The best way I use to learn is to look at out of the box code doing similar things and clone it.  Out of the box incidents become read only when closed.  This write ACL is what is responsible for making the incidents read only:

https://INSTANCENAME.service-now.com/nav_to.do?uri=sys_security_acl.do?sys_id=66ec26370a0a0b0100a67b597d415b84

This should hopefully get you going.

 

Please mark this post as helpful or the correct answer to your question if applicable so others can benefit.

Hi Michael,

Thanks for reply.

But I have one doubt how can I make child form as read only.

Sushil, Using the conditions on the ACL you can "dot-walk" to the parent record and look at its states as a condition.  First make sure you scroll to the bottom of the "choose field" list and select Show Related Fields and then use your Parent ==> Task Fields or whatever linkage you have back to the parent record and choose the state field and condition.

 

So for example, as mentioned out of the box the incident becomes read only while in a state of closed.  However the Incident Task (incident_task) does not.  I modified the write ACL on incident_task to include a condition of Incident.State is not one of Closed or Cancelled:

find_real_file.png

 

This makes the record read only for the ITIL users.

 

Please mark this post or any as helpful or the correct answer to your question if applicable so others viewing can benefit.

Thanks Michael ,

Its working for me.

Regards,

Sushil