Gail Kasnett
01/03/2021, 9:40 AMvar addrSubRec = context.newRecord.getSubrecord('shippingaddress')
addrSubRec.setValue('dropdownstate', lState)
in a beforeSubmit script.
It saves on the order, but it doesn't display the saved address or save to the address book for the next time that address is used. What do I have to do?battk
01/03/2021, 9:54 AMstate
instead of dropdownstate
battk
01/03/2021, 9:55 AMbattk
01/03/2021, 9:58 AMaddressbook
sublist on the customer to use the same address on multiple transactionsbattk
01/03/2021, 10:00 AMGail Kasnett
01/13/2021, 10:38 AMGail Kasnett
01/13/2021, 10:42 AMbattk
01/13/2021, 4:40 PMbattk
01/13/2021, 4:42 PMbattk
01/13/2021, 4:42 PMbattk
01/13/2021, 4:43 PMbattk
01/13/2021, 4:44 PMGail Kasnett
01/13/2021, 7:33 PMbattk
01/13/2021, 7:36 PMbattk
01/13/2021, 7:38 PMbattk
01/13/2021, 7:38 PMbattk
01/13/2021, 7:38 PMbattk
01/13/2021, 7:39 PMbattk
01/13/2021, 7:39 PMbattk
01/13/2021, 7:40 PMbattk
01/13/2021, 7:41 PMbattk
01/13/2021, 7:41 PMGail Kasnett
01/13/2021, 7:54 PMbattk
01/13/2021, 7:56 PMGail Kasnett
01/14/2021, 10:44 AMvar customer = record.load({
type: record.Type.CUSTOMER,
id: context.newRecord.getValue({ fieldId: 'entity' }),
isDynamic: true
})
logDebug('Got the Customer', customer)
customer.selectNewLine({
sublistId: 'addressbook'
})
logDebug('loaded addressbook')
var addressSubrecord = customer.getCurrentSublistSubrecord({
sublistId: 'addressbook',
fieldId: 'addressbookaddress',
line: 0
})
log.debug('got address subrec', addressSubrecord)
addressSubrecord.setValue({
fieldId: 'city',
value: capitalizeFirstLetter(lCity.toLowerCase())
})
addressSubrecord.setValue({
fieldId: 'state',
value: lState
})
addressSubrecord.setValue({
fieldId: 'zip',
value: lZip
})
logDebug('set the values')
customer.commitLine({
//probably not necessary since address is already updated
sublistId: 'addressbook'
})
log.debug('committed the address on the customer')
How do I load the address being used on the sale and edit that one?battk
01/14/2021, 7:30 PMbattk
01/14/2021, 7:31 PM