Hmmm, that isn't good. I'm sending in the three distributions, and they look good in GP, but somehow they are being duplicated.
I triple check my code to confirm I'm not doing anything silly, and the code looks good. I then check the XML that is being sent to eConnect, and it looks good as well--only 3 distributions are being sent.
So if only 3 distributions are being sent to eConnect and the stored procedure is only being called 3 times, how do I have 6 distribution lines in GP?
Although I have encountered several eConnect bugs over the years, I found it difficult to believe that this could be an eConnect bug. Hundreds of people would have discovered this issue by now, so I have to assume it isn't a bug.
I then decide to randomly query the distribution records in SQL (SOP10102) to see what they look like. And that is when it dawns on me.
Notice that the first three records have a DistRef value. But the last 3 records don't.
The first three records are ones that I'm sending in to eConnect. So what are the second three?