Extra UNT block in EDIFACT generation
Hi,
I have a problem with generating EDI document. In my C# model I have got UNT block in main model class:
Snippet
Snippet
public class MyMessage : EdiMessage { [Pos(1)] public UNH UNH { get; set; } [Pos(2)] public MyDatas MyDatas{ get; set; } [Pos(3)] public UNT UNT { get; set; } }
And EDI files are parsing correctly, when I am using this model (0 errors). The problem is, that I want to generate from this model back the EDI format file. And the additional UNT block appears in the file
UNA:+.? '
UNB+UNOA:2+XX:X+YY:Y+180530:1041+00000000019975++++1++1'
UNH+20855076+MYTYPE:1:0:AS'
//... MyDatas
UNT+19+20855076' <- UNT from MyMessage
UNT+20' <- additional UNT, I don't want it :)
UNZ+1+00000000019975'
I saw that some other person has the problem also, but he was not provided a resolution: https://stackoverflow.com/questions/41862055/c-sharp-edifabric-extra-unt-message-trailer-segment
Additional information: I am not using EdiFabric UNH and UNT blocks. I have my own UNH and UNT models.
Has anyone had a similar problem?
Comments
1 comment
Hello,
Ensure that UNH and UNT are referenced from EdiFabric.Core. e.g.
EdiFabric.Core.Model.Edi.Edifact.UNH
EdiFabric.Core.Model.Edi.Edifact.UNT
Admin
Please sign in to leave a comment.