Has anyone noticed in 2025.2 address data is not b...
# general
r
Has anyone noticed in 2025.2 address data is not being picked up correctly for customers via suiteql?
🎯 1
r
Curious in what way it's wrong? And is this truly only in SQL or is it also via the ODBC?
r
I had a previous join which is no longer pulling data, I’ve had to change the join
j
@Ritesh Mistry What did you end up changing. I've just noticed this for one of our integrations which was doing a join to get customer billing addresses
r
@John Ferlito are you retrieving data from the transaction table?
j
@Ritesh Mistry Yes it's a join against transaction
r
Do you want to share your SQL @John Ferlito , dm me if you prefer to share privately
j
Actually I'm querying customers. The query that was working fine before is. Im using ksley as an ORM let me know if you need the raw SQL
Copy code
const customerQuery = db
  .selectFrom('customer')
  .leftJoin('employee as salesrep', 'salesrep.id', 'customer.salesrep')
  .leftJoin('term', 'term.id', 'customer.terms')
  .leftJoin('currency', 'currency.id', 'customer.currency')
  .leftJoin('customeraddressbookentityaddress as billingaddr', 'billingaddr.nkey', 'customer.defaultbillingaddress')
  .select((eb) => [
    'customer.id',
    'customer.entityid',
    'customer.companyname',
    'customer.email',
    eb.case().when('salesrep.id', 'is not', null).then(sql<string>`salesrep.firstname || ' ' || salesrep.lastname`).else(null).end().as('salesrepname'),
    'term.name as paymentterms',
    'currency.symbol as currency',
    'billingaddr.addr1 as billingstreet1',
    'billingaddr.addr2 as billingstreet2',
    'billingaddr.city as billingcity',
    'billingaddr.state as billingstate',
    'billingaddr.zip as billingpostcode',
    'billingaddr.country as billingcountry',
  ]);
Interestingly though somethign as simple as this returns no rows (not sure if it did before)
Copy code
SELECT * FROM customeraddressbookentityaddress
r
Fascinating, that is the exact issue I had
I can’t use customeradressbook at all
So the only way I can get the correct address associated is using the transactionshipment table
Since the address on the order is just a text blob that downstream systems needs to decipher
But the transaction shipment table allocates it to the address etc
j
Hmm interesting. I wonder if it's a bug or just a permission change. I couldn't see anything in the release notes nor any permissions that made a difference
r
I think it’s a bug or a silent deprecate
But that caused me a lot of problems in our integrations, had to refactor the whole logic
And update my sales restlet to force the billing and shipping address so it can be picked up