Framework EDI Reference. Methods and Properties
ediWarnings. DisableEdiError

Suppresses or disables an EDI related error.

Syntax:

Parameters:

Returns:

Returns 1 if the setup succeeds; otherwise 0 if it fails.

Remarks:

One or more of the following parameters sTransactionSetId, sSegmentId, sElementId, lElementInstance, sSubElementId, and lSubElementInstance can be specified to narrow down the location of the entity under which the error may occur.  The parameter combination is hierarchichal, that is, if sTransactionSetId and sSegmentId are specified then the sSegmentId is a data segment under the context of the transaction set/message with the matching sTransactionSetId; or, if only sSegmentId and sElementId are specified then sElementId is a data element under the data segment with the matching sSegmentId; and so on. 

This method sets up one or more errors to suppress or disable, so it must be called before loading the document.

 

Example

Dim oEdiDoc As Fredi.ediDocument
Dim oSchemas As Fredi.ediSchemas
Dim oSchema As Fredi.ediSchema
Dim oWarnings As Fredi.ediWarnings
Dim oWarning As Fredi.ediWarning
Dim i As Integer
Dim sErrorsStr As String

' Create instance of Framework EDI.
Set oEdiDoc = New Fredi.ediDocument

' Get the warnings object
Set oWarnings = oEdiDoc.GetWarnings

' Disable errors (comment the lines below to see the errors)
oWarnings.DisableEdiError "12466"
oWarnings.DisableEdiError "13831"
oWarnings.DisableEdiError "6016"

' Disable standard reference library.
Set oSchemas = oEdiDoc.GetSchemas
oSchemas.EnableStandardReference = False

' Load the schema that the EDI file will use.
Set oSchema = oEdiDoc.LoadSchema(App.Path & "\ASCX12_850.SEF", Schema_Standard_Exchange_Format)

' Process the EDI file.
oEdiDoc.LoadEdi App.Path & "\SampleEdi.X12"

If oWarnings.Count > 0 Then

For i = 1 To oWarnings.Count

Set oWarning = oWarnings.Warning(i)

sErrorsStr = sErrorsStr & oWarning.Description & vbCrLf

Next

MsgBox sErrorsStr

Else

MsgBox "No errors found."

End If