how to make field mandatory using script in UI policy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-14-2016 10:37 PM
how to make field mandatory using script in UI policy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-15-2016 01:36 AM
@u r answer correct and before runscript what field to change write a condition to that field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-15-2016 02:20 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-16-2024 10:32 AM
Add the following code to the UI Policy Script section.
g_form.setMandatory('field_name', true); // Make the field mandatory
eg: g_form.setMandatory('short_description', true); }
// to make the field non-mandatory under certain conditions, you can set false.
g_form.setMandatory('field_name', false);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-12-2024 11:49 PM
I had this same problem, and I found out that you can create a UI Policy with the correct conditions on "When to apply", and then save it. Then you have the possibility to create UI Policy Actions, where you can set which fields you want to be mandatory. This way you don't have to script it.