wes_w
03/20/2023, 9:17 PMTristan Day
03/20/2023, 9:52 PMTristan Day
03/20/2023, 9:53 PMNElliott
03/21/2023, 8:19 AMwes_w
03/21/2023, 1:18 PMNElliott
03/21/2023, 6:06 PMShawn Talbert
03/22/2023, 4:31 AMbillingaddress
or shippingaddress
fields on the SalesOrder object. There is a billing address on the base type, so that typically means someone has used it successfully in the past. https://exploreconsulting.github.io/netsuite-fasttrack-toolkit-ss2/classes/DataAccess_SalesOrderBase.SalesOrderBase.html#billingaddressShawn Talbert
03/22/2023, 4:35 AMShawn Talbert
03/22/2023, 4:35 AMwes_w
03/22/2023, 2:40 PMNElliott
03/22/2023, 3:44 PMShawn Talbert
03/22/2023, 3:45 PMNElliott
03/22/2023, 3:46 PMShawn Talbert
03/22/2023, 3:46 PMwes_w
03/22/2023, 3:50 PMNElliott
03/22/2023, 3:52 PMtransction.getSubrecord({fieldId: 'billingaddress'});
wes_w
03/22/2023, 3:53 PMwes_w
03/22/2023, 3:54 PMwes_w
03/22/2023, 3:54 PMNElliott
03/22/2023, 3:55 PMwes_w
03/22/2023, 4:05 PMlet recordId = context.request.parameters.id;
let transaction = new SalesOrder(recordId);
let billingAddressSubRecord = transaction.getSubrecord({fieldId: 'billingaddress'});
I get a type error: transaction.getSubrecord is not a function
What is the method to pull the subrecord when the record is loaded that way using NSDAL?NElliott
03/22/2023, 5:06 PMNElliott
03/22/2023, 5:06 PMShawn Talbert
03/22/2023, 5:55 PMSalesOrder.billingaddress
should be populated methinks, if it is a custom address on that transactionShawn Talbert
03/22/2023, 5:56 PMnsrecord
on the SalesOrder (or any other NSDAL object for that matter).Shawn Talbert
03/22/2023, 5:57 PMbillingaddress
is the subrecord; just much simpler javascript to access it.Shawn Talbert
03/22/2023, 6:18 PMShawn Talbert
03/22/2023, 6:18 PMShawn Talbert
03/22/2023, 6:18 PMShawn Talbert
03/22/2023, 6:18 PM{
"id": null,
"_id": null,
"addr1": "Test Custom addr 1",
"addr2": "custom addr2",
"addr3": "",
"addressee": "Test",
"addrphone": "6505551212",
"addrtext": "Test\r\nTest Custom addr 1\r\ncustom addr2\r\nSome Custom City CA 94403\r\nUnited States",
"attention": "",
"city": "Some Custom City",
"country": "US",
"state": "CA",
"zip": "94403",
"override": false
}
Shawn Talbert
03/22/2023, 6:20 PMShawn Talbert
03/22/2023, 6:20 PMwes_w
03/22/2023, 6:37 PMShawn Talbert
03/22/2023, 6:38 PM