How to save a record from client side script

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2016 06:39 AM
Dear Folks,
Is there any way to save a field value from client side script.I was using the below script :
g_form.setValue("u_risk_assessment_check",'false');
g_form.save();
but is not saving the value. The value is getting set but it vanishes while the form is reloaded.
function invokeAssessment() {
g_form.hideAllFieldMsgs();
g_form.setValue("u_risk_assessment_check",'false');
g_form.save();
var id = g_form.getUniqueValue();
//For risk assessment question "Has a recent incident been raised against the Assignment or Affected CI's?"
var v_ga = new GlideAjax("jnjChgRiskAssessment");
v_ga.addParam("sysparm_name", "riskQuestions");
v_ga.addParam("sysparm_id1", id);
v_ga.addParam("sysparm_class1", "change_request");
v_ga.getXMLAnswer(function (res1){
res2=res1;
});
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2016 06:07 AM
Hi All,
I tried using g_form.save(); and its saving value on the form. But the form is continuously loading.
Is there anything which i am missing?
Please suggest.
Thanks,
Bhushan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2018 02:40 PM
Did you figure out the solution for this. If so, please let me know. Even I have the same issue.
Thanks in advance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2018 02:44 PM
could you please share script here??
Please mark my response as correct and helpful if it helped solved your question.
-Thanks