Data policy - set field readonly bug

Josef Juna
Tera Expert

Hello everyone,

I have some problem with data policy. I recreated this scenario in PDI. The thing is I want to set some field as a readonly on condition (Category is not Software).  So everything seems to works good, but when I have some record saved with the readonly true and then I break this conditon (by setting Category to Software ) and fill some value to the Assign To field, then I have this error. It seems like the field is still on BE set as a readonly, because when I change Category to Software and levave the Assign to blank, then It saves a nd then I should fill Assign to and save again. I am using Data Policy, because I don't want to make this field editable in list view or in Embedded list. When I am using UI Policy, then I find that user can Edit the field via embedded list. See the screenshots below. 

Thanks you in advance.

Josef

1 ACCEPTED SOLUTION

Hi @Josef Juna ,

You may want to do the following.

a. Deactivate the data policy

b. Create a UI policy with same conditions

c. Create a "list_edit" ACL for that field to disable edits from list view

Thanks,

Arav

View solution in original post

3 REPLIES 3

Arav
Tera Guru
Tera Guru

Hi,

This is because the system evaluates the data policy before saving the record and it sees that the "Assigned to" field has a value when it should be read only as the category (saved in database) is "Inquiry / Help".

To overcome this, you may want to change the category to "Software", save the record, and then update "Assigned to".

Thanks,

Arav

Hi Arav,

thanks for response. I know this works, but is there any way to set the field not readonly before the record is saved. Something like before BR? 

Hi @Josef Juna ,

You may want to do the following.

a. Deactivate the data policy

b. Create a UI policy with same conditions

c. Create a "list_edit" ACL for that field to disable edits from list view

Thanks,

Arav