Aller au contenu

Source-code based storage of documents

In this documentation we will create an extension that allows uploading documents from a BLOB to Document Central via Code. Extending a report with Document Central code is used so that when a report is printed or a document is posted/converted, it is possible to automatically generate and add a Document Central Barcode during that process.

The following requirements must be met:

  • The Document Central module must be licensed.
  • CORE must be available in the extension as a reference.
  • Document Central must be present in the extension as a reference.

Adding Inbound Documents

For adding documents into the Inbound list 2 Functions in the "SIM_DI Upload Management" can be used AddInboundDocument & AddInboundDocumentFromSilentUpload.

AddInboundDocumentFromSilentUpload

There is 1 Overload for the AddInboundDocumentFromSilentUpload Function: Overload 1:

Var Name Data Type Sub Type Length Description
No Filename Text The original file name of the document
No Base64File Text The file as a base64 string
No InboundListCode Code 20 Code of the Inboundlist
No StatusCheckText Text Statuscheck
No Recordref RecordRef The data record reference to which the document must be uploaded.
No ParamContentTypeText Text The Text of the Contenttype
No InfoTagText Text Infotag
No EnumSIMDIInboundDocSource Enum "SIM_DI Inbound Doc Source" The Source Status
No OriginText Text OriginText

AddInboundDocument

There are 2 Overloads for the AddInboundDocument Function:

Overload 1:

Var Name Data Type Sub Type Length Description
No Filename Text The original file name of the document
No Base64File Text The file as a base64 string
No InboundListCode Code 20 Code of the Inboundlist
No StatusCheckText Text Statuscheck
No BarcodeText Text The Text of the Barcode
No InfoTagText Text Infotag
No EnumSIMDIInboundDocSource Enum "SIM_DI Inbound Doc Source" The Source Status
No OriginText Text OriginText

Overload 2:

Var Name Data Type Sub Type Length Description
No Filename Text The original file name of the document
No Base64File Text The file as a base64 string
No InboundListCode Code 20 Code of the Inboundlist
No StatusCheckText Text Statuscheck
No BarcodeText Text The Text of the Barcode
No InfoTagText Text Infotag
No EnumSIMDIInboundDocSource Enum "SIM_DI Inbound Doc Source" The Source Status
No OriginText Text OriginText
No ExtraInfoDictionary Dictionary of [Text, Text] Extrainfo Dictionary

AddInboundDocumentFromExternal

Il existe 1 surcharge pour la fonction AddInboundDocumentFromExternal :

Surcharge 1 :

Var Nom Type de données Sous-type Longueur Description
Non ParamFileNameText Text Le nom de fichier original du document
Non ParamBase64Text Text Le fichier sous forme de chaîne base64
Non ParamInboundListCode Code 20 Code de la liste de réception
Non ParamMetadataJsonText Text Métadonnées sous forme de chaîne JSON
Non ParamRecordId RecordId L'ID d'enregistrement auquel le document doit être lié
Non ParamContentTypeText Text Le texte du type de contenu
Non ParamDocumentLibraryCode Code 20 Code de la bibliothèque de documents
Non ParamInfoTagText Text Balise d'information
Non ParamEnumSIMDIInboundDocSource Enum "SIM_DI Inbound Doc Source" La source du document