- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2016 04:11 AM
Hi All;
In change form we have lots of mandatory fields depends on the state/type of change. When user need to cancel the change he/she not to ask to fill the mandatory fields depends in which state he/she cancelling.
I can use g_form.setMandatory("FiledName" , false). But again I need to write code for all the mandatory fields (its around 30+) .
Is there any other way to remove/disable all the mandatory fields using single line code.
Thanks in Advance.
Balaji Prusty.
Solved! Go to Solution.
- 11,851 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2016 03:50 AM
I am not getting the Close the loop / Answered under Action....I was looking for this option.
All my previous threads are still open due to this...not sure what/whom need to contact to get this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2016 04:12 AM
Use this just before the save or submit.
g_form.checkMandatory = false;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2016 05:58 AM
Hi Anurag;
Thanks it works fine. But I need to make mandatory to one field (Close Notes) except all. But it applying all the field.
I used like this below but it not asks to fill close notes while saving.
g_form.checkMandatory = false; | ||
g_form.setMandatory('close_notes', true);

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2016 06:03 AM
Hi Balaji,
You may find below thread helpful.
Saving a record without populating all mandatory variables
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2016 08:26 AM
g_form.checkMandatory = false; will make these fields non mandatory from the form, client side. You can add a data policy that will make close_notes mandatory. Data policies will still mandate the field . I think this should work.