Message Detail using Custom Outbound Generator

To enable MessageDetail for an Outbound Interface with a Custom Outbound Generator. We have to select Format Type as "Custom".

Create an outbound interface of format type Custom.

images/download/attachments/144836185/message-detail-outbound-custom-format-version-1-modificationdate-1645138193000-api-v2.png

Provide the fully-qualified name of a class implementing one or more of NetChangeOutboundGenerator, SysIdOutboundGenerator, ModelOutboundGenerator.

images/download/attachments/144836185/message-detail-outbound-custom-class-version-1-modificationdate-1645138213000-api-v2.png

In the generate() of implemented class, you can add Message Detail as illustrated in the below example:

public void generate(SysIdOutboundProcessingContext outboundProcessingContext) {
for (Long sysID : outboundProcessingContext.getSysIds()) {
...
JSONArray jsonArray = new JSONArray();
jsonArray.put(currentRecord.getBuyingOrgName());
jsonArray.put(currentRecord.getTestItemEnterpriseName());
outboundProcessingContext.addMessageDetail(sysID.toString(), "", "PTA.TestModel", jsonArray.toString());
}
}


In case of Format Type CSV and Report MessageDetail will be automatically generated if appropriate external referece values are set.(Please refer the section called “Enabling Message Detail”)