Framework EDI Reference. Methods and Properties
mailDocument. MapDispositionModifierError

Maps a Framework EDI standard error code to a Message Disposition Notification’s (MDN) disposition modifier extension field.

Syntax:

Parameters:

Returns

If successful returns 1 otherwise 0 if failed.

Remarks

The Disposition Modifier Extension field exists only in the MDN message in the “Disposition” header.  Example,

Disposition: automatic-action/MDN-sent-automatically;processed/error:some error description 

In the above example, the trailing text “error:some error description” is the disposition modifier and is explained as follows:

To remove a mapping, pass an empty string to the <sModifierDesc> parameter.  Example,

lResult = oMailDoc.MapDispositionModifierError(12406, “”, 0)

Example

Dim oEdiDoc As Fredi.ediDocument
Dim oSchemas As Fredi.ediSchemas
Dim oSchema As Fredi.ediSchema
Dim oMailDocument As Fredi.mailDocument
Dim oMDN As Fredi.mailMessage

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

' Set schemas for expected EDI document in the message.
Set oSchemas = oEdiDoc.GetSchemas
oSchemas.EnableStandardReference = False

' Load schema.
Set oSchema = oEdiDoc.LoadSchema(App.Path & "\ASCX12_850.SEF", Schema_Standard_Exchange_Format)

' Get internet mail document object
Set oMailDocument = oEdiDoc.GetMailDocument

' Map the error 12407 to the modifier extension "Invalid Data Element Time"
oMailDocument.MapDispositionModifierError 12407, "Invalid Data Element Time", 2

' Load EDI document normally.
oMailDocument.Load App.Path & "\SampleMail.TXT"

' Get message disposition notification.
Set oMDN = oMailDocument.GetMDN

' Save MDN.
oMDN.Save App.Path & "\MdnOutput.TXT"

MsgBox "Done"

Samples