Description
Do partial load of the business relation. Load only the address with the ID
Parameters
iiBusinessRelationId | input | integer | Business relation ID |
iiAddressId | input | integer | |
ilKeepPrevious | input | logical | |
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
unused
program code (program1/bbusinessrelation.p)
/* ====================================================================================== *
* Method : DataLoadOnlyAddressID *
* Description : Do partial load of the business relation. Load only the address with *
* certain ID *
* -------------------------------------------------------------------------------------- *
* Parameters : (I) BusinessRelationId *
* (I) AddressId
* (I) KeepPrevious keep previous records in the instance *
* ====================================================================================== */
assign oiReturnStatus = -98
viLocalReturn = 0.
MAIN_BLOCK:
do on error undo, return:
/* Pre-validation block */
if iiBusinessRelationId = 0 then assign iiBusinessRelationId = ?.
if ilKeepPrevious = ? then assign ilKeepPrevious = false.
if iiBusinessRelationId = ? then leave MAIN_BLOCK.
/* Execution block */
assign vcDataLoadAddressExtraFilter = Substitute("Address.Address_ID = &1", iiAddressId)
vcDataLoadContactExtraFilter = Substitute("Contact.Address_ID = &1", iiAddressId).
<M-3 run DataLoad
(input '':U (icRowids),
input string(iiBusinessRelationId) (icPkeys),
input '':U (icObjectIds),
input '':U (icFreeform),
input ilKeepPrevious (ilKeepPrevious),
output viFcReturnSuper (oiReturnStatus)) in BBusinessRelation>
assign vcDataLoadAddressExtraFilter = ?
vcDataLoadContactExtraFilter = ?.
if viFcReturnSuper <> 0 then assign viLocalReturn = viFcReturnSuper.
if viFcReturnSuper < 0 then leave MAIN_BLOCK.
end. /* MAIN_BLOCK */
assign oiReturnStatus = viLocalReturn.