Set value in client script not working

neethu4
Giga Expert

Hi All,

I have written a client script and script include to pull bulk number of email id and setting these email ids in catalog field after submitting the form.

The email ids are coming from the script include but it is not setting into the field.

field type is Multi line Text

Client script

var product= g_form.getValue('product_line');

var ga = new GlideAjax('Test');

  ga.addParam('sysparm_name','getAllContactsofAccount');

  ga.addParam('sysparm_product', product);

  ga.getXML(returnContact);

function returnContact(response) {

var answer = response.responseXML.documentElement.getAttribute("answer");

alert(answer);

g_form.setValue('contact_email',answer);

}

23 REPLIES 23

arnabwa
Giga Guru

Hello Neethu,



Try putting some log statements and see what values are being stored in the variables used. This is the first line of debug. Let's start with this first.



Thanks,


Arnab


The values getting from script include is coma separated email ids.


And in client script also these value are stored in the 'answer' variable


Anurag Tripathi
Mega Patron
Mega Patron

Try this



g_form.setValue('contact_email',answer.toString());


-Anurag

I have tried this but no luck.


the value returning from script include also coma separated email ids.