Discussions
Narrative Insights is Temporarily Unavailable due to an Infrastructure Issue. Learn how This Impacts Your Account and What to Expect While the Feature is Disabled.
Getting 'shipaddr2' from Sales Order returning 'shipaddr1'?
Hi,
I would like to get value of shipping address 2 from Sales Order. When I tried to do this, shipping address 1 is coming up as shipping address 2 . Following is a part of my code. Unable to understand if I am doing wrong somewhere. Any help is really appreciated.
var SoRec = nlapiLoadRecord('salesorder', SalesOrder);
var Add1 = SoRec.getFieldValue('shipaddr1');
if(Add1 != null){
Add1 = Add1.replace(/\s/g, "+");
nlapiLogExecution('debug', 'Add1', Add1);
}
else{
Add1 ='';
}
var Add2 = SoRec.getFieldValue('shipaddr2');
if(Add2 != null){
Add2 = Add1.replace(/\s/g, "+");
nlapiLogExecution('debug', 'Add2', Add2);
}
else{
Add2 ='';
}
Thanks,
Srujana.