Nicolas Bean
05/24/2023, 11:06 PMrec.setValue({ fieldId: 'shipaddressee', value: 'Walmart WFS'});
rec.setValue({ fieldId: 'shipaddr1', value: address1});
rec.setValue({ fieldId: 'shipcity', value: city});
rec.setValue({ fieldId: 'shipstate', value: state});
rec.setValue({ fieldId: 'shipzip', value: zip});
}
would not work?
I also tried getSubrecord and setting that way without success
i tried afterSubmit & beforeSubmit
for some reason the shipaddr1 & shipcity are working but not the other onesDavid B
05/24/2023, 11:12 PMNicolas Bean
05/25/2023, 2:15 AMNicolas Bean
05/25/2023, 2:16 AMNicolas Bean
05/25/2023, 2:16 AMvar shippingAddressSubrecord = rec.getSubrecord({fieldId: 'shippingaddress'});
shippingAddressSubrecord.setValue({fieldId: 'country', value: 'US'});
shippingAddressSubrecord.setValue({fieldId: 'addressee', value: 'Walmart WFS'});
shippingAddressSubrecord.setValue({fieldId: 'addr1', value: address1});
shippingAddressSubrecord.setValue({fieldId: 'city', value: city});
shippingAddressSubrecord.setValue({fieldId: 'state', value: state});
shippingAddressSubrecord.setValue({fieldId: 'zip', value: zip});
log.debug('shippingAddressSubrecord', shippingAddressSubrecord);
Nicolas Bean
05/25/2023, 2:33 AMNicolas Bean
05/25/2023, 2:33 AMDavid B
05/25/2023, 2:45 AM