UI Policy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2023 03:42 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2023 03:56 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2023 04:10 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2023 03:59 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2023 05:16 AM
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