Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Need to autosave the form through the script include

SK41
Giga Guru

Hi,

 

I have a requirement where I need to autosave the form through the script include/server side. How can I do that?

 

8 REPLIES 8

Sandeep Rajput
Tera Patron
Tera Patron

@SK41 What do you mean by autosave, the form would only get saved once the user submits it via the submit/save/update UI Actions.

autosave means through script. There is no UI action to save. When the user selects the value of a field it should get autosave via script. Like we use g_form.save in client side.What can be used in server side script to auto save the form

@SK41 You can implement this by calling a server side method using GlideAjax inside various onChange scripts which will run with respect to different fields available on the form. However, I will not recommend this approach as it will end up making a lot of GlideAjax call on your server and the performance would ultimately take a hit.

Could you suggest the method that will be used to autosave from serve side. I think g_form.save cannot be used, what function is used to auto save through server side.