project BLF > class Transaction > method GetInstances

Description

Returns the ID's of all instances of a certain business class that are part of this transaction.


Parameters


icClassinputcharacterBusiness class shortname (optional)
ocInstancesoutputcharacterComma seperated list of alternately a business class shortname and an instance number
oiReturnStatusoutputintegerReturn status of the method.


Internal usage


BLF
method database.UpdateWorkobject
method BWorkObject.PostSave

QadFinancials
method BCInvoice.ReInitializeEverything
method BDInvoice.ReInitializeEverything


program code (program1/transaction.p)

for each tInstances where
    can-do(tInstances.tcInsName,icClass) or
    icClass = ""
    by tInstances.tiPriority:
    assign ocInstances = (if ocInstances = ""
                          then ""
                          else ocInstances + ",":U)
                       + entry(1,tInstances.tcInsName) + ",":U
                       + string(tInstances.tiInstanceNr).
end.