D365 FO supports custom services. With a custom service, you can call application logic in D365 FO from outside D365 FO.
For Connectivity studio, a two custom service are available for messages: 'BisMessageStartFromHttp' and 'runMessage' (both in service group 'BisMessageHttpAction').
The 'BisMessageStartFromHttp' custom service has these service operations:
Operation | Description |
---|---|
executeMessage | Runs a message to import data into D365 FO. |
executeMessageGet | Runs a message to export data from D365 FO. |
Argument | Description |
---|---|
ProjectId | The identification of the project in Connectivity Studio. |
Message Id | The identification of the message in Connectivity studio. |
Content | The body content of the data to be imported. Note: This argument only applies to the ‘executeMessage’ operation. |
https://Instancename.cloudax.dynamics.com/api/services/BisMessageStartFromHttp/BisMessageHttpAction/executeMessage
('Instancename' = Your D365 FO instance identification)
Make sure to call the custom service operation with the arguments. So, the call must include the value for each of the arguments.
The 'runMessage' custom service has these service operations:
Operation | Description | Contract |
---|---|---|
ExportFromD365FO | Runs a message for specific data. For example, for a specific record or field value. | BisServiceMessageArgumentsD365Fo |
ImportFromFile | Runs a message to import a specific file. | BisServiceMessageArgumentsFile |
ImportFromStaging | Runs a message to import a specific staging journal into D365 FO. | BisServiceMessageArgumentsStaging |
ImportFromODBC | Runs a message to import specific ODBC data. | BisServiceMessageArgumentsODBC |
For these service operations, the arguments are defined in a contract, as shown in the previous table. The arguments are:
Argument | Description |
---|---|
ProjectId | The identification of the project in Connectivity Studio. |
Message Id | The identification of the message in Connectivity studio. |
Company | The applicable company ID in the D365 FO environment. |
RunAsyncronize |
You can run a message asynchronous. As a result, the message runs directly in a separate background process. So, you can continue working on the client when the message runs.
|
Arguments |
On a source document, ranges can be used to restrict the data to be processed. A range of type ‘Parameter’ can be used as additional argument to call a custom service operation. To do so, in the JSON to call the custom service define the range as argument with the applicable values. Note:
|
SourceFileName | The name of the source file, including the path. Note:
|
SourceContent | The content of the file if the file name is not used. Note:
|
StagingJournalId | The ID of the staging journal to be imported into D365 FO. Note: This argument only applies to operation ‘ImportFromStaging’. |
To call the custom service from outside D365 FO, use a URL like:
https://Instancename.cloudax.dynamics.com/api/services/BisMessageStartFromHttp/runMessage/ExportFromD365FO
('Instancename' = Your D365 FO instance identification)
Make sure to call the custom service operation with the arguments. So, the call must include the value for each of the arguments.
The JSON to call the 'ExportFromD365FO' custom service operation can be:
{
"ProjectId": "your project ID","MessageId": "your message ID","Company": "USMF","RunAsyncronize": false,"Arguments": [
{"FieldName": "Custaccount","FieldValue": "us-027"}
]
}
The JSON to call the 'ImportFromFile' custom service operation can be:
{"ProjectId": "your project ID",
"MessageId": "your message ID",
"Company": "USMF",
"RunAsyncronize": false,
"SourceFileName": "path+file name",
"SourceContent": "file content if SourceFileName is not used"
}
The JSON to call the 'ImportFromStaging' custom service operation can be:
{"ProjectId": "your project ID",
"MessageId": "your message ID",
"Company": "USMF",
"RunAsyncronize": false,"
"StagingJournalId": "your staging journal ID"
}
For more information on custom services, refer to:
Related to | Notes |
---|---|
Run message |
  |