Removing Empty Elements And Empty Composite Elements
It is good practice when creating EDI files not to leave trailing empty data elements and composite data elements. EDI Documents does this for you automatically.
For example, a segment like the following is incorrect:
EDI document removes trailing empty data elements and composite data elements. The above segment would be converted to the following:
You can turn this off/on if desired. We recommend that you leave these settings to their default values.
ediDocument.TruncateEmptyElements = true;
ediDocument.TruncateEmptyCompositeElements = true;