How to Create a Custom Communication Method
The Integration Queue can be extended by adding custom Communication Methods.
Capabilities
A Communication Method can have one or more capabilities. For each capability an Interface needs to be implemented, as described in below table. Follow the links for each interface to find the documentation for that interface.
Capability | Interface | Explanation |
---|---|---|
Import | IQCM Import | Used for importing files (or any data) into the Integration Queue for further handling. |
Export | IQCM Export | Used for exporting files (or any data) from the Integration Queue |
Function | IQCM Function | Used for invoking a function from the Integration Queue |
1. Implement interfaces
All Communication Methods must implement the IQCM interface and at least one of the other interfaces above. The codeunit that implements the selected interfaces is called the "Handler" codeunit.
To be able to implement all interfaces you will probably need to add a few additional objects. See the samples Sample File Transfer or Sample Function for inspiration.
2. Extend the Interface Enum
To add your Communication Method as a selectable Communication Method in the UI, you need to extend the Communication Method Enum, called "IQCM". The new Enum value added in this Enum Extension is the link to your Handler Codeunit.
Create a new Enum Extension that extends the Enum "QWESR IQCM"
Add a new enum value. Use the codeunit ID as the value and set a descriptive name and caption. In the Implementation property all the interfaces that your handler implements must be added and set to your handler codeunit. See below example that implements the Import and Export capabilities:
enumextension 50000 "[My IQCM Extension]" extends "QWESR IQCM" { value(50000; "[My Communication Method]") { Caption = '[My Communication Method]'; Implementation = "QWESR IQCM" = "[My IQCM Handler Codeunit]", "QWESR IQCM Import" = "[My IQCM Handler Codeunit]", "QWESR IQCM Export" = "[My IQCM Handler Codeunit]"; } }
Build and Deploy your app and create a new integration that utilizes the new Communication Method!