Error: "Data Policy Exception: The following fields are read only: ... " in Agent Workspace.

Julian
Mega Contributor

Hi, 

I created a data policy which makes two (2) true/false fields "read only" if a specific field in the case form is populated. These 2 true/false fields are not mandatory in order to create or close a case but Agent Workspace is not letting me save a record with state = resolved or state = closed. 

I'm getting an error: "Data Policy Exception: The following fields are read only: ...." 

I figure if these fields are not mandatory then it should not matter if they are read only in order to change the case state.

What could have caused this? How can I fix it? I added an attachment with the error and the case form. 

1 REPLY 1

Abhijeet Khandr
Giga Expert

Hello Julian,

The idea behind read-only data policies is exactly that: restricting write access based on the conditions you set. So, if there you set no conditions whatsoever, then you won't be able to write, unless you explicitly force it with a script.

Whenever you create a new record, what it does is system writes to that field as well, hence the error.

What you can do is create an equivalent ACL and give role-based access. Or, if all you need is client-side restriction, you can just go ahead and use a UI policy.

You can refer the below link as well

Link 1 Data Policy Exception: The following fields are read only: 

Link 2 Data Policy Behaving incorrectly

 

Regards,

Abhijeet