darrenhillconsulting
12/30/2021, 6:08 PMClay Roper
12/30/2021, 7:59 PMSELECT {fields}
FROM entityaddressbook
WHERE
entity = {employeeInternalId} AND
defaultbilling = 'T'
Clay Roper
12/30/2021, 8:01 PMentity
table is a superset of customers, contacts, vendors, employees, and partners (maybe including other names and competitors?) with a single pool of internalidsdarrenhillconsulting
01/05/2022, 8:44 PMSELECT
employeeaddressbookentityaddress.addr1 AS strStreet,
employeeaddressbookentityaddress.country AS strCountryCode,
employeeaddressbookentityaddress.state AS strState,
employeeaddressbookentityaddress.city AS strCity,
employeeaddressbookentityaddress.zip AS strPostCode
FROM
Employee
LEFT OUTER JOIN employeeaddressbook on (employee.id = employeeAddressbook.entity) AND (employeeaddressbook.defaultbilling = 'T')
LEFT OUTER JOIN employeeaddressbookentityaddress ON (employeeAddressbook.addressbookaddress = employeeAddressbookEntityAddress.nkey)