ec
05/04/2023, 8:53 PMec
05/04/2023, 8:54 PMfunction addShippingAddress(soRec, payload) {
log.debug('shipaddradd');
soRec.setValue({
fieldId : 'shipaddresslist',
value : null
});
soRec.removeSubrecord('shippingaddress');
log.debug('shipaddradd', 'removed subrecord');
// Create the subrecord.
var subrec = soRec.getSubrecord({
fieldId : 'shippingaddress'
});
log.debug('shipaddradd got subrecord', subrec);
// Set values on the subrecord.
subrec.setValue({
fieldId : 'country',
value : payload.shipcountry
});
subrec.setValue({
fieldId : 'city',
value : payload.shipcity
});
subrec.setValue({
fieldId : 'zip',
value : payload.shipzip
});
subrec.setValue({
fieldId : 'state',
value : payload.shipstate
});
subrec.setValue({
fieldId : 'attention',
value : payload.shipattention
});
subrec.setValue({
fieldId : 'addressee',
value : payload.shipaddressee ? payload.shipaddressee : payload.shipattention
});
subrec.setValue({
fieldId : 'addr1',
value : payload.shipaddr1
});
subrec.setValue({
fieldId : 'addr2',
value : payload.shipaddr2
});
subrec.setValue({
fieldId : 'addr3',
value : payload.shipaddr3
});
subrec.setValue({
fieldId : 'addrphone',
value : payload.shipphone
});
log.debug('shipaddradd new subrecord', subrec);
battk
05/04/2023, 8:59 PMshipaddress
field has the wrong value, or are the actual fields of the subrecord not setec
05/04/2023, 9:00 PMrec.save()
) where the error reads “Ship To, Bill To not set” or the likesec
05/04/2023, 9:01 PMec
05/04/2023, 9:02 PMec
05/04/2023, 9:02 PMbattk
05/04/2023, 9:03 PMec
05/04/2023, 9:04 PMbattk
05/04/2023, 9:05 PMshipaddress
ec
05/04/2023, 9:06 PMec
05/04/2023, 9:09 PMbattk
05/04/2023, 9:11 PMec
05/04/2023, 9:12 PMec
05/04/2023, 9:16 PMshipaddress
field does not save the data added to the subrecord.battk
05/04/2023, 9:22 PMshipaddress
has an annoying tendency to not get set from the subrecordbattk
05/04/2023, 9:22 PMec
05/04/2023, 9:22 PMbattk
05/04/2023, 9:26 PMsoRec.setValue({
fieldId : 'shipaddresslist',
value : null
});
soRec.removeSubrecord('shippingaddress');
which are the unusual things in your logicec
05/04/2023, 9:29 PMec
05/04/2023, 9:31 PMShawn Talbert
05/05/2023, 3:33 PMshipaddresslist
to do what I need with address subrecords.ec
05/09/2023, 9:47 PM