Visual Studio 2017 doesn't like 850 PO Example
It complains about the List() not having a type.
It keeps combining the List with the loop but then it doesn't see the N1 object....or the N2, .. etc
I was able to finagle it a bit and it will see the N1 but then in doesn't see the N2, ... .
// Repeating N1 Loops result.N1Loop = new List(); // wants <T> or <Loop_N1_850> // Begin N1 Loop var n1Loop = new Loop_N1_850(); // Indicates that the buyer is ABC Aerospace. ABC's D-U-N-S+4 number is 123456789-0101. n1Loop.N1 = new N1(); n1Loop.N1.EntityIdentifierCode_01 = "BY"; n1Loop.N1.Name_02 = "ABC AEROSPACE"; n1Loop.N1.IdentificationCodeQualifier_03 = "9"; n1Loop.N1.IdentificationCode_04 = "1234567890101";
Comments
11 comments
Kind of what I am trying to accomplish:
Hi,
You can familiarize yourself with C# lists here.
Find example code for generating a sample purchase order here.
.NET Tutorial here.
Excerpt from the examples in the SDK (download from here);
To iterate through the list:
and regarding your snippet:
Thank you for your continued assistance.
I need help again. Similar problem: I am getting an error when I add pidList to PIDLoop.
This is as close as I am able to get after moving things around.
Hi,
I believe I did post the link for generating a sample PO, here it is again, it shows how to create list of loops, lists of segments, etc.
Here is a link to the EDI template for PO.
Thank you That example doesn't cover multiple loops however.
I am trying to extract data from a database for multiple PO's.
The first row gathers the initial data then the PO's are added:
I will have another look THX
Hi,
your
and
hence PO1loop.PIDLoop can only add Loop_PID_850 and not PID
Whew!!! Finally working.
Getting the hang of this ( SORRY ) ... and, thanks for the patience.
No problem at all, I'm glad you're getting your head around it. Once you do one template, you've done them all.
BTW, I have a hunch that you come from a different programming language, that is not C#, I hope you don't mind me asking what is it ? I'd be curious to know your honest opinion about how did you find the clarity of the documentation and source code examples to get you started and if there was anything else that would've helped to make this transition easier for you.
It's that obvious, ehe? LOL. I mostly write in Javascript or PHP and a little Python. I took a C# course over a year ago. But, that's all the experience I had in it until now.
I tend to learn by doing. Reworking examples I find. So, the more samples, the better.
Maybe just a little explanation of what templates are and how the hierarchy works. ( this likely exists ).
All in all the experience has been very positive. Good documentation, examples and great support.
My employers seem happy with my results. Since we will no longer be reinventing the wheel so much when we need a new EDI this, in theory, should save us a lot of time.
My current implementation is here if your curious:
https://github.com/061375/EDIFabric-Implementation-Test
Since most of the EDI will be the X12850 I built a main class around that and it sub-classes when there are differences in the customer variables.
Thank you for taking the time and giving an honest answer. Publishing a link to your implementation is very much appreciated and I'm sure others will benefit from it.
Cheers,
Don
Please sign in to leave a comment.