How to add Address subrecords to custom transactio...
# ask-stanley-ai
a
How to add Address subrecords to custom transaction type?
c
AI generated answer (using internal Slack threads):
To add an address subrecord to a custom transaction type, you can use SuiteScript. Here's a general approach based on the conversations: 1. First, you need to get the address subrecord. In SuiteScript 1.0, you can use the
nlapiEditSubrecord('shippingaddress')
function to get the address subrecord. 2. Once you have the subrecord, you can modify it as needed. 3. After making changes, don't forget to commit the subrecord using the
commit()
method. For a custom address while creating a sales order, you can set the normal address fields with 'ship' or 'bill' in front to get your custom address that is stored on the sales order. Here are some helpful links from the conversations: - [Using SuiteScript with Address Subrecords](https://system.netsuite.com/app/help/helpcenter.nl?fid=section_4069251582https://system.netsuite.com/app/help/helpcenter.nl?fid=section_4069251582.html.html) - [Working with Subrecords in SuiteScript](https://system.netsuite.com/app/help/helpcenter.nl?fid=section_N2940215.html) - [Setting a Custom Address Using a Subrecord in SuiteScript 1.0](https://system.netsuite.com/app/help/helpcenter.nl?fid=section_1544480991.html&whence=#subsect_1546465134) ****** Disclaimer: This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes. ******
Slack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.862279832
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.8599751
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.85045445
Please provide your feedback on this answer.