project BLF > include bFcAddToTransaction.i
Description
Start an instance of a business component and add it to current transaction.
(If an instance is available, no new instance will be created. This instance must have been started with this include.)
include parameters
&CLASS | class short name |
&ERROR-STATEMENT | Action to take when an error occurred. |
Internal usage
BLF
QadFinancials
include code
run BusinessClassActions in {&TARGETPROCEDURE}
(input "{&CLASS}":U,
&IF "{&CLASS-REF}" = ""
&THEN
input (if vi{&CLASS}Id = 0 then "START+OPEN":U else "OPEN":U),
&ELSE
input (if vi{&CLASS-REF}Id = 0 then "START+OPEN":U else "OPEN":U),
&ENDIF
input yes,
&IF "{&CLASS-REF}" = ""
&THEN
input-output vi{&CLASS}OC,
input-output vh{&CLASS}Inst,
input-output vi{&CLASS}Id,
&ELSE
input-output vi{&CLASS-REF}OC,
input-output vh{&CLASS-REF}Inst,
input-output vi{&CLASS-REF}Id,
&ENDIF
input "",
input "",
output viFcIncludeReturn).
if viFcIncludeReturn <> 0
then oiReturnStatus = viFcIncludeReturn.
if viFcIncludeReturn < 0
then do:
&IF "{&ERROR-STATEMENT}" = ""
&THEN
return ?.
&ELSE
{&ERROR-STATEMENT}
&ENDIF
end.