- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2016 10:25 AM
Dear All,
I need to alert a message and a notification needs to be triggered on change of any of the field on the form.
Please help.
Thanks & Regards,
Kavya
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2016 02:45 AM
Hi Kavya,
You can use 'g_form.modified method to check for changes on the form. And on the server side you can make use of 'GlideScriptRecordUtil' methods. Below mentioned wonderful SNOWGuru article should help you
http://www.servicenowguru.com/scripting/business-rules-scripting/checking-modified-fields-script/
Thanks,
Abhinandan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-01-2016 02:11 AM
Hi Abhinandan,
Is there any method to get the previous value using 'GlideScriptRecordUtil' .
Thanks & Regards,
Kavya

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-01-2016 03:27 AM
Hi Kavya,
You can make use of 'previous' object in Business Rules to get the previous values of fields.This object is available on update and delete operations.But this is not available on asynch operations. Refer below link
Scripting in Business Rules - ServiceNow Wiki
Thanks,
Abhinandan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2016 03:23 AM
Hi Kavya,
try this onsubmit client script:
if(g_form.modified){
return confirm('Please fill additional comments');
}
Thanks,
Poojitha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2016 10:15 AM
Thank you all for your solutions.