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 Abhinay,



A business rule would work.



Kavya,



Were you looking to get this alert dynamically (immediately as each field is changed) or after submit and send one notification with all fields changed grouped together?


Hi Ctomasi,



Can you please suggest a solution for this



Thanks & Regards,


Kavya


Hi kavya,



You can use business rule on insert/update for this...



Choose advanced and write script like



if(current.assignment_group.changes())


{



gs.eventQueue("field changed",current,gs.getUserId(),gs.getUsername());


}



Then create an event by going to event registry .Do same for other fields in same code.I hope this helps



Mark Correct if it solved your issue or hit Like and Helpful if you find my response worthy.


Thanks,
Deepa


kavyahv
Kilo Contributor

Hi Ctomasi,Abhinay,



Thanks for your response.


I alert should be displayed and comments should be made mandatory if any field changes dynamically.


If it cant be done dynamically I would opt for on submit.



Regards,


Kavya


Hi, have a Onchange Client Script in which you can have event based notification to be triggered.



have a UI policy in which have condition like field is different from field. or have it mandatory thru On change client script also.



But problem in your condition is like notification will be triggered each time field changes