project BLF > include bFcStartInstance.i

Description

Start a new instance of a business component, from another business component.


include parameters


&ADD-TO-TRANSACTIONEnter true if the started business instance will do database updates that must be part of the transaction in which current business instance is operating.
If current instance is not yet part of a transaction instance, a transaction instance will be started automatically, to which both instances will be added immediately.
Enter false or blanc in all other situations.
&CLASSclass short name
&ERROR-STATEMENTAction to take when an error occurred.
&USER-DEFINED-CONTEXT


Internal usage


QadFinancials
method BAccountingInterface.FillProDsBalanceSheet
method BAccountingInterface.FillProDsChartOfAccnt
method BAccountingInterface.FillProDsIncomeStatement


include code

run BusinessClassActions in {&TARGETPROCEDURE}
   (input        "{&CLASS}":U,
    input        "START":U,
    &IF "{&ADD-TO-TRANSACTION}" = ""
    &THEN input no,
    &ELSE input {&ADD-TO-TRANSACTION},
    &ENDIF
    &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        "{&USER-DEFINED-CONTEXT}",
    output viFcIncludeReturn).
if viFcIncludeReturn <> 0
then oiReturnStatus = viFcIncludeReturn.
if viFcIncludeReturn < 0
then do:
    &IF "{&ERROR-STATEMENT}" = ""
    &THEN
    return ?.
    &ELSE
    {&ERROR-STATEMENT}
    &ENDIF
end.