Installation
Installing the solution
EASY for Dynamics 365 FO supplements your Microsoft Dynamics 365 for Finance & Operations application with an "EasyArchiveIntegration_SF" package. The package contains all integration components required for direct archiving of documents from the Dynamics Web client.
You can install either the "Deployable Package" or the source code.
The deployable package contains only binary files; it is intended as a default deployment method. Implementing the source code via Visual Studio may be useful if you want to develop your own extensions or if you want to debug an item.
Regardless of which option you select, we recommend that you integrate the solution with your Azure Dev Ops repository. For example, you can use the dox42 package as part of your routine build and release process.
For more information, go to https://docs.microsoft.com/en-us/dynamics365/unified-operations/dev-itpro/deployment/apply-deployable-package-system and https://docs.microsoft.com/en-us/dynamics365/unified-operations/dev-itpro/dev-tools/manage-runtime-packages.
Setting up an archive script for incoming documents
To transfer incoming documents from the archive to Dynamics 365 FO, the scripts "D365" and "D365_Params" must be implemented in the EASY archive system tasks.
The "D365" script performs the following functions:
-
Authentication to the ERP system is initialized
-
Transfer of documents
-
A hit list is created of all documents from selected stores that have not yet been transferred to Dynamics 365 FO (The metadata field "sent" is empty or "0").
-
The access token for Dynamics 365 FO is renewed so that the archive can maintain the connection to the system.
-
The hit list is processed:
-
The metadata values "barcode" and "document id" (document reference) are transferred to Dynamics 365 FO via rest call.
-
The archive document is updated by setting the "sent" field to "1" if the document could be transferred.
-
-
The following parameters must be set up in the "D365_Params" script:
Parameter |
Description |
D365 Authentification |
|
tokenurl |
This is where the URL is stored where the token is requested for OAuth 2 authentication to connect to Dynamics 365 FO. Example: var tokenurl= "https://login.microsoftonline.com/ac952504-14b1-49a0-acac-7aa8260fec9e/oauth2/token/"; |
client |
The client ID is considered public information and is used to build login URLs. Example: var client="e0f50971-046d-4731-8422-81cf3f96cb37"; |
secret |
The client secret is stored here. The client uses this secret to sign a request. In this way, Dynamics 365 FO can verify that the request actually comes from the application in question. Example:
var secret ="e7gpFpw25TmdI~sY7-3tu0k-6BAZ-_2I78" |
resource |
The URL of the Dynamics 365 FO web client is entered here. Example: var resource = "https://v1810devxyz.cloudax.dynamics.com" |
D365 URL |
|
sendurl |
Here the end point (rest call) of EASY for Dynamics 365 FO is specified, where the document is received. Example: var sendurl= "https://v1810devxyz.cloudax.dynamics.com/api/services/EASYDocumentHandling_SF/EASYDocumentHandlingService_SF/createDocument"; |
Archive Parameters |
|
poolPath |
The pool path of the pool to be searched is specified here. Several pools can be searched. For this purpose, the individual paths are separated by commas. Example: var poolPath = "/Adaptive/Adaptive01, /Adaptive/Adap tive02 " ; If multiple Stores should be scanned for new documents, both fields "poolpath" and "view" must be configured that way. |
view |
Here one or more views are entered that are to be searched for incoming documents. Example: var view="Store0 1, Store 02 "; If multiple Stores should be scanned for new documents, both fields "poolpath" and "view" must be configured that way.
|
schema |
The storage schema used for the stores is entered here. Currently, the EASY for Dynamics 365 FO interface only supports the adaptive schema. Example: var schema = "ADAPTIVE"; |
unit |
Easy Archive Units can be entered here. this parameter is to be changed only in special cases. Example: var unit= "Unit=Default"; |
Instance |
The Easy Archive instance name is entered here. Example: var Instance="Default"; |
queryfield |
The field name for the metadata field used to indicate whether a document could be successfully submitted is entered here. Example: var queryfield="sent"; |
Key Field |
|
barcodeFieldname |
The content of this metadata field is transferred to Dynamics 365 FO as a barcode. The name can be changed if necessary. Example: var barcodeFieldname="BARCODE" |
Query expression to find new documents |
|
query |
This field contains the query that will be applied to find new documents. The query may only be customized by experienced consultants. Example: var query="( not "+ schema +"."+ queryfield +" contains '1') and "+ schema +"."+ barcodeFieldname +" IS not NULL"; Dies Kommando wird dadurch ausgeführt: |
Internals |
|
dbug |
Switches the internal debug mode on or off. This writes more log entries to the archive log. Serves the error analysis and is to be activated only in the support case. Example: var dbug=false; |
Logfile |
|
logfile |
If this parameter is set, a log file is written to the specified server directory. Example: var logfile="C:\\eex\\temp\\EASY_D365_Import.log"; |
CSV File |
|
csvfilename |
If this parameter is set, a csv file containing the mappings of barcodes and document references will be created in this path. Example: var csvfilename="C:\\eex\\temp\\EASY_D365_Import.txt"; |
Including additional document types/reports in the archiving process
Extending the code of the EASY for Dynamics 365 FO interface allows you to integrate additional document types / reports into the archiving process. Please be aware that all code changes must be programmed in a separate package and that the original EASY package remains unchanged. Otherwise changes would be overwritten with the next release version of EASY for Dynamics 365 FO, and would then be lost.
You have to perform the following steps:
-
You have to extend Base-Enum EASYDocumentType_SF with a new value:
-
You have to program a new extension of the default class SrsPrintMgmtController using a command chain for the runReport method. Prior to starting the 'next' method, you need to check that rdpContract belongs to the new report and that the new document type is active. If so, you need to enable "Print to archive"; the code should be similar to that in the example below (archiving free text invoices):
-
You have to program a new extension of the default class SrsReportRunPrinter using a command chain to the saveReportArchive method. Prior to starting the 'next' method, you need to check that rdpContract belongs to the new report and that the new document type is active. If so, a Singleton class EASYDocumentTypeSingleton_SF should be populated with the current journal record and document type; the code should be similar to the one in the example below (archiving free text invoices):