IDM Document Workflow Example
If you generate the invoice and look at the background task parameters in the Active Background Tasks form, you see a list of comma-separated parameters. vKeyText-01 in this workflow isolates the fourth parameter in the list, which is the invoice number, and puts it into the appropriate format.
After it gets the invoice number, the workflow uses the specified IDO (SLInvHdrs) to get additional information about the invoice, including the customer number and customer order that are tied to the invoice. This information will be passed to IDM as metadata for filtering.
The workflow determines where to store the document file in IDM based on the information you provide about the external document type (CS_SalesInvoice) and entity type (InforSalesInvoice). You can set up a document description that uses values from the KeyText variables to make the description useful, for example 4677103_InforSalesInvoice.
This table explains the values that are defined in the OrderInvoicing CreditMemoLaser workflow:
Field | Value | Description |
---|---|---|
TaskName | OrderInvoicingCreditMemoLaser | TaskName appearing in the Background Task Definitions form. |
vKeyText01 | StartInvoice= | Search string. |
vKeyText02 | INSTR(E(eTaskParms1), V(vKeyText01)) + LEN(V(vKeyText01)) | Find the starting position of StartInvoice= in the TaskParms1 string. |
vKeyText03 | SUBSTRING(E(eTaskParms1), V(vKeyText02), LEN(DBFUNCTION("ExpandKyByType", "InvNumType", "A1"))) | Extract the characters from TaskParms1 string from the starting position plus the length of invoice number (10 characters). |
vKeyText04 | DBFUNCTION("ExpandKyByType", "InvNumType", V(vKeyText03)) | Convert the value of the extracted string to the invoice number. |
vIdoName | SLInvHdrs | Name of the IDO that contains data for InvoiceNumber. |
vIdoFilter | SUBSTITUTE("InvNum='{0}'", V(vKeyText04)) | The filter looks in the IDO for a record where, for example InvNum=’ 4677103’ if the vKeyText04 field evaluates to “ 4677103’. |
vIdoPropertyList | CoNum,CustNum,InvNum | List of IDO properties that belong to the IDO listed in vIdoName. The IDM document will be tagged with attributes that match these IDO property values. |
vExtDocName | CS_SalesInvoice | IDM document type that is used to store the submitted document. |
vExtMsgEntity | InforSalesInvoice | Infor Ming.le EntityType that is used in JSON messages. |
vExtDocDescription | SUBSTITUTE("{0}_{1}", V(vKeyText04), V(vExtMsgEntity)) | Function that is used to create meaningful document descriptions in the form of “ 4677103_InforSalesInvoice” if vKeyText04 evaluates to InvNum=” 4677103”. |