icMessage | input | character | The actual message, can contain $1, $2, ... for values that are situation-dependent. |
icArguments | input | character | chr(2) seperated list of values to replace $1, $2, ... in the message with. These values should not be translatable. |
icFieldName | input | character | Optional name of a business field, to link the message to that field. |
icFieldValue | input | character | Optional value of the business field, converted to string type. |
icType | input | character | Type of message: E = user error (incorrect input, this type of error is linked to a business field) D = database error (other errors) S = system error (or programming error) W = warning, results in return status +1 (the transaction can still proceed) |
iiSeverity | input | integer | Error severity level (used to sort the messages on in the error viewer): 1 = critical 2 = high 3 = normal 4 = low |
icRowid | input | character | Optional rowid to link the message to a single record in the class temp-table (mentioned in parameter icFieldName). Refers to the field tc_Rowid. |
icFcMsgNumber | input | character | A unique number per CB project. DO NOT CHANGE THIS PARAMETER |
icFcExplanation | input | character | Long description, fully explaining what exactly caused the error or warning, and what has to be done to solve the error/warning involved. |
icFcIdentification | input | character | If the error is linked to a specific business object, this field should fully identify this object. The content of this field is considered to be untranslatable. |
icFcContext | input | character | Change the description of the icContext parameter of the SetMessage method. Here, the developer can pass extra context information to the end-user that can help him to understand why things went wrong. This field contains context information, like booleans, data items, result of buffer-compare. We advise to use the syntax "<Field>=<Value>chr(2)<Field>=<Value>...." as this is recognized by the error viewer. The content of this field is considered to be untranslatable. |
oiReturnStatus | output | integer |
/*If the Component is started for batch mode(now only BBankImportLine component start BBankEntry in batch mode), we will use the BBankImportLine.tc_rowid which is passed by Dataload or Adddetailline methods to replace the rowid which is passed by SetMessage methods*/ if vlUseExtUniqueIDInBEForSetMsg then do: if icRowid <> "" and icRowID <> ? then do: vlFound = false. define buffer btBankState for tBankState. define buffer btBankStateAlloc for tBankStateAlloc. define buffer btBankStateLine for tBankStateLine. define buffer btBankStateAllocColl for tBankStateAllocColl. define buffer btBankStateStageAlloc for tBankStateStageAlloc. /*Find record in main class table*/ for first btBankState where btBankState.tc_rowid = icRowid, /*If there are multiple BankStateLines for one BankState was created by PIBF*/ first btBankStateLine where btBankStateLine.tc_ParentRowid = btBankState.tc_Rowid and btBankStateLine.tcExternalUniqueIdentifier <> "":U and btBankStateLine.tcExternalUniqueIdentifier <> ? : assign icFcIdentification = btBankStateLine.tcExternalUniqueIdentifier vlFound = true. end. /*Check the child table tBankStateLine*/ if not vlFound then do: for first btBankStateLine where btBankStateLine.tc_rowid = icRowid and btBankStateLine.tcExternalUniqueIdentifier <> "":U and btBankStateLine.tcExternalUniqueIdentifier <> ? : assign icFcIdentification = btBankStateLine.tcExternalUniqueIdentifier vlFound = true. end. end. /*Check tBankStateAlloc table*/ if not vlFound then do: for first btBankStateAlloc where btBankStateAlloc.tc_Rowid = icRowid, first btBankStateLine where btBankStateLine.tc_Rowid = btBankStateAlloc.tc_ParentRowid and btBankStateLine.tcExternalUniqueIdentifier <> "":U and btBankStateLine.tcExternalUniqueIdentifier <> ? : assign vlFound = true icFcIdentification = btBankStateLine.tcExternalUniqueIdentifier. end. end. /*Check tBankStateAllocColl table*/ if not vlFound then do: for first btBankStateAllocColl where btBankStateAllocColl.tc_rowid = icRowid, first btBankStateAlloc where btBankStateAlloc.tc_Rowid = btBankStateAllocColl.tc_ParentRowid, first btBankStateLine where btBankStateLine.tc_Rowid = btBankStateAlloc.tc_ParentRowid and btBankStateLine.tcExternalUniqueIdentifier <> "":U and btBankStateLine.tcExternalUniqueIdentifier <> ? : assign icFcIdentification = btBankStateLine.tcExternalUniqueIdentifier vlFound = true. end. end. /*Check tBankStateStageAlloc table*/ if not vlFound then do: for first btBankStateStageAlloc where btBankStateStageAlloc.tc_rowid = icRowid, first btBankStateAlloc where btBankStateAlloc.tc_Rowid = btBankStateStageAlloc.tc_ParentRowid, first btBankStateLine where btBankStateLine.tc_Rowid = btBankStateAlloc.tc_ParentRowid and btBankStateLine.tcExternalUniqueIdentifier <> "":U and btBankStateLine.tcExternalUniqueIdentifier <> ? : assign icFcIdentification = btBankStateLine.tcExternalUniqueIdentifier vlFound = true. end. end. end. /*End of if icRowid <> "" and icRowID <> ? then*/ end. /*End of if vlUseExtUniqueIDInBEForSetMsg then*/ <ANCESTOR-CODE>