We are trying to populate the error segment of a RSP_K21. Using the following code does not work, it returns back a null array of ELD's back to our local reference "errorCodesAndLocations" and we cannot assign back to it.
NHapi.Model.V24.Segment.ERR outgoingERRSegment = (ERR)NHapiResponseMessage.GetStructure("ERR");
NHapi.Model.V24.Datatype.ELD errorCodesAndLocations = outgoingERRSegment.GetErrorCodeAndLocation();
Is there a better way? Thank you.
We found the solution and I'll post my own answer- use a Terser:
terser.Set("ERR-1(" + errorIndex.ToString() + ")-1", error.SegmentID);