Using SuiteQL, how can i fetch addressbook info us...
# ask-stanley-ai
d
Using SuiteQL, how can i fetch addressbook info using the id in a fieldchange of the shipaddresslist on a salesorder
c
AI generated answer (using internal Slack threads):
To fetch addressbook info using the id in a fieldchange of the shipaddresslist on a salesorder using SuiteQL, you can create a SuiteQL query that joins the salesorder and addressbook tables on the shipaddresslist id. Here is a sample SuiteQL query:
Copy code
sql
SELECT 
    salesorder.internalid, 
    salesorder.shipaddresslist, 
    addressbook.internalid, 
    addressbook.addressee, 
    addressbook.addr1, 
    addressbook.addr2, 
    addressbook.city, 
    addressbook.state, 
    addressbook.zip, 
    addressbook.country 
FROM 
    salesorder 
JOIN 
    addressbook ON salesorder.shipaddresslist = addressbook.internalid 
WHERE 
    salesorder.internalid = {your_salesorder_id}
Replace
{your_salesorder_id}
with the actual salesorder id you are interested in. Please note that the addressbook is a subrecord of the customer record, so you cannot directly load the addressbook record. You need to load the customer record first and then access the addressbook subrecord. ****** 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.836578071
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.827235162
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.82368958
Please provide your feedback on this answer.