Skip to main content

Inbound

An inbound message type brings external data into D365FO. Every received file, queue item, or API response becomes a record in the Incoming messages log with the payload attached, then a processing class turns it into a D365FO document.

How it works

An inbound document type is one class extending DEVIntegProcessMessageBase with a single method to implement:

abstract void processMessage(DEVIntegMessageTable _messageTable,
DEVIntegMessageProcessResult _messageProcessResult)
{
...
}

The engine calls this method outside a transaction, so transaction control is up to the message type — one transaction per message, per journal, or per line. A typical implementation reads the payload into a staging table and then creates the target document:

ttsbegin;

while (fileReader.readNextRow())
{
linesStaging.clear();
lineNum++;
linesStaging.LineNumber = lineNum;
linesStaging.MainAccount = fileReader.getStringByName('MainAccount');
linesStaging.Amount = fileReader.getRealByName('Amount');
linesStaging.insert();
}

ttscommit;

The two-step staging approach is what enables the framework's support model: when processing fails, users see the parsed values in staging, fix the root cause (for example, create the missing master data or a mapping), and reprocess — all from the message log, without a developer.

The payload can be in any file format — including standard entity formats processed via DMF instead of custom X++.

Tutorials