Hi All, Does anyone know how to retrieve customer and address information in a single query using SuiteQL? I can't seem to find the name of the address object and all the variations I tried lead to "Invalid search query Invalid search type"
b
battk
07/16/2020, 8:42 PM
have you tried making it in the ui first?
a
Ady
07/16/2020, 8:51 PM
yeah, there's no field name for addressbook or addressbookaddress in the dataset designer.
Ady
07/16/2020, 8:51 PM
I think I found it tho. it's customeraddressbookentityaddress
Ady
07/16/2020, 8:51 PM
I would have NEVER guessed that
Ady
07/16/2020, 8:52 PM
like so: SELECT c.entityid, c.custentity_ari_customer_legacy_id, c.companyname, c.defaultbillingaddress, ca.addr1, ca.city FROM customer c, customeraddressbookentityaddress ca WHERE c.defaultbillingaddress = ca.nkey
Ady
07/16/2020, 8:58 PM
btw, I spent a ton of time looking for this today and found it 5 minutes after posting here 🙂 that's pretty much how it always works for me