project QadFinancials > class BBusinessRelation > business logic query AddressForIntegration


Parameters


iiBusinessRelation_IDinteger
iiAddress_IDinteger
icAddressLogicKeyStringcharacter
icAddressTypeCodecharacter
icAddressStreet1character
icAddressStreet2character
icAddressStreet3character
icAddressZipcharacter
icAddressCitycharacter


query condition


  each Address where
Address.BusinessRelation_ID = iiBusinessRelation_ID AND
Address.Address_ID = iiAddress_ID AND
Address.AddressLogicKeyString = icAddressLogicKeyString AND
Address.AddressStreet1 = (if icAddressStreet1 = '-999999' then '' else icAddressStreet1) AND
Address.AddressStreet2 = (if icAddressStreet2 = '-999999' then '' else icAddressStreet2) AND
Address.AddressStreet3 = (if icAddressStreet3 = '-999999' then '' else icAddressStreet3) AND
Address.AddressZip = (if icAddressZip = '-999999' then '' else icAddressZip) AND
Address.AddressCity = (if icAddressCity = '-999999' then '' else icAddressCity)

      first AddressType (inner-join) where
AddressType.AddressType_ID = Address.AddressType_ID AND
AddressType.AddressTypeCode = icAddressTypeCode


query resultset tqAddressForIntegration


field namedata typedb fielddescription
tiAddress_IDintegerAddress.Address_IDRecord ID
tcAddressCitycharacterAddress.AddressCityCity. The city for this address. This field can be used to decide the tax zone of the address.
tcAddressLogicKeyStringcharacterAddress.AddressLogicKeyStringLogic Key String. Alternative unique key for address table for integration purpose when making update existing record.
api annotation:PartialUpdate = yes - defaults to 1.
tcAddressStreet1characterAddress.AddressStreet1Address: Line one of address details.
This field can be blank.
tcAddressStreet2characterAddress.AddressStreet2Address.Line two of address details.
This field can be blank.
tcAddressStreet3characterAddress.AddressStreet3Address.Line three of address details.
This field can be blank.
tcAddressTypeCodecharacterAddressType.AddressTypeCodeAddress Type
tcAddressZipcharacterAddress.AddressZipZip. The postal code or US zip code associated with this address.
This field is used to decide the tax zone for the address.
This field can be blank.
tiBusinessRelation_IDintegerAddress.BusinessRelation_IDLink to BusinessRelation


Internal usage


QadFinancials
method BBusinessRelation.MaintainAddressMulti