project BLF > include bFcStoreInstance.i

Description

Store a business class instance as a draft instance in the state database.


include parameters


&CLASSclass short name
&DESCRIPTIONA description for the draft instance, as it will be shown in the selection window.
&ERROR-STATEMENTAction to take when an error occurred.


Internal usage


unused


include code

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