g_form.setValue onSubmit client Script

n_kishore
Giga Contributor

Hi

I am trying to set values of the field on submit with the response which i get from my SOAP call and i am able to see that in alert.
but i am not able to set that to my string fields can you please let me know what am i doing wrong in below statement.

function onSubmit()

{

pdetail = *******************

alert(pdetail);

  g_form.setValue('pallete_detail', pdetail);

  g_form.setValue('palletesource', "pdetail");

  }

7 REPLIES 7

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hi Nanda,



Is the field column name correct. pallete_detail?


If it is custom field it should be u_pallete_detail. Can you right click on field and check for show XXX i.e the column name of the field.


Hi pradeep,


Yes,   my field values are correct. i dont have any u_ in front of those fields.
Will the g_form.setValue work on submit?



Thanks,


Nanda


Yes. Can you please paste your script here.