In testing, my trading partner told me they were expecting 20150818 (date with century) in the following bold field.


The GS indicates this is the “GS Segment”, the fields are numbered GS01, GS02, GS03, GS04 etc… based on the separator character, which in this case is the Shift-6 carrot symbol.

In BizTalk, this field is NOT mapped by the developer.  Instead, the EDI functions of BizTalk creates the line and formats the data on it.

You have to set up Parties in the BizTalk Admin console to use EDI in BT2010. Then you create an “agreement” between those two parties.
Select the agreement, click the proper tab on the top (I had to blur out the company names), then click on the “Envelopes” option on the very lower left.
Scroll right until you find the GS4 segment, then select the desired date format.


You can also type in the desired GS02 and GS03 values above.


Exporting and importing EDI Parties in BizTalk has a few challenges.  How do you migrate just one or two parties and agreements?  As BizTalk developers, we typically have to move bindings around 2 to 4 times, such as developer machine to DEV or TEST environment, then to UAT (User Acceptance Testing) or QA (Quality Assurnace) environment, and then ultimate to the production environment.

This MSDN post in the BizTalk Forum the question was asked how to export a single party from the Trading Party Management (TPM) system.  Sounds like a great opportunity for someone to create a helper solution, but I don’t have time for that right now.

I have tested this following.

1. As a proof of concept, I wanted to see if exporting parties from two different apps gives me the same parties in xml format.

a. From BizTalk Admin Console, pick an application and do right-click and select “Export” then “Bindings”.  Click the checkbox in the lower left


b. Now do the same thing for a different application, even one that doesn’t use EDI at all.

c. Edit the two binding files that were created.  The goal is to eliminate everything except the parties. So delete delete from <ModuleRefCollection> to line before <PartyCollection> (which is probably </ReceivePortCollection>, then save each file.  Now use you favorite file compare utility, such as WinCompare, BeyondCompare, or Total Commander’s built-in file compare, and you will see the PartyCollection sections are identical.

2. Before testing the migration of your EDI Parties from one system to another, you want to be sure you backup the parties on the target system.  This is done the same manner as above; there doesn’t seem to be a way to export only parties, you have to pick one app, then export it with “Export Global Party information” checked.  If you have to restore, you will have to delete parties and agreements in BizTalk Admin console, then re-import the binding file. (Just importing the binding file would not delete anything new that you would have added.)





Sample of error:

This was happening when I was exporting and importing bindings from a developer machine to our QA (Quality Assurance) environment. Looking back, the problem seems obvious, but it I lost over an hour chasing it down.

So on my developer machine, I had a project reference from the application project to the “BizTalk EDI Application”. On the QA system, I had the same target application, but at that point, it had never used EDI, so it didn’t have the project reference. All I had to do was add the project reference, then the import worked fine.