The CreatorCon Call for Content is officially open! Get started here.

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

OK, that rules out the length issue.


anurag92
Kilo Sage

Yes, getXMLWait does not work in application scopes. Can you try something like setTimout?


neethu4
Giga Expert

any other suggestion to set the value before giving control of the form to user?


neethu4
Giga Expert

I have achieved this through workflow run script.


Thanks everyone for your response.