Description
Thie method return address info by addressId.
Parameters
| iiAddressID | input | integer | |
| tApiAddress | input-output | temp-table | |
| oiReturnStatus | output | integer | Return status of the method. |
Internal usage
QadFinancials
program code (program1/bbusinessrelation.p)
/* Find the address record in the instance */
for first tAddress
where tAddress.address_id = iiAddressID:
create tApiAddress.
buffer-copy tAddress to tApiAddress.
end.
/* If the record does not exist in the instance then check the db*/
if not available tAddress
then do:
<Q-1 run AddressById (all) (Read) (NoCache) (input iiAddressID, (AddressID)
output dataset tqAddressById) in BBusinessRelation >
/* Copy the resultset into the Address Temp-table */
/* Using the tqAddressByType temptable to populate the ad_mstr does not work */
for first tqAddressById
where tqAddressById.tiaddress_id = iiAddressID :
assign
vhAddressHandle = dataset tqAddressById:get-buffer-handle(1)
vhApiAddressHandle = temp-table tApiAddress:default-buffer-handle.
vhApiAddressHandle:buffer-create.
<M-2 run BufferCopy
(input vhAddressHandle (ihFrom),
input vhApiAddressHandle (ihTo),
output viFcReturnSuper (oiReturnStatus)) in BBusinessRelation>
if viFcReturnSuper <> 0
then assign oiReturnStatus = viFcReturnSuper.
end. /* end of for each */
end.