DXC Electronic Data Interchange (EDI) - Technical Guide
The DXC EDI module provides enhanced functionalities to Microsoft Dynamics 365 for Finance and Operations (FinOps). This guide provides an overview of the technical requirements for making extensions to specific features.
Create new document type
- Update your model parameters to reference package, DXC EDI
Note: if working on customizations for any of the following modules, then please select the appropriate reference packages for it
- DXC EDI 3PL Documents
- DXC EDI Customer Documents
- DXC EDI Freight Forwarder Landed Cost Documents
- DXC EDI Vendor Documents
- Add new document type
- Extend the enum, SAB_EDIDocumentType from the parent module, DXC EDI
- Add new element for your inbound or outbound document type and provide an appropriate label for it
- Create and implement the document type class.
EDI > Setup > Document type

EDI > Files > Inbound files

EDI > Files > Inbound files > Upload files


Note: If your document type if not visible, navigate to EDI > Setup > EDI parameters > General and run refresh module.
Implement SAB_EDIDocumentTypeClass for EDI documents
Pre-requisites
- Create staging data tables for EDI documents
- Document settings profile
- EDI document processing
Inbound documents
- Extend the abstract class SAB_EDIDocumentTypeClass
- Add SAB_EDIDocumentTypeFactoryAttribute attribute to the class declaration and pass your SAB_EDIDocumentType enum as value.
Example: [SAB_EDIDocumentTypeFactoryAttribute(SAB_EDIDocumentType::InboundExample)]
- Implement all of the following methods, see the class library for more information.
- documentDescription
- documentDirection
- documentHierarchyPath
- documentName
- documentRootNodeName
- processMenuItem
- processMenuItemSingle
- stagingHeaderFromCommon
- stagingHeaderKeyField
- stagingHeaderTransferStatusFieldId
- stagingLineFromCommon
- tableIdHeader
- tableIdLine
- tableIdTradingPartnerDefault
Outbound documents
- Extend the abstract class SAB_EDIOutboundDocumentTypeClass
- Add SAB_EDIDocumentTypeFactory attribute to the class declaration and pass your SAB_EDIDocumentType enum as value.
Example: [SAB_EDIDocumentTypeFactory(SAB_EDIDocumentType::InboundExample)]
- Implement all of the following methods, see the class library for more information.
- documentDescription
- documentHierarchyPath
- documentName
- documentRootNodeName
- stagingHeaderFromCommon
- stagingHeaderKeyField
- stagingHeaderTransferStatusFieldId
- stagingLineFromCommon
- tableIdHeader
- tableIdLine
- tableIdTradingPartnerDefault
Create staging data tables for EDI documents
- Create new table to store your staging header data.
Example:
- EDI[Extension][Inbound]HeaderStaging
- EDI[Extension][Outbound]HeaderStaging
- Add and link all fields in the map SAB_EDIStagingHeader within the table designer.
- Add any additional fields for your document type to the table
Line table
- Create new table to store your staging line data.
Example:
- EDI[Extension][Inbound]LineStaging
- EDI[Extension][Outbound]LineStaging
- Add and link all fields in the map SAB_EDIStagingLine within the table designer.
- Add any additional fields for your document type to the table
Document settings profile
- Create new table for settings profile.
Example: SAB_EDIDocumentSettingProfile_[InboundExample]
- Add SAB_EDIDocumentSettingsProfile as relation to your table
- Add the following field, to be used by EDI to uniquely identify your setting profile
- Name: DocumentSettingsProfile
- Data type: Int64
- EDT - SAB_EDIDocumentSettingsProfileRecId
- Create new index
- Name - DocumentSettingsProfileIdx
- Field - DocumentSettingsProfile
- Alternate key - Yes
- Add relationship
- Related table - SAB_EDIDocumentSettingsProfile
- Cardinality - ExactlyOne
- Index - RecId
- On Delete - Cascade
- Relationship - Association
- Implement SAB_EDIDocumentSettingsContract class for document settings profile parameters
- Implement SAB_EDIDocumentSettingsDialogService class for document settings profile dialog
- Implement SAB_EDIDocumentSettingsUIBuilder class for document settings profile UI
- Create data entity for the settings profile and assign security privileges as required
Example: SAB_EDIDocumentSettingProfile_[InboundExample]Entity, SAB_EDIDocumentSettingProfile_[InboundExample]EntityMaintain, SAB_EDIDocumentSettingProfile_[InboundExample]EntityView
EDI > Setup > Document types

[Document name] > Setting profiles > Setup

Implement SAB_EDIDocumentSettingsContract class for document settings profile parameters
- Extend the abstract class SAB_EDIDocumentSettingsContract
- Add DataContract attribute to the class declaration
- Add SAB_EDIDocumentTypeFactory attribute to the class declaration and pass your SAB_EDIDocumentType enum as value.
Example:
[SAB_EDIDocumentTypeFactory(SAB_EDIDocumentType::InboundDocument)]
- Add SysOperationContractProcessing attribute to the class declaration and pass your UI builder class as parameter
Example:
[SysOperationContractProcessing(classStr(SAB_EDIDocumentSettingsUIBuilder))]
- Implement all of the following methods, see the class library for more information.
- getProfileFieldId
- getPprofileTableId
- serviceClassStr
- serviceMethodStr
- Add your dialog fields as follows
Example:
[DataMember,
SAB_EDIDocumentSettingsFieldMember(fieldStr(SAB_EDIDocumentSettingsProfile_InboundExample, DocumentSettingField1))]
public Name parmDocumentSettingField1(Name _field1 = documentSettingProfile.DocumentSettingField1)
{
documentSettingProfile.DocumentSettingField1 = _field1;
return documentSettingProfile.DocumentSettingField1;
}
Implement SAB_EDIDocumentSettingsDialogService class for document settings profile dialog
- Extend the abstract class SAB_EDIDocumentSettingsDialogService
- Add your method that will save the settings
Example:
public void run(SAB_EDIDocumentSettingsContract_InboundExample _contract)
{
this.saveSettings(_contract);
}
EDI document processing (Inbound)
- Create two action menu items for processing the EDI document.
- Example:
- SAB_EDIProcessor_InboundExampleSingle
- SAB_EDIProcessor_InboundExample
- Properties:
- Object Type: Class
- Object: SAB_EDIProcessorController
- Enum Type Parmeter: SAB_EDIDocumentType
- Enum Parameter: [Inbound Example] - pass your document type enum
- Set the multi-select to yes for the non-single one
EDI > Documents > Inbound example (Note: This will be accessible once step 3 is completed)

- Implement EDI processor class to process inbound documents
- Create staging forms for EDI documents
Implement EDI processor class to process inbound documents
- Extend the EDI processor class dependening on your extension scenario
- Customers documents - SAB_EDIProcessor_Cust
- Vendor documents - SAB_EDIProcessor_Vend
- Freight forwarder landed costs documents - SAB_EDIProcessor_FreightForwarderLandedCost
- 3PL documents - SAB_EDIProcessor_3PL
- All other documents - SAB_EDIProcessor
- Add SAB_EDIDocumentTypeFactory attribute to the class declaration and pass your SAB_EDIDocumentType enum as value.
Example:
[SAB_EDIDocumentTypeFactory(SAB_EDIDocumentType::InboundDocument)]
- Implement all of the following methods, see the class library for more information.
- initDocument
- process
- postProcess
EDI document processing (Outbound)
- Create nnw action menu items for processing the EDI document.
- Example:
- SAB_EDIOutboundStagingWriter_OutboundExample
- Properties:
- Object Type: Class
- Object: SAB_EDIOutboundStagingWriterServiceController
- Enum Type Parmeter: SAB_EDIDocumentType
- Enum Parameter: [Outbound Example] - pass your document type enum
- Implement EDI staging writer class to process outbound documents
- Create staging forms for EDI documents
Implement EDI staging writer class to process outbound documents
- Extend the SAB_EDIOutboundStagingWriter class dependening on your extension scenario
- Customers documents - SAB_EDIOutboundStagingWriter_Customer
- Vendor documents - SAB_EDIOutboundStagingWriter_Vend
- 3PL documents - SAB_EDIOutboundStagingWriter_3PL
- All other documents - SAB_EDIOutboundStagingWriter
- Add SAB_EDIDocumentTypeFactory attribute to the class declaration and pass your SAB_EDIDocumentType enum as value.
Example:
[SAB_EDIDocumentTypeFactory(SAB_EDIDocumentType::OutboundDocument)]
- Implement all of the following methods, see the class library for more information.
- caption
- composeStagingHeader
- composeStagingLine
- initQueryRun
- initQueryRunFromBuffer
- sourceTableIdHeader
- sourceTableIdLine
- tradingPartnerFromSourceHeader
- tradingPartnerTableId
- Create action menu item for EDI document staging form.
- Example:
- SAB_EDIStagingFormRun_InboundExample
- Properties:
- Object Type: Class
- Object: SAB_EDIStagingFormRun
- Enum Type Parmeter: SAB_EDIDocumentType
- Enum Parameter: [Inbound Example] - pass your document type enum
- Implement SAB_EDIStagingFormClass for EDI documents
- Create action menu item for EDI workspace.
- Example:
- SAB_EDIStagingFormRunError_InboundExample
- Properties:
- Object Type: Class
- Object: SAB_EDIStagingFormRun
- Enum Type Parmeter: SAB_EDIDocumentType
- Enum Parameter: [Inbound Example] - pass your document type enum
- Extend the EDI menu item and add your staging form run action menu item under Documents
EDI > Documents > Inbound example


- Extend the SAB_EDIStagingFormClass
- Add SAB_EDIDocumentTypeFactoryAttribute attribute to the class declaration and pass your SAB_EDIDocumentType enum as value.
Example:
[SAB_EDIDocumentTypeFactoryAttribute(SAB_EDIDocumentType::InboundDocument)]
- Implement all of the following methods, see the class library for more information.
- DocumentType
Example:
protected SAB_EDIDocumentType DocumentType()
{
return SAB_EDIDocumentType::InboundExample;
}
- HeaderIdentificationFieldGroups
Example:
protected List HeaderIdentificationFieldGroups()
{
List fieldGroups = new List(Types::String);
fieldGroups.addEnd(tableFieldGroupStr(EDIExtensionInboundHeaderStaging, Overview));
fieldGroups.addEnd(tableFieldGroupStr(EDIExtensionInboundHeaderStaging, Details));
return fieldGroups;
}
- LinesHeaderFieldGroups
Example:
protected List LinesHeaderFieldGroups()
{
List fieldGroups = new List(Types::String);
fieldGroups.addEnd(tableFieldGroupStr(EDIExtensionInboundHeaderStaging, Overview));
fieldGroups.addEnd(tableFieldGroupStr(EDIExtensionInboundHeaderStaging, Details));
return fieldGroups;
}
- lineViewGridFieldGroup
Example:
protected str lineViewGridFieldGroup()
{
return tableFieldGroupStr(EDIExtensionInboundLineStaging, Details);
}
- mainGridFieldGroup
Example:
protected str mainGridFieldGroup()
{
return tableFieldGroupStr(EDIExtensionInboundHeaderStaging, Overview);
}