Use an EDI document to read data from or write data to a file if you use EDIFACT or ANSI X12 for your EDI. The data in the file is structured in line with these standards.

You can use an EDI type to indicate which EDI standard is used for the EDI document. For example, EDIFACT or ANSI X12.
For each EDI type, you can set up qualifiers for an EDI segment.

Application Consultant Application Consultant Start Start EDI type required? EDI type required? Set up EDI type and qualifiers

Set up EDI type and qualifiers

You can use an EDI type to indicate which EDI standard is used. For example, EDIFACT or ANSI X12. This is used for informational purposes only.

For each EDI type, you can set up qualifiers for an EDI segment.

Set up document - EDI Set up document - EDI Use an EDI document to read data from or write data to a file if you use an EDI standard for your EDI. For example: EDIFACT or ANSI X12. The data in the file is structured in line with these standards.Note: If you do not use an EDI standard, you can use other EDI document types for EDI. For example: JSON, XML, or Text. Procedure 1. Click Connectivity studio Integration Design. 2. Click the Documents tab. 3. Click New. 4. Define a meaningful name for the document. Example: If the document is used for a sales integration, you can use names like 'Sales - Order' or 'Sales - Invoice'. In the Document field, type a value. Note: Best practice: In the document name, do not use the: - Application: Use the Application field to define the applicable application. - Document type: Use the Document type field to define the applicable document type. 5. In the Project field, enter or select a value. 6. Define the applicable application for the document. For an EDI document, for example, select an 'EDI' application. In the Application field, enter or select a value. Note: You can only select an application that is defined for the applicable project. You can define project applications on the Projects page. 7. In the Document types field, select 'EDI'. 8. Sub-task: Set properties. 9. Expand the Properties section. 10. In the Encoding field, enter or select a value. 11. Select Yes in the Without BOM field. 12. In the Process type field, select an option. 13. Select Yes in the Use dynamic encoding field. 14. You can use an EDI type to indicate which EDI standard is used for the EDI document. For example, EDIFACT or ANSI X12. This is used for informational purposes only. In the EDI type field, enter or select a value. Note: If you want to use qualifiers, in the document record fields, make sure to select an EDI type with the desired qualifiers defined. 15. Sub-task: Set custom handler. 16. Expand the Custom section. 17. For an EDI document, two standard handler classes are available: - BisDocumentEdi: This handler class reads data from or writes data to a text file using an EDI standard, for example, EDIFACT or ANSI X12. - BisDocumentEDIFACTCounter: This handler class reads data from or writes data to a text file using EDIFACT. With this handler class, you can apply numbering and control counts to your EDI messages. The numbering and counts are only applied on write. You can use a customized handler class. To do so, extend a standard handler class. In the Handler field, enter or select the desired handler class. Note: BisDocumentEDIFACTCounter handler: With the 'BisDocumentEDIFACTCounter' handler class you add these values to a message: - Header number. Uses the MESSAGEREFERENCENUMBER element of the UNH segment to store the sequential number of the header in the message. - Segment count. Uses the NUMBEROFSEGMENTIN and MESSAGEREFERENCENUMBER elements of the UNT segment to store the number of segments within the applicable header. For each header, the segment count starts again. - Header count. Uses the INTERCHANGECONTROLCOUNT of the UNZ segment to store the number of headers (UNH segments) in the message. To apply this, in the document, add the mentioned elements as fields to the applicable records. Example: Add the MESSAGEREFERENCENUMBER field to the UNH record. Version 3 handler: Select the 'BisDocumentEdiV3' or 'BisDocumentEDIFACTCounterV3' handler, if you, on a message, use the XML document in combination with a connector of one of these types: - Web service - Blob storage - Upload 18. Sub-task: Set read options. 19. Expand the Read section. 20. In the Read filename field, type a value. 21. Select Yes in the Read only once field. 22. On running an applicable message, you can have a dialog shown with the data to be imported. You can review the data before it is actually imported. This can, for example, be useful when importing work breakdown structures, because you cannot easily undo the import. The dialog is only shown if you manually run the message. So, the dialog is not shown if you run the message in batch. Select Yes in the Validate input field. Note: If you use input validation, make sure the Process type is set to 'Query'. 23. Sub-task: Set write options. 24. Expand the Write section. 25. Using a variable, you can add the value of two table fields to the filename. If you want to do so, define the applicable table. On write, this document is the target document. However, the file name is defined based on the root record values of the source document. So, make sure you select a table and table fields from the root record of the applicable source document. In the Table name field, enter or select a value. Note: You cannot use the table name itself as variable in the filename. 26. Define the first table field which value you want to add to the file name. The related variable is '%5'. In the First field field, enter or select a value. Note: You can only select a field from the defined table. 27. Define the second table field which value you want to add to the file name. The related variable is '%6'. In the Second field field, enter or select a value. Note: You can only select a field from the defined table. 28. In the Number sequence field, enter or select a value. 29. In the Write filename field, type a value. 30. Sub-task: Set record layout options. 31. Expand the Record layout section. 32. In the Segment terminator field, type a value. 33. In the Data element separator field, type a value. 34. In the Sub-element separator field, type a value. 35. In the Release character field, type a value. 36. Close the page. Add document records - EDI Add document records - EDI To each document, add the data records to be exchanged. For external file-based documents, set up the records in line with how the data is structured and named in the file.This topic explains how to add records to an EDI document. Procedure 1. Click Connectivity studio Integration Design. 2. Click the Documents tab. 3. In the list, find and select the desired EDI document. 4. Click Edit. 5. In the Record section, click Add line. 6. In the Record field, type a value. 7. In the Record table field, keep the default value 'BisBufferTable'. 8. In the Parent record field, enter or select a value. 9. Select Yes in the Combine with parent record field. 10. In the Join mode field, select an option. 11. Select Yes in the History field. 12. Sub-task: Set record details. 13. In the Line details section, define the detailed settings for the record. In a document, you can need to repeat an element in the records. However, you cannot give these records the same name. Use the Segment group to refer to the relevant segment name in the file. Example: You have different date/time/period values. In the document, you create a DTM_Header record and an DTM_Line record. For both, the segment group is 'DTM' (date/time/period). Note: If the element repeats for the same parent record, use a qualifier to identify the correct record. In the Segment group field, type a value. Note: Set up the records in line with the used EDI standard. So, as record names use the segment acronyms as defined in the naming convention for the applicable EDI standard. 14. Close the page. Notes Generic external document record details fields:External reference: You can indicate which field of the record contains the unique ID of the record in the external database. In this way, you link the external ID to the D365 FO record ID. Note: Usually, you only use this for an ODBC connection with CRM or if you use web services.Revision field: You can indicate which of the records fields contains the revision of the record in the external database. In this way, you find and link the latest revision to the record ID. Note: You can only use this field in combination with the External reference field. Manage document record setup - EDI documents

Manage document record setup - EDI documents

You have several options to manage the document record setup for EDI documents.
You can:
  • Change the sequence of the records.
  • View where a record is used.
  • Define a range if you use qualifiers.
  • Validate the record setup.

Copy fields Copy fields You can copy fields from a record of another document. You can use this, for example, to save setup time if you use a specific record in several documents.You can only copy fields:From a record with the Record table defined.To a record with no fields.As a result, the full field setup is copied from the selected record to the current record. Procedure 1. Click Connectivity studio Integration Design. 2. Click the Documents tab. 3. In the list, find and select the desired document. 4. Click Edit. 5. In the Record section, in the Record list, find and select the desired record. 6. Click Copy fields. 7. In the Record field, select the desired record from another document. Note: You can only select a record with the same Record table defined as the current record. 8. Click OK. 9. Close the page. Select fields Select fields You can add a selection of table fields to a record. You can select fields from the D365 FO table that is defined in the Record table field.This is mainly applicable to internal documents. However, you can also use this to quickly set up fields for external file-based documents.When the field selection is added to the record, review and complete the properties of the added fields. Procedure 1. Click Connectivity studio Integration Design. 2. Click the Documents tab. 3. In the list, find and select the desired document. 4. Click Edit. 5. In the Records section, in the Record list, find and select the desired record. 6. Click Select fields. 7. Sub-task: Define filter. 8. In the Table name field, enter or select a value. 9. Select Yes in the Show system fields field. 10. Select No in the Show inherited fields field. 11. Usually, you add fields to an internal document record with the type as defined in the table setup. However, you can add all selected fields with the type set to String. Select Yes in the Create as string fields field. Note: This field is only available for internal documents. 12. Sub-task: Select fields. 13. Click Select the fields of a specific group to open the drop dialog. 14. In the Field group name field, enter or select a value. 15. Click OK. 16. Click Select all. 17. Click Deselect all fields. 18. Click Select mandatory. 19. Select the Selected check box for the desired fields. 20. Click OK. Add document record fields - EDI Add document record fields - EDI To each document record, add the data fields which values must be exchanged. For external file-based documents, set up the fields in line with naming in the file.For EDI documents, fields are always of type string, to enable type conversions.This topic explains how to add record fields to an EDI document.If fields are already initialized for, selected for, or copied to the record, you can review and complete the setup for these fields. To do so, skip step 6. Procedure 1. Click Connectivity studio Integration Design. 2. Click the Documents tab. 3. In the list, find and select the desired EDI document. 4. Click Edit. 5. In the Records section, in the Record list, find and select the desired record. 6. On the Fields tab, click New. 7. As a field name, enter a free-definable name. Usually, this is the name used in the external file. In the Field name field, type a value. Note: The value of this field cannot have spaces. 8. As a record table, enter a free-definable name. Usually, this is the name used in the external file. The value, as entered in the Field name field, is the default value. You can change this value. In the Record table field field, type a value. Note: The value of this field cannot have spaces. 9. Select the Key field check box. 10. In the Mandatory field, select an option. 11. In the Length field, enter a number. 12. In the Segment tag field, type a value. 13. For each document record field, you can define a qualifier. A common segment for which qualifiers are used is the address (NAD) segment. You can have different addresses in the same segment, for example, delivery address and invoice address. Use qualifiers to distinguish these addresses in the EDI file. In the qualifier field, select the applicable qualifier. You can only use qualifiers as defined for the EDI type of the document. In the Qualifier field, enter or select a value. Note: You must also indicate which qualifier value is applicable for the field. To do so, on the Ranges tab create a range for the current field and select the applicable qualifier. Example: Use the 3035 (party function code) qualifier for the NAD (name and address) segment with these values: - DP; Delivery party; Party to which goods must be delivered. - IV; Invoicee; Party to which an invoice is issued. 14. Select the Start segment check box. 15. Select the End segment check box. 16. Select the Data element check box. 17. Select the Sub-element check box. 18. Sub-task: Set external references for record. 19. In the Line details section, set the external references for the record. You can indicate which of the records fields contains the unique ID of the record in the external database. In this way, you link the external ID to the record ID. In the External reference field, enter or select a value. Note: Usually, you only use this for an ODBC connection with CRM or if you use web services. 20. You can indicate which of the records fields contains the revision of the record in the external database. In this way, you find and link the latest revision to the record ID. In the Revision field field, enter or select a value. Note: You can only use this field in combination with the External reference field. 21. Close the page. Manage document record field setup

Manage document record field setup - Internal documents

You have several options to manage the document record field setup for internal documents.
You can:

  • Change the sequence of the fields.
  • View where a field is used.
  • Clean up unused fields.
  • Create a related record.

Validate connectivity setup

Validate connectivity setup

If you open a form or save (changes to) the setup of a key element in Connectivity studio, the setup is validated automatically. If errors are found in the setup, an error icon   is shown. You can click the icon to show the related error messages.

You can also manually start an automated test to check for errors in the setup. As a result, the found errors are shown. Also, the error icons are shown where applicable.
When errors are found, you can try to fix these errors automatically.
You can check and auto-fix errors for these key elements in Connectivity studio:
 

Key element

Check

Projects

When automatically checked, only the project setup is checked, and not the related setup like messages and connectors. When started manually, the full project setup is checked.

Documents

The document setup is checked, including the document records setup.

Document records

Only the document records setup is checked.

Messages

The message setup is checked, including the data synchronization setup and message mapping.

Message - Data synchronization setup

Only the data synchronization setup is checked.

Message mapping

Only the message mapping is checked.

Message business events

A check is done if a business event is created for the message business event. Also, a check is done if the target fields and source fields match with the related document setup.

Connectors

Only the connector setup is checked.

Web services

The web service setup is checked, including the data synchronization setup.

Web service - Data synchronization setup

Only the data synchronization setup is checked.

 
In this flow, in the activity steps, as an example, the validation is done for documents.

End End Yes No

Activities

Name Responsible Description

Set up EDI type and qualifiers

Application Consultant

You can use an EDI type to indicate which EDI standard is used. For example, EDIFACT or ANSI X12. This is used for informational purposes only.

For each EDI type, you can set up qualifiers for an EDI segment.

Set up document - EDI

Application Consultant

Use an EDI document to read data from or write data to a file if you use an EDI standard for your EDI. For example: EDIFACT or ANSI X12. The data in the file is structured in line with these standards.
Note: If you do not use an EDI standard, you can use other EDI document types for EDI. For example: JSON, XML, or Text.

Add document records - EDI

Application Consultant

To each document, add the data records to be exchanged. For external file-based documents, set up the records in line with how the data is structured and named in the file.

This topic explains how to add records to an EDI document.

Manage document record setup - EDI documents

Application Consultant

You have several options to manage the document record setup for EDI documents.
You can:
  • Change the sequence of the records.
  • View where a record is used.
  • Define a range if you use qualifiers.
  • Validate the record setup.

Copy fields

Application Consultant

You can copy fields from a record of another document. You can use this, for example, to save setup time if you use a specific record in several documents.
You can only copy fields:
  • From a record with the Record table defined.
  • To a record with no fields.
As a result, the full field setup is copied from the selected record to the current record.

Select fields

Application Consultant

You can add a selection of table fields to a record. You can select fields from the D365 FO table that is defined in the Record table field.

This is mainly applicable to internal documents. However, you can also use this to quickly set up fields for external file-based documents.

When the field selection is added to the record, review and complete the properties of the added fields.

Add document record fields - EDI

Application Consultant

To each document record, add the data fields which values must be exchanged. For external file-based documents, set up the fields in line with naming in the file.
For EDI documents, fields are always of type string, to enable type conversions.
This topic explains how to add record fields to an EDI document.
If fields are already initialized for, selected for, or copied to the record, you can review and complete the setup for these fields. To do so, skip step 6.

Manage document record field setup - Internal documents

Application Consultant

You have several options to manage the document record field setup for internal documents.
You can:
  • Change the sequence of the fields.
  • View where a field is used.
  • Clean up unused fields.
  • Create a related record.

Validate connectivity setup

Application Consultant

If you open a form or save (changes to) the setup of a key element in Connectivity studio, the setup is validated automatically. If errors are found in the setup, an error icon   is shown. You can click the icon to show the related error messages.

You can also manually start an automated test to check for errors in the setup. As a result, the found errors are shown. Also, the error icons are shown where applicable.
When errors are found, you can try to fix these errors automatically.
You can check and auto-fix errors for these key elements in Connectivity studio:
 

Key element

Check

Projects

When automatically checked, only the project setup is checked, and not the related setup like messages and connectors. When started manually, the full project setup is checked.

Documents

The document setup is checked, including the document records setup.

Document records

Only the document records setup is checked.

Messages

The message setup is checked, including the data synchronization setup and message mapping.

Message - Data synchronization setup

Only the data synchronization setup is checked.

Message mapping

Only the message mapping is checked.

Message business events

A check is done if a business event is created for the message business event. Also, a check is done if the target fields and source fields match with the related document setup.

Connectors

Only the connector setup is checked.

Web services

The web service setup is checked, including the data synchronization setup.

Web service - Data synchronization setup

Only the data synchronization setup is checked.

 
In this flow, in the activity steps, as an example, the validation is done for documents.

Activities

Name Responsible Description

Set up EDI type and qualifiers

Application Consultant

You can use an EDI type to indicate which EDI standard is used. For example, EDIFACT or ANSI X12. This is used for informational purposes only.

For each EDI type, you can set up qualifiers for an EDI segment.

Set up document - EDI

Application Consultant

Use an EDI document to read data from or write data to a file if you use an EDI standard for your EDI. For example: EDIFACT or ANSI X12. The data in the file is structured in line with these standards.
Note: If you do not use an EDI standard, you can use other EDI document types for EDI. For example: JSON, XML, or Text.

Add document records - EDI

Application Consultant

To each document, add the data records to be exchanged. For external file-based documents, set up the records in line with how the data is structured and named in the file.

This topic explains how to add records to an EDI document.

Manage document record setup - EDI documents

Application Consultant

You have several options to manage the document record setup for EDI documents.
You can:
  • Change the sequence of the records.
  • View where a record is used.
  • Define a range if you use qualifiers.
  • Validate the record setup.

Copy fields

Application Consultant

You can copy fields from a record of another document. You can use this, for example, to save setup time if you use a specific record in several documents.
You can only copy fields:
  • From a record with the Record table defined.
  • To a record with no fields.
As a result, the full field setup is copied from the selected record to the current record.

Select fields

Application Consultant

You can add a selection of table fields to a record. You can select fields from the D365 FO table that is defined in the Record table field.

This is mainly applicable to internal documents. However, you can also use this to quickly set up fields for external file-based documents.

When the field selection is added to the record, review and complete the properties of the added fields.

Add document record fields - EDI

Application Consultant

To each document record, add the data fields which values must be exchanged. For external file-based documents, set up the fields in line with naming in the file.
For EDI documents, fields are always of type string, to enable type conversions.
This topic explains how to add record fields to an EDI document.
If fields are already initialized for, selected for, or copied to the record, you can review and complete the setup for these fields. To do so, skip step 6.

Manage document record field setup - Internal documents

Application Consultant

You have several options to manage the document record field setup for internal documents.
You can:
  • Change the sequence of the fields.
  • View where a field is used.
  • Clean up unused fields.
  • Create a related record.

Validate connectivity setup

Application Consultant

If you open a form or save (changes to) the setup of a key element in Connectivity studio, the setup is validated automatically. If errors are found in the setup, an error icon   is shown. You can click the icon to show the related error messages.

You can also manually start an automated test to check for errors in the setup. As a result, the found errors are shown. Also, the error icons are shown where applicable.
When errors are found, you can try to fix these errors automatically.
You can check and auto-fix errors for these key elements in Connectivity studio:
 

Key element

Check

Projects

When automatically checked, only the project setup is checked, and not the related setup like messages and connectors. When started manually, the full project setup is checked.

Documents

The document setup is checked, including the document records setup.

Document records

Only the document records setup is checked.

Messages

The message setup is checked, including the data synchronization setup and message mapping.

Message - Data synchronization setup

Only the data synchronization setup is checked.

Message mapping

Only the message mapping is checked.

Message business events

A check is done if a business event is created for the message business event. Also, a check is done if the target fields and source fields match with the related document setup.

Connectors

Only the connector setup is checked.

Web services

The web service setup is checked, including the data synchronization setup.

Web service - Data synchronization setup

Only the data synchronization setup is checked.

 
In this flow, in the activity steps, as an example, the validation is done for documents.
Related to Notes

Set up EDI document

 

Provide feedback