UI Policy

Manu143
Tera Contributor

Hi Community,

 

  How to make filed read only using UI policy only when user hit the save button i.e when data get save to Data base at . As of now my UI policy is making filed read only before saving the record & when I just try to put any value.

 

 

Thanks,

Manu

4 REPLIES 4

Hi  ai

 Thanks for the reply I did it in the same way but before saving the data if I try to select any value its getting mandatory.

 

Thanks,

Manu

 
 
 

Hi @Manu143 ,

 

Could you please share the screenshot of what you have  already done ?

 

Thank You 

Swathi


Hope this solves your question. if it does, please mark my response helpful and solution accepted.

Thank you
Swathi Sarang

Hi @Manu143 

 

UI policy - It is works on  client side only ,maybe you can write on submit client script it will works on form submiting time.

Thanks.

 

Amarjeet Pal
Kilo Sage
Kilo Sage

Hello @Manu143 ,

1. Create a new UI policy: Go to "System Policy" > "UI Policies" and click on "New".

2. Define the conditions for your UI policy: Set the conditions under which you want your field to be read-only.

3. Add an action to your UI policy: Select "Action - Client Script" and add a script that sets your field to read-only. Here's an example script:

```
function onSubmit() {
    g_form.setReadOnly('field_name', true);
}
```

Make sure to replace `'field_name'` with the actual name of the field that you want to make read-only.

4. Save your UI policy: Once you're done configuring your policy, save it so it becomes active.

 

Thanks

Amarjeet Pal