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 BDDocument 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 vlUseExtUniqueIDInDDForSetMsg then do: if icRowid <> "" and icRowID <> ? then do: define buffer btDDocument for tDDocument. define buffer btDDocInvoiceXrefStage for tDDocInvoiceXrefStage. define buffer btDDocumentInvoiceXref for tDDocumentInvoiceXref. define buffer btDdocumentPostingLine for tDdocumentPostingLine. vlFound = false. /*Find record in main class table*/ for first btDDocument where btDDocument.tc_Rowid = icRowid and btDDocument.tcExternalUniqueIdentifier <> "":U and btDDocument.tcExternalUniqueIdentifier <> ?: assign icFcIdentification = btDDocument.tcExternalUniqueIdentifier vlFound = true. end. /*Check the child table tDDocInvoiceXrefStage*/ if not vlFound then do: for first btDDocInvoiceXrefStage where btDDocInvoiceXrefStage.tc_Rowid = icRowid, first btDDocumentInvoiceXref where btDDocumentInvoiceXref.tc_Rowid = btDDocInvoiceXrefStage.tc_ParentRowid, first btDDocument where btDDocument.tc_Rowid = btDDocumentInvoiceXref.tc_ParentRowid and btDDocument.tcExternalUniqueIdentifier <> "":U and btDDocument.tcExternalUniqueIdentifier <> ?: assign icFcIdentification = btDDocument.tcExternalUniqueIdentifier vlFound = true. end. end. /*Check the child table tDDocumentInvoiceXref*/ if not vlFound then do: for first btDDocumentInvoiceXref where btDDocumentInvoiceXref.tc_rowid = icRowid, first btDDocument where btDDocument.tc_Rowid = btDDocumentInvoiceXref.tc_ParentRowid and btDDocument.tcExternalUniqueIdentifier <> "":U and btDDocument.tcExternalUniqueIdentifier <> ?: assign icFcIdentification = btDDocument.tcExternalUniqueIdentifier vlFound = true. end. end. /*Check the child table tDDocumentPostingLine*/ if not vlFound then do: for first btDDocumentPostingLine where btDDocumentPostingLine.tc_rowid = icRowid, first btDDocument where btDDocument.tc_Rowid = btDDocumentPostingLine.tc_ParentRowid and btDDocument.tcExternalUniqueIdentifier <> "":U and btDDocument.tcExternalUniqueIdentifier <> ?: assign icFcIdentification = btDDocument.tcExternalUniqueIdentifier vlFound = true. end. end. end. /*End of if icRowid <> "" and icRowID <> ? then*/ end. /*End of if vlUseExternalUIDInBEForSetMsg then*/ <ANCESTOR-CODE>