UI policy is not working on a new filed

Akhila P
Tera Contributor

Hello Everyone,

 

I had created a new filed in task table and created a UI policy to make that field read-only, but I see it's not working.

 

Do you know if I need to check any other conditions?

 

18 REPLIES 18

Hi  @Akhila P , 

In the Ui Policy -> Scroll down for Related Links -> Select Advanced View -> Check for Reverse If False field is Checked and OnLoad is Checked 

 

As per your Provided Attachment , Short Description is Regional Customer Valid

 

Change the Condition to 

Short description Contains Regional Customer Valid

 

Thanks Regards

Badrinarayan

Hi @Badrinarayan ,

The filed became read-only in form view, but in list view it is editable. How do I make it read only in list view too?

Community Alums
Not applicable

Hi @Akhila P ,

 

You cannot make a field read-only using UI policy. Either you need to go for an On-cell edit client script or an ACL would also work. 

But, this cannot be achieved using an UI policy.

 

write listedit ACL with conditions

Hi @Akhila P ,

 

If you Want to make Field ReadOnly in the List View  then ,

 

1) elevate your role as security_admin

2) create new list edit ACL on Your table and field as field_name

3) use advanced checkbox as true

4) admin overrides uncheck - means even admin cannot list edit

4) In the script Field type

 

answer = false;

 

 

Screenshot 2024-09-16 at 6.01.06 PM.png

 

Other way is With  OnCellEdit Client Script 

 

Client Script Details:

  • Name: OnCellEdit - Your Table
  • Table: Your Table
  • UI Type: All
  • Type: OnCellEdit
  • Field Name: your_field (select the appropriate field)

Screenshot 2024-09-16 at 5.54.36 PM.png

 

 

function onCellEdit(sysIDs, table, oldValues, newValue, callback) {
  var saveAndClose =true;
 //Type appropriate comment here, and begin script below
 saveAndClose =false;
 callback(saveAndClose); 
}

 

 

You can edit the record in the List view using the OnCellEdit Client Script, but it will not be updated on the server side.

If my answer is Helpful , please click the thumb icon and mark it as correct!

 

Thanks Regards
Badrinarayan