Anyone know of a way to get the *`shipIsResidentia...
# suiteql
b
Anyone know of a way to get the
shipIsResidential
field from the itemfulfillment/transaction in SuiteQL? It is available via SuiteTalk REST Services. I can't track down where it lives in the SQL schema.
t
@Brendon Parker This might help. It returns both the shipto and billto address for a given transaction, and includes the "IsResidential" value for the shipto.
Copy code
SELECT
	Transaction.TranID,
	ShipToAddress.Addressee AS ShipToAddressee,
	ShipToAddress.Addr1 As ShipToAddress1,
	ShipToAddress.Addr2 As ShipToAddress2,
	ShipToAddress.Addr3 As ShipToAddress3,
	ShipToAddress.City As ShipToCity,
	ShipToAddress.State As ShipToState,
	ShipToAddress.Zip As ShipToZip,
	ShipToAddress.Country As ShipToCountry,
	ShipToAddress.Attention As ShipToAttention,
	CustomerAddressbook.IsResidential AS ShipToIsResidential,
	BillToAddress.Addressee AS BillToAddressee,
	BillToAddress.Addr1 As BillToAddress1,
	BillToAddress.Addr2 As BillToAddress2,
	BillToAddress.Addr3 As BillToAddress3,
	BillToAddress.City As BillToCity,
	BillToAddress.State As BillToState,
	BillToAddress.Zip As BillToZip,
	BillToAddress.Country As BillToCountry,
	BillToAddress.Attention As BillToAttention	
FROM
	Transaction
	INNER JOIN EntityAddress AS ShipToAddress ON
		( ShipToAddress.nkey = Transaction.ShippingAddress )
	INNER JOIN CustomerAddressbook ON
		( CustomerAddressbook.AddressBookAddress = ShipToAddress.nkey )
	INNER JOIN EntityAddress AS BillToAddress ON
		( BillToAddress.nkey = Transaction.BillingAddress )		
WHERE
	( Transaction.ID = 2476156 )
b
Thank you! I found the CustomerAddressbook record. That was the missing link for me.