how to parse xml response from netsuite

Mahesh120
Tera Expert

Hi Team,

Unable to parse received xml response using SOAP Request.

Please find the attached xml response record.

var xmlDoc = new XMLDocument(respBody);

var nodes = xmlDoc.getNodes("//searchRowList/*");

var theStr = '';

for(var i = 0 ; i < nodes.length ; i++){

theStr = nodes.item(i).getTextContent()+'\n';

gs.print(theStr);

}

And the response is as follows

*** Script: Record Internal IDWalt.JohnseyInput textSymboticCorey.Ebbers. 
*** Script: Record Internal IDWalt.JohnseyInput textSymbotic.Corey.Ebbers2014-10-22T07:00:00.000-07:00Corey.Ebbers2014-10-22T07:30:00.000-07:00
*** Script: Record Internal IDWalt.JohnseyInput textSymboticCaren.ShwadCorey.Ebbers.
*** Script: Record Internal IDWalt.JohnseyInput textSymbotic.Corey.Ebbers2014-12-01T06:00:00.000-08:00Caren.Shwad2014-12-01T06:59:59.000-08:00
*** Script: Record Internal IDWalt.JohnseyInput textSymbotic.Corey.Ebbers2014-12-01T06:00:00.000-08:00Caren.Shwad2014-12-02T06:59:59.000-08:00
*** Script: Record Internal IDWalt.JohnseyInput textSymboticGregg.W. Steinhafelrewgweryhedgs asjkhashlkfCorey.Ebbers.

But interested in to get out put as follows

Record Internal ID = 1

custrecord_erc_primarycontactid = Corey.Ebbers

custrecord_erc_secondarycontactid = Walt.Johnsey

Any help on this would be much appreciated.

--Mahesh.

9 REPLIES 9

can you paste gs.log(respBody) here please?


[0:00:00.341] Script completed: script



*** Script: <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Header><platformMsgs:documentInfo xmlns:platformMsgs="urn:messages_2014_2.platform.webservices.netsuite.com"><platformMsgs:nsId>WEBSERVICES_3434368_0207201517416312741757409556_85eb459a82b</platformMsgs:nsId></platformMsgs:documentInfo></soapenv:Header><soapenv:Body><searchResponse xmlns="urn:messages_2014_2.platform.webservices.netsuite.com"><platformCore:searchResult xmlns:platformCore="urn:core_2014_2.platform.webservices.netsuite.com"><platformCore:status isSuccess="true"/><platformCore:totalRecords>6</platformCore:totalRecords><platformCore:pageSize>1000</platformCore:pageSize><platformCore:totalPages>1</platformCore:totalPages><platformCore:pageIndex>1</platformCore:pageIndex><platformCore:searchId>WEBSERVICES_3434368_0207201517416312741757409556_85eb459a82b</platformCore:searchId><platformCore:searchRowList><platformCore:searchRow xsi:type="setupCustom:CustomRecordSearchRow" xmlns:setupCustom="urn:customization_2014_2.setup.webservices.netsuite.com"><setupCustom:basic xmlns:platformCommon="urn:common_2014_2.platform.webservices.netsuite.com"><platformCommon:recType internalId="77"/><platformCommon:internalId><platformCore:searchValue internalId="1"/><platformCore:customLabel>Record Internal ID</platformCore:customLabel></platformCommon:internalId><platformCommon:customFieldList><platformCore:customField internalId="905" scriptId="custrecord_erc_changetype" xsi:type="platformCore:SearchColumnSelectCustomField"><platformCore:searchValue internalId="2" typeId="79"/></platformCore:customField><platformCore:customField internalId="904" scriptId="custrecord_erc_2ndcontact" xsi:type="platformCore:SearchColumnSelectCustomField"><platformCore:searchValue internalId="3787" typeId="-6"/></platformCore:customField><platformCore:customField internalId="927" scriptId="custrecord_erc_secondarycontactid" xsi:type="platformCore:SearchColumnStringCustomField"><platformCore:searchValue>Walt.Johnsey</platformCore:searchValue></platformCore:customField><platformCore:customField internalId="908" scriptId="custrecord_erc_shortdesc" xsi:type="platformCore:SearchColumnStringCustomField"><platformCore:searchValue>Input text</platformCore:searchValue></platformCore:customField><platformCore:customField internalId="918" scriptId="custrecord_erc_contacted" xsi:type="platformCore:SearchColumnSelectCustomField"><platformCore:searchValue internalId="2" typeId="82"/></platformCore:customField><platformCore:customField internalId="907" scriptId="custrecord_erc_vendorother" xsi:type="platformCore:SearchColumnStringCustomField"><platformCore:searchValue>Symbotic</platformCore:searchValue></platformCore:customField><platformCore:customField internalId="917" scriptId="custrecord_erc_implemduration" xsi:type="platformCore:SearchColumnSelectCustomField"><platformCore:searchValue internalId="1" typeId="84"/></platformCore:customField><platformCore:customField internalId="910" scriptId="custrecord_erc_whichendpoints" xsi:type="platformCore:SearchColumnSelectCustomField"><platformCore:searchValue internalId="1" typeId="81"/></platformCore:customField><platformCore:customField internalId="914" scriptId="custrecord_erc_knowimplementationdate" xsi:type="platformCore:SearchColumnSelectCustomField"><platformCore:searchValue internalId="2" typeId="82"/></platformCore:customField><platformCore:customField internalId="926" scriptId="custrecord_erc_primarycontactid" xsi:type="platformCore:SearchColumnStringCustomField"><platformCore:searchValue>Corey.Ebbers</platformCore:searchValue></platformCore:customField><platformCore:customField internalId="902" scriptId="custrecord_erc_scheduletype" xsi:type="platformCore:SearchColumnSelectCustomField"><platformCore:searchValue internalId="1" typeId="78"/></platformCore:customField><platformCore:customField internalId="909" scriptId="custrecord_erc_changeendpoints" xsi:type="platformCore:SearchColumnSelectCustomField"><platformCore:searchValue internalId="1" typeId="80"/></platformCore:customField><platformCore:customField internalId="911" scriptId="custrecord_erc_outrage_degration" xsi:type="platformCore:SearchColumnSelectCustomField"><platformCore:searchValue internalId="2" typeId="82"/></platformCore:customField><platformCore:customField internalId="928" scriptId="custrecord_erc_whoiscontactid" xsi:type="platformCore:SearchColumnStringCustomField"><platformCore:searchValue>.</platformCore:searchValue></platformCore:customField><platformCore:customField internalId="913" scriptId="custrecord_erc_enduserlocation" xsi:type="platformCore:SearchColumnSelectCustomField"><platformCore:searchValue internalId="3" typeId="83"/></platformCore:customField><platformCore:customField internalId="903" scriptId="custrecord_erc_primarycontact" xsi:type="platformCore:SearchColumnSelectCustomField"><platformCore:searchValue internalId="3786" typeId="-6"/></platformCore:customField></platformCommon:customFieldList></setupCustom:basic></platformCore:searchRow><platformCore:searchRow xsi:type="setupCustom:CustomRecordSearchRow" xmlns:setupCustom="urn:customization_2014_2.setup.webservices.netsuite.com"><setupCustom:basic xmlns:platformCommon="urn:common_2014_2.platform.webservices.netsuite.com"><platformCommon:recType internalId="77"/><platformCommon:internalId><platformCore:searchValue internalId="2"/><platformCore:customLabel>Record Internal ID</platformCore:customLabel></platformCommon:internalId><platformCommon:customFieldList><platformCore:customField internalId="905" scriptId="custrecord_erc_changetype" xsi:type="platformCore:SearchColumnSelectCustomField"><platformCore:searchValue internalId="2" typeId="79"/></platformCore:customField><platformCore:customField internalId="904" scriptId="custrecord_erc_2ndcontact" xsi:type="platformCore:SearchColumnSelectCustomField"><platformCore:searchValue internalId="3787" typeId="-6"/></platformCore:customField><platformCore:customField internalId="927" scriptId="custrecord_erc_secondarycontactid" xsi:type="platformCore:SearchColumnStringCustomField"><platformCore:searchValue>Walt.Johnsey</platformCore:searchValue></platformCore:customField><platformCore:customField internalId="908" scriptId="custrecord_erc_shortdesc" xsi:type="platformCore:SearchColumnStringCustomField"><platformCore:searchValue>Input text</platformCore:searchValue></platformCore:customField><platformCore:customField internalId="918" scriptId="custrecord_erc_contacted" xsi:type="platformCore:SearchColumnSelectCustomField"><platformCore:searchValue internalId="2" typeId="82"/></platformCore:customField><platformCore:customField internalId="907" scriptId="custrecord_erc_vendorother" xsi:type="platformCore:SearchColumnStringCustomField"><platformCore:searchValue>Symbotic</platformCore:searchValue></platformCore:customField><platformCore:customField internalId="917" scriptId="custrecord_erc_implemduration" xsi:type="platformCore:SearchColumnSelectCustomField"><platformCore:searchValue internalId="1" typeId="84"/></platformCore:customField><platformCore:customField internalId="910" scriptId="custrecord_erc_whichendpoints" xsi:type="platformCore:SearchColumnSelectCustomField"><platformCore:searchValue internalId="1" typeId="81"/></platformCore:customField><platformCore:customField internalId="929" scriptId="custrecord_erc_workingwithid" xsi:type="platformCore:SearchColumnStringCustomField"><platformCore:searchValue>.</platformCore:searchValue></platformCore:customField><platformCore:customField internalId="914" scriptId="custrecord_erc_knowimplementationdate" xsi:type="platformCore:SearchColumnSelectCustomField"><platformCore:searchValue internalId="1" typeId="82"/></platformCore:customField><platformCore:customField internalId="926" scriptId="custrecord_erc_primarycontactid" xsi:type="platformCore:SearchColumnStringCustomField"><platformCore:searchValue>Corey.Ebbers</platformCore:searchValue></platformCore:customField><platformCore:customField internalId="902" scriptId="custrecord_erc_scheduletype" xsi:type="platformCore:SearchColumnSelectCustomField"><platformCore:searchValue internalId="1" typeId="78"/></platformCore:customField><platformCore:customField internalId="909" scriptId="custrecord_erc_changeendpoints" xsi:type="platformCore:SearchColumnSelectCustomField"><platformCore:searchValue internalId="1" typeId="80"/></platformCore:customField><platformCore:customField internalId="915" scriptId="custrecord_erc_implem_startdate" xsi:type="platformCore:SearchColumnDateCustomField"><platformCore:searchValue>2014-10-22T07:00:00.000-07:00</platformCore:searchValue></platformCore:customField><platformCore:customField internalId="911" scriptId="custrecord_erc_outrage_degration" xsi:type="platformCore:SearchColumnSelectCustomField"><platformCore:searchValue internalId="1" typeId="82"/></platformCore:customField><platformCore:customField internalId="928" scriptId="custrecord_erc_whoiscontactid" xsi:type="platformCore:SearchColumnStringCustomField"><platformCore:searchValue>Corey.Ebbers</platformCore:searchValue></platformCore:customField><platformCore:customField internalId="930" scriptId="custrecord_erc_whocontact" xsi:type="platformCore:SearchColumnSelectCustomField"><platformCore:searchValue internalId="3786" typeId="-6"/></platformCore:customField><platformCore:customField internalId="913" scriptId="custrecord_erc_enduserlocation" xsi:type="platformCore:SearchColumnSelectCustomField"><platformCore:searchValue internalId="3" typeId="83"/></platformCore:customField><platformCore:customField internalId="903" scriptId="custrecord_erc_primarycontact" xsi:type="platformCore:SearchColumnSelectCustomField"><platformCore:searchValue internalId="3786" typeId="-6"/></platformCore:customField><platformCore:customField internalId="916" scriptId="custrecord_erc_implem_enddate" xsi:type="platformCore:SearchColumnDateCustomField"><platformCore:searchValue>2014-10-22T07:30:00.000-07:00</platformCore:searchValue></platformCore:customField></platformCommon:customFieldList></setupCustom:basic></platformCore:searchRow><platformCore:searchRow xsi:type="setupCustom:CustomRecordSearchRow" xmlns:setupCustom="urn:customization_2014_2.setup.webservices.netsuite.com"><setupCustom:basic xmlns:platformCommon="urn:common_2014_2.platform.webservices.netsuite.com"><platformCommon:recType internalId="77"/><platformCommon:internalId><platformCore:searchValue internalId="3"/><platformCore:customLabel>Record Internal ID</platformCore:customLabel></platformCommon:internalId><platformCommon:customFieldList><platformCore:customField internalId="905" scriptId="custrecord_erc_changetype" xsi:type="platformCore:SearchColumnSelectCustomField"><platformCore:searchValue internalId="2" typeId="79"/></platformCore:customField><platformCore:customField internalId="904" scriptId="custrecord_erc_2ndcontact" xsi:type="platformCore:SearchColumnSelectCustomField"><platformCore:searchValue internalId="3787" typeId="-6"/></platformCore:customField><platformCore:customField internalId="927" scriptId="custrecord_erc_secondarycontactid" xsi:type="platformCore:SearchColumnStringCustomField"><platformCore:searchValue>Walt.Johnsey</platformCore:searchValue></platformCore:customField><platformCore:customField internalId="908" scriptId="custrecord_erc_shortdesc" xsi:type="platformCore:SearchColumnStringCustomField"><platformCore:searchValue>Input text</platformCore:searchValue></platformCore:customField><platformCore:customField internalId="918" scriptId="custrecord_erc_contacted" xsi:type="platformCore:SearchColumnSelectCustomField"><platformCore:searchValue internalId="2" typeId="82"/></platformCore:customField><platformCore:customField internalId="907" scriptId="custrecord_erc_vendorother" xsi:type="platformCore:SearchColumnStringCustomField"><platformCore:searchValue>Symbotic</platformCore:searchValue></platformCore:customField><platformCore:customField internalId="910" scriptId="custrecord_erc_whichendpoints" xsi:type="platformCore:SearchColumnSelectCustomField"><platformCore:searchValue internalId="1" typeId="81"/></platformCore:customField><platformCore:customField internalId="929" scriptId="custrecord_erc_workingwithid" xsi:type="platformCore:SearchColumnStringCustomField"><platformCore:searchValue>Caren.Shwad</platformCore:searchValue></platformCore:customField><platformCore:customField internalId="924" scriptId="custrecord_erc_reviseddocument" xsi:type="platformCore:SearchColumnSelectCustomField"><platformCore:searchValue internalId="2" typeId="82"/></platformCore:customField><platformCore:customField internalId="926" scriptId="custrecord_erc_primarycontactid" xsi:type="platformCore:SearchColumnStringCustomField"><platformCore:searchValue>Corey.Ebbers</platformCore:searchValue></platformCore:customField><platformCore:customField internalId="902" scriptId="custrecord_erc_scheduletype" xsi:type="platformCore:SearchColumnSelectCustomField"><platformCore:searchValue internalId="3" typeId="78"/></platformCore:customField><platformCore:customField internalId="909" scriptId="custrecord_erc_changeendpoints" xsi:type="platformCore:SearchColumnSelectCustomField"><platformCore:searchValue internalId="1" typeId="80"/></platformCore:customField><platformCore:customField internalId="928" scriptId="custrecord_erc_whoiscontactid" xsi:type="platformCore:SearchColumnStringCustomField"><platformCore:searchValue>.</platformCore:searchValue></platformCore:customField><platformCore:customField internalId="923" scriptId="custrecord_erc_workingwith" xsi:type="platformCore:SearchColumnSelectCustomField"><platformCore:searchValue internalId="2892" typeId="-6"/></platformCore:customField><platformCore:customField internalId="913" scriptId="custrecord_erc_enduserlocation" xsi:type="platformCore:SearchColumnSelectCustomField"><platformCore:searchValue internalId="3" typeId="83"/></platformCore:customField><platformCore:customField internalId="903" scriptId="custrecord_erc_primarycontact" xsi:type="platformCore:SearchColumnSelectCustomField"><platformCore:searchValue internalId="3786" typeId="-6"/></platformCore:customField></platformCommon:customFieldList></setupCustom:basic></platformCore:searchRow><platformCore:searchRow xsi:type="setupCustom:CustomRecordSearchRow" xmlns:setupCustom="urn:customization_2014_2.setup.webservices.netsuite.com"><setupCustom:basic xmlns:platformCommon="urn:common_2014_2.platform.webservices.netsuite.com"><platformCommon:recType internalId="77"/><platformCommon:internalId><platformCore:searchValue internalId="4"/><platformCore:customLabel>Record Internal ID</platformCore:customLabel></platformCommon:internalId><platformCommon:customFieldList><platformCore:customField internalId="905" scriptId="custrecord_erc_changetype" xsi:type="platformCore:SearchColumnSelectCustomField"><platformCore:searchValue internalId="2" typeId="79"/></platformCore:customField><platformCore:customField internalId="904" scriptId="custrecord_erc_2ndcontact" xsi:type="platformCore:SearchColumnSelectCustomField"><platformCore:searchValue internalId="3787" typeId="-6"/></platformCore:customField><platformCore:customField internalId="927" scriptId="custrecord_erc_secondarycontactid" xsi:type="platformCore:SearchColumnStringCustomField"><platformCore:searchValue>Walt.Johnsey</platformCore:searchValue></platformCore:customField><platformCore:customField internalId="908" scriptId="custrecord_erc_shortdesc" xsi:type="platformCore:SearchColumnStringCustomField"><platformCore:searchValue>Input text</platformCore:searchValue></platformCore:customField><platformCore:customField internalId="918" scriptId="custrecord_erc_contacted" xsi:type="platformCore:SearchColumnSelectCustomField"><platformCore:searchValue internalId="2" typeId="82"/></platformCore:customField><platformCore:customField internalId="907" scriptId="custrecord_erc_vendorother" xsi:type="platformCore:SearchColumnStringCustomField"><platformCore:searchValue>Symbotic</platformCore:searchValue></platformCore:customField><platformCore:customField internalId="910" scriptId="custrecord_erc_whichendpoints" xsi:type="platformCore:SearchColumnSelectCustomField"><platformCore:searchValue internalId="1" typeId="81"/></platformCore:customField><platformCore:customField internalId="929" scriptId="custrecord_erc_workingwithid" xsi:type="platformCore:SearchColumnStringCustomField"><platformCore:searchValue>.</platformCore:searchValue></platformCore:customField><platformCore:customField internalId="914" scriptId="custrecord_erc_knowimplementationdate" xsi:type="platformCore:SearchColumnSelectCustomField"><platformCore:searchValue internalId="1" typeId="82"/></platformCore:customField><platformCore:customField internalId="926" scriptId="custrecord_erc_primarycontactid" xsi:type="platformCore:SearchColumnStringCustomField"><platformCore:searchValue>Corey.Ebbers</platformCore:searchValue></platformCore:customField><platformCore:customField internalId="902" scriptId="custrecord_erc_scheduletype" xsi:type="platformCore:SearchColumnSelectCustomField"><platformCore:searchValue internalId="1" typeId="78"/></platformCore:customField><platformCore:customField internalId="909" scriptId="custrecord_erc_changeendpoints" xsi:type="platformCore:SearchColumnSelectCustomField"><platformCore:searchValue internalId="1" typeId="80"/></platformCore:customField><platformCore:customField internalId="915" scriptId="custrecord_erc_implem_startdate" xsi:type="platformCore:SearchColumnDateCustomField"><platformCore:searchValue>2014-12-01T06:00:00.000-08:00</platformCore:searchValue></platformCore:customField><platformCore:customField internalId="911" scriptId="custrecord_erc_outrage_degration" xsi:type="platformCore:SearchColumnSelectCustomField"><platformCore:searchValue internalId="2" typeId="82"/></platformCore:customField><platformCore:customField internalId="928" scriptId="custrecord_erc_whoiscontactid" xsi:type="platformCore:SearchColumnStringCustomField"><platformCore:searchValue>Caren.Shwad</platformCore:searchValue></platformCore:customField><platformCore:customField internalId="930" scriptId="custrecord_erc_whocontact" xsi:type="platformCore:SearchColumnSelectCustomField"><platformCore:searchValue internalId="2892" typeId="-6"/></platformCore:customField><platformCore:customField internalId="913" scriptId="custrecord_erc_enduserlocation" xsi:type="platformCore:SearchColumnSelectCustomField"><platformCore:searchValue internalId="3" typeId="83"/></platformCore:customField><platformCore:customField internalId="903" scriptId="custrecord_erc_primarycontact" xsi:type="platformCore:SearchColumnSelectCustomField"><platformCore:searchValue internalId="3786" typeId="-6"/></platformCore:customField><platformCore:customField internalId="916" scriptId="custrecord_erc_implem_enddate" xsi:type="platformCore:SearchColumnDateCustomField"><platformCore:searchValue>2014-12-01T06:59:59.000-08:00</platformCore:searchValue></platformCore:customField></platformCommon:customFieldList></setupCustom:basic></platformCore:searchRow><platformCore:searchRow xsi:type="setupCustom:CustomRecordSearchRow" xmlns:setupCustom="urn:customization_2014_2.setup.webservices.netsuite.com"><setupCustom:basic xmlns:platformCommon="urn:common_2014_2.platform.webservices.netsuite.com"><platformCommon:recType internalId="77"/><platformCommon:internalId><platformCore:searchValue internalId="5"/><platformCore:customLabel>Record Internal ID</platformCore:customLabel></platformCommon:internalId><platformCommon:customFieldList><platformCore:customField internalId="905" scriptId="custrecord_erc_changetype" xsi:type="platformCore:SearchColumnSelectCustomField"><platformCore:searchValue internalId="2" typeId="79"/></platformCore:customField><platformCore:customField internalId="904" scriptId="custrecord_erc_2ndcontact" xsi:type="platformCore:SearchColumnSelectCustomField"><platformCore:searchValue internalId="3787" typeId="-6"/></platformCore:customField><platformCore:customField internalId="927" scriptId="custrecord_erc_secondarycontactid" xsi:type="platformCore:SearchColumnStringCustomField"><platformCore:searchValue>Walt.Johnsey</platformCore:searchValue></platformCore:customField><platformCore:customField internalId="908" scriptId="custrecord_erc_shortdesc" xsi:type="platformCore:SearchColumnStringCustomField"><platformCore:searchValue>Input text</platformCore:searchValue></platformCore:customField><platformCore:customField internalId="918" scriptId="custrecord_erc_contacted" xsi:type="platformCore:SearchColumnSelectCustomField"><platformCore:searchValue internalId="2" typeId="82"/></platformCore:customField><platformCore:customField internalId="907" scriptId="custrecord_erc_vendorother" xsi:type="platformCore:SearchColumnStringCustomField"><platformCore:searchValue>Symbotic</platformCore:searchValue></platformCore:customField><platformCore:customField internalId="910" scriptId="custrecord_erc_whichendpoints" xsi:type="platformCore:SearchColumnSelectCustomField"><platformCore:searchValue internalId="1" typeId="81"/></platformCore:customField><platformCore:customField internalId="929" scriptId="custrecord_erc_workingwithid" xsi:type="platformCore:SearchColumnStringCustomField"><platformCore:searchValue>.</platformCore:searchValue></platformCore:customField><platformCore:customField internalId="914" scriptId="custrecord_erc_knowimplementationdate" xsi:type="platformCore:SearchColumnSelectCustomField"><platformCore:searchValue internalId="1" typeId="82"/></platformCore:customField><platformCore:customField internalId="926" scriptId="custrecord_erc_primarycontactid" xsi:type="platformCore:SearchColumnStringCustomField"><platformCore:searchValue>Corey.Ebbers</platformCore:searchValue></platformCore:customField><platformCore:customField internalId="902" scriptId="custrecord_erc_scheduletype" xsi:type="platformCore:SearchColumnSelectCustomField"><platformCore:searchValue internalId="1" typeId="78"/></platformCore:customField><platformCore:customField internalId="909" scriptId="custrecord_erc_changeendpoints" xsi:type="platformCore:SearchColumnSelectCustomField"><platformCore:searchValue internalId="1" typeId="80"/></platformCore:customField><platformCore:customField internalId="915" scriptId="custrecord_erc_implem_startdate" xsi:type="platformCore:SearchColumnDateCustomField"><platformCore:searchValue>2014-12-01T06:00:00.000-08:00</platformCore:searchValue></platformCore:customField><platformCore:customField internalId="911" scriptId="custrecord_erc_outrage_degration" xsi:type="platformCore:SearchColumnSelectCustomField"><platformCore:searchValue internalId="2" typeId="82"/></platformCore:customField><platformCore:customField internalId="928" scriptId="custrecord_erc_whoiscontactid" xsi:type="platformCore:SearchColumnStringCustomField"><platformCore:searchValue>Caren.Shwad</platformCore:searchValue></platformCore:customField><platformCore:customField internalId="930" scriptId="custrecord_erc_whocontact" xsi:type="platformCore:SearchColumnSelectCustomField"><platformCore:searchValue internalId="2892" typeId="-6"/></platformCore:customField><platformCore:customField internalId="913" scriptId="custrecord_erc_enduserlocation" xsi:type="platformCore:SearchColumnSelectCustomField"><platformCore:searchValue internalId="3" typeId="83"/></platformCore:customField><platformCore:customField internalId="903" scriptId="custrecord_erc_primarycontact" xsi:type="platformCore:SearchColumnSelectCustomField"><platformCore:searchValue internalId="3786" typeId="-6"/></platformCore:customField><platformCore:customField internalId="916" scriptId="custrecord_erc_implem_enddate" xsi:type="platformCore:SearchColumnDateCustomField"><platformCore:searchValue>2014-12-02T06:59:59.000-08:00</platformCore:searchValue></platformCore:customField></platformCommon:customFieldList></setupCustom:basic></platformCore:searchRow><platformCore:searchRow xsi:type="setupCustom:CustomRecordSearchRow" xmlns:setupCustom="urn:customization_2014_2.setup.webservices.netsuite.com"><setupCustom:basic xmlns:platformCommon="urn:common_2014_2.platform.webservices.netsuite.com"><platformCommon:recType internalId="77"/><platformCommon:internalId><platformCore:searchValue internalId="6"/><platformCore:customLabel>Record Internal ID</platformCore:customLabel></platformCommon:internalId><platformCommon:customFieldList><platformCore:customField internalId="905" scriptId="custrecord_erc_changetype" xsi:type="platformCore:SearchColumnSelectCustomField"><platformCore:searchValue internalId="2" typeId="79"/></platformCore:customField><platformCore:customField internalId="904" scriptId="custrecord_erc_2ndcontact" xsi:type="platformCore:SearchColumnSelectCustomField"><platformCore:searchValue internalId="3787" typeId="-6"/></platformCore:customField><platformCore:customField internalId="927" scriptId="custrecord_erc_secondarycontactid" xsi:type="platformCore:SearchColumnStringCustomField"><platformCore:searchValue>Walt.Johnsey</platformCore:searchValue></platformCore:customField><platformCore:customField internalId="908" scriptId="custrecord_erc_shortdesc" xsi:type="platformCore:SearchColumnStringCustomField"><platformCore:searchValue>Input text</platformCore:searchValue></platformCore:customField><platformCore:customField internalId="918" scriptId="custrecord_erc_contacted" xsi:type="platformCore:SearchColumnSelectCustomField"><platformCore:searchValue internalId="2" typeId="82"/></platformCore:customField><platformCore:customField internalId="907" scriptId="custrecord_erc_vendorother" xsi:type="platformCore:SearchColumnStringCustomField"><platformCore:searchValue>Symbotic</platformCore:searchValue></platformCore:customField><platformCore:customField internalId="910" scriptId="custrecord_erc_whichendpoints" xsi:type="platformCore:SearchColumnSelectCustomField"><platformCore:searchValue internalId="1" typeId="81"/></platformCore:customField><platformCore:customField internalId="929" scriptId="custrecord_erc_workingwithid" xsi:type="platformCore:SearchColumnStringCustomField"><platformCore:searchValue>Gregg.W. Steinhafel</platformCore:searchValue></platformCore:customField><platformCore:customField internalId="924" scriptId="custrecord_erc_reviseddocument" xsi:type="platformCore:SearchColumnSelectCustomField"><platformCore:searchValue internalId="1" typeId="82"/></platformCore:customField><platformCore:customField internalId="925" scriptId="custrecord_erc_revisedscheddetail" xsi:type="platformCore:SearchColumnStringCustomField"><platformCore:searchValue>rewgweryhedgs asjkhashlkf</platformCore:searchValue></platformCore:customField><platformCore:customField internalId="926" scriptId="custrecord_erc_primarycontactid" xsi:type="platformCore:SearchColumnStringCustomField"><platformCore:searchValue>Corey.Ebbers</platformCore:searchValue></platformCore:customField><platformCore:customField internalId="902" scriptId="custrecord_erc_scheduletype" xsi:type="platformCore:SearchColumnSelectCustomField"><platformCore:searchValue internalId="3" typeId="78"/></platformCore:customField><platformCore:customField internalId="909" scriptId="custrecord_erc_changeendpoints" xsi:type="platformCore:SearchColumnSelectCustomField"><platformCore:searchValue internalId="1" typeId="80"/></platformCore:customField><platformCore:customField internalId="928" scriptId="custrecord_erc_whoiscontactid" xsi:type="platformCore:SearchColumnStringCustomField"><platformCore:searchValue>.</platformCore:searchValue></platformCore:customField><platformCore:customField internalId="923" scriptId="custrecord_erc_workingwith" xsi:type="platformCore:SearchColumnSelectCustomField"><platformCore:searchValue internalId="2891" typeId="-6"/></platformCore:customField><platformCore:customField internalId="913" scriptId="custrecord_erc_enduserlocation" xsi:type="platformCore:SearchColumnSelectCustomField"><platformCore:searchValue internalId="3" typeId="83"/></platformCore:customField><platformCore:customField internalId="903" scriptId="custrecord_erc_primarycontact" xsi:type="platformCore:SearchColumnSelectCustomField"><platformCore:searchValue internalId="3786" typeId="-6"/></platformCore:customField></platformCommon:customFieldList></setupCustom:basic></platformCore:searchRow></platformCore:searchRowList></platformCore:searchResult></searchResponse></soapenv:Body></soapenv:Envelope>

Hello Abhiram,



I have managed to the output in string as you mentioned above.


Appreciate if you can guide me the next steps?



Regards,


mahesh.


var xh = new XMLHelper(respBody);
var obj = xh.toObject();
gs.log(new JSON().encode(obj));
var results = obj['soapenv:Body']['searchResponse']['platformCore:searchResult']['platformCore:searchRowList']['platformCore:searchRow']



for(var i in results){


var result = results[i]['setupCustom:basic']['platformCommon:customFieldList']['platformCore:customField'];



for(var i in result){


for(var key in result[i]){

    gs.log(result[i][key]);


}

    }



}


ChrisBurks
Mega Sage

Maheswara,



If possible I was wondering if you could post a sample of a SOAP request for NetSuite? I am having an issue with setting up the body of a request. I get errors because of the abstract type of some of the elements. Much appreciated for any help with this.



Thanks