Make all fields ready only except for State field

randallames
Tera Contributor

Hello all!

 

I have the below requirement:

 

When a user accesses an Incident in the State of In Progress, if they are not the Created By user, all fields except for "State" shall be read only.

 

I'm trying to solution this through the use of ACLs.

 

I added a "State is not In Progress" condition for the OOB write table level ACL for Incident.

I also created 2 write ACLs for Incident:

 

Incident.*

State is In Progress AND

Created By is javascript:gs.getUserID()

 

Incident.State

No condition

 

I figured this would work, but it isn't. Can someone please assist me with this problem? Thank you!

6 REPLIES 6

Joe Wong
Tera Guru

Just looking at this from another angle.  Would creating an UI Policy with a script trigger to deal with the Created By user and set all fields to be "Readonly" except for the "State".  I think that will be the way I will approach this.

Hey Joe,

I tried creating a UI Policy first, but it wasn't reading If the user isn't the Created By user.

 

with UI policy you can do the following:

JoeWong_0-1730476777922.png

This on the bottom, you can restrict all the fields you want to restrict.

 

Or like others have mention, ACL should work too.

This works, but the user should also be unable to create records from the Related lists as well.