Alert a Message and Notification on change of any field on the form

kavyahv
Kilo Contributor

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

1 ACCEPTED SOLUTION

Abhinandan Pati
Giga Guru

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


View solution in original post

18 REPLIES 18

Hi Abhinandan,



Is there any method to get the previous value using 'GlideScriptRecordUtil' .



Thanks & Regards,


Kavya


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


pravalika2
Kilo Expert

Hi Kavya,



try this onsubmit client script:



if(g_form.modified){


        return confirm('Please fill additional comments');


}



Thanks,


Poojitha


kavyahv
Kilo Contributor

Thank you all for your solutions.