Home Page › Forums › BizTalk 2004 – BizTalk 2010 › Copy one message into another › Re: Copy one message into another
I fixed it !!!!!! [:D]
First of all thank you to the responses above. I followed the link and determined that I had to copy the CONTEXT as well as the message.
So my new code looks like this:
System.Diagnostics.EventLog.WriteEntry(“1″,”1”);
msgEDIRebateCopy = msgEDIRebate;
msgEDIRebateCopy(*) = msgEDIRebate(*);
System.Diagnostics.EventLog.WriteEntry(“2″,”2”);
msgEDIRebateCopy(Rebate.PropertySchema.CompanyNumber) = 905;
System.Diagnostics.EventLog.WriteEntry(“3″,”3”);
msgEDIRebateCopy(Rebate.PropertySchema.EDIDocumentNumber) = 22;
System.Diagnostics.EventLog.WriteEntry(“4″,”4”);
msgEDIRebateCopy(Rebate.PropertySchema.EDIBatchNumber) = 546;
System.Diagnostics.EventLog.WriteEntry(“5″,”5”);
And voilla it now makes it all the way to number 5.
If you are interested and have time read on:
There are currently 2 projects in the solution. “Claims” and “Rebates”.
The Claims project always existed from before I started here.
When I joined I was asked to create a “rebates” project.
It is identical to the claims in every way except that
1) It would have a different namespace and
2) The schema would have 2 extra fields (RebateType and RebateValue)
I was told to copy the Claims project EXACTLY – only change variable names etc to match rebates.
So I did this. Eg: The message copy code is taken verbatim from claims – it does not have any CONTEXT copying and yet it works fine.
Weird!