- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
on 06-25-2015 05:07 PM
Recently, I was working on Change Form wherein I had to save the form if the user where to choose Yes in a select box and the form was modified. But the form modification would involve even the select box change. So there were two choices, one was to reset the value of the select box to original value and then check for g_form.modified which would be true only if any other field was modified. Alternatively, you can use the below script in your onChange function. The FIELDNAME would ideally be the name of the field and that typically is tablename.fieldName.
Using the below script you can skip the form modification feature for this field alone. Hope it help and any other suggestions are welcome.
g_form.fieldChanged("FIELDNAME", false);
- 11,987 Views
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
This was extremely helpful, saving a great deal of time and headache. Thank you for taking the time to share this Venkat.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
It is not working in our case in Istanbul version,
In a UI action, i'm not able to skip it even if I try all this, from the console, g_form.modified is still TRUE and the mesasge is shown.
g_form.modified=false;
for(var i in g_form.modifiedFields) {
g_form.fieldChanged(i, false);
g_form.modifiedFields[i]=false;
}
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hi Mathieu,
I tried in Jakarta and the above piece was working. Can you ensure whether in Istanbul, when you say g_form.modifiedFields you are getting an object with a key which is of the pattern tablename.fieldname?
g_form.modified is coming out to be false for me. Also i am in UI 16.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
@matclout2015
Where did you find documentation on g_form.modifiedFields ? I cannot find any documentation on this.
Thanks.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
There is no documentation on g_form.modifiedFields. I noticed it in the source code.