Codeunit 70491811 EOS074 EDI Management

Codeunit 70491811 EOS074 EDI Management

Methods

IsInbound

procedure IsInbound(EdiMessageType: Enum "EOS074 Message Type"): Boolean

Parameters / Return Value

  • EdiMessageType Enum "EOS074 Message Type"

  • Returns Boolean


IsOutbound

procedure IsOutbound(EdiMessageType: Enum "EOS074 Message Type"): Boolean

Parameters / Return Value

  • EdiMessageType Enum "EOS074 Message Type"

  • Returns Boolean


GetSetup

procedure GetSetup(EDIMsgHeader: Record "EOS074 EDI Message Header")

Parameters / Return Value

  • EDIMsgHeader Record "EOS074 EDI Message Header"

TryExportFile

procedure TryExportFile(var EDIMsgHeader: Record "EOS074 EDI Message Header"): Boolean

Tries to export a file for the given EDI message header. This method will always succeed and raise the appropriate success or failure events. Be aware that this method contains a COMMIT.

Parameters / Return Value

  • EDIMsgHeader Record "EOS074 EDI Message Header"

    The message header to be exported.

  • Returns Boolean

    true if the export succeeded, false otherwise.


TryExportFile

procedure TryExportFile(var EDIMsgHeader: Record "EOS074 EDI Message Header"; var EdiFile: Record "EOS074 EDI File"): Boolean

Tries to export a file for the given EDI message header. This method will always succeed and raise the appropriate success or failure events. Be aware that this method contains a COMMIT.

Parameters / Return Value

  • EDIMsgHeader Record "EOS074 EDI Message Header"

    The message header to be exported.

  • EdiFile Record "EOS074 EDI File"

    The EDI file that was created.

  • Returns Boolean

    true if the export succeeded, false otherwise.


ExportFile

procedure ExportFile(var EDIMsgHeader: Record "EOS074 EDI Message Header")

Export a file for the given EDI message header. This method will not raise any success or failure events. If you need to handle success or failure, use TryExportFile instead.

Parameters / Return Value

  • EDIMsgHeader Record "EOS074 EDI Message Header"

    The message header to be exported.


ExportFile

procedure ExportFile(var EDIMsgHeader: Record "EOS074 EDI Message Header"; var EdiFile: Record "EOS074 EDI File")

Export a file for the given EDI message header. This method will not raise any success or failure events. If you need to handle success or failure, use TryExportFile instead.

Parameters / Return Value

  • EDIMsgHeader Record "EOS074 EDI Message Header"

    The message header to be exported.

  • EdiFile Record "EOS074 EDI File"

    The EDI file that was created.


CreateEDIHeader

procedure CreateEDIHeader(var EDIMsgHeader: Record "EOS074 EDI Message Header"; EDIMessageSetup: Record "EOS074 EDI Message Setup"): Boolean

Parameters / Return Value

  • EDIMsgHeader Record "EOS074 EDI Message Header"

  • EDIMessageSetup Record "EOS074 EDI Message Setup"

  • Returns Boolean


CreateEDIHeader

procedure CreateEDIHeader(var EDIMsgHeader: Record "EOS074 EDI Message Header"; EDIMessageSetup: Record "EOS074 EDI Message Setup"; SourceType: Integer; SourceSubtype: Integer; SourceNo: Code[20]; SourceDate: Date): Boolean

Parameters / Return Value

  • EDIMsgHeader Record "EOS074 EDI Message Header"

  • EDIMessageSetup Record "EOS074 EDI Message Setup"

  • SourceType Integer

  • SourceSubtype Integer

  • SourceNo Code[20]

  • SourceDate Date

  • Returns Boolean


GetEAN

procedure GetEAN(ItemNo: Code[20]; VariantCode: Code[10]; Type: Enum "EOS074 Consumer/Transport Type") EANString: Code[20]

Parameters / Return Value

  • ItemNo Code[20]

  • VariantCode Code[10]

  • Type Enum "EOS074 Consumer/Transport Type"

  • Returns Code[20]


GetItemReference

procedure GetItemReference(ItemNo: Code[20]; VariantCode: Code[10]; Type: Enum "EOS074 Consumer/Transport Type"): Code[50]

Parameters / Return Value

  • ItemNo Code[20]

  • VariantCode Code[10]

  • Type Enum "EOS074 Consumer/Transport Type"

  • Returns Code[50]


GetCustCrossReference

procedure GetCustCrossReference(ItemNo: Code[20]; VariantCode: Code[10]; UoM: Code[10]; CustomerNo: Code[20]) EANString: Code[20]

Parameters / Return Value

  • ItemNo Code[20]

  • VariantCode Code[10]

  • UoM Code[10]

  • CustomerNo Code[20]

  • Returns Code[20]


GetCustomerItemReference

procedure GetCustomerItemReference(ItemNo: Code[20]; VariantCode: Code[10]; UoM: Code[10]; CustomerNo: Code[20]): Code[50]

Parameters / Return Value

  • ItemNo Code[20]

  • VariantCode Code[10]

  • UoM Code[10]

  • CustomerNo Code[20]

  • Returns Code[50]


GetInputFileEncoding

procedure GetInputFileEncoding(EDIMessageHeader: Record "EOS074 EDI Message Header"; var InputFileEncoding: TextEncoding): Boolean

Parameters / Return Value

  • EDIMessageHeader Record "EOS074 EDI Message Header"

  • InputFileEncoding TextEncoding

  • Returns Boolean


CalcDocCheckBuffer

procedure CalcDocCheckBuffer(var DocCheckBuffer: Record "EOS074 EDI Docum. Check Buffer"; CustomerFilter: Text; StartingDate: Date; EndingDate: Date; EDIGroupCodeFilter: Text)

Parameters / Return Value

  • DocCheckBuffer Record "EOS074 EDI Docum. Check Buffer"

  • CustomerFilter Text

  • StartingDate Date

  • EndingDate Date

  • EDIGroupCodeFilter Text


ShowEDI

procedure ShowEDI(DocVariant: Variant)

Parameters / Return Value

  • DocVariant Variant

FindEDI

procedure FindEDI(DocVariant: Variant; var EDIValues: Record "EOS074 EDI Values"): Boolean

Parameters / Return Value

  • DocVariant Variant

  • EDIValues Record "EOS074 EDI Values"

  • Returns Boolean


CreateEDI

procedure CreateEDI(DocVariant: Variant; var EDIValues: Record "EOS074 EDI Values")

Parameters / Return Value

  • DocVariant Variant

  • EDIValues Record "EOS074 EDI Values"


ReadTokenFix

procedure ReadTokenFix(EDILine: Record "EOS074 EDI Message Line"; FromPos: Integer; ToPos: Integer): Text[250]

Parameters / Return Value

  • EDILine Record "EOS074 EDI Message Line"

  • FromPos Integer

  • ToPos Integer

  • Returns Text[250]


ReadTokenField

procedure ReadTokenField(EDILine: Record "EOS074 EDI Message Line"; TokenNo: Integer; FieldNo: Integer; TokenSep: Text[30]; FieldSep: Text[30]): Text[250]

Parameters / Return Value

  • EDILine Record "EOS074 EDI Message Line"

  • TokenNo Integer

  • FieldNo Integer

  • TokenSep Text[30]

  • FieldSep Text[30]

  • Returns Text[250]


FormatDec

procedure FormatDec(DecimalText: Text[30]): Decimal

Parameters / Return Value

  • DecimalText Text[30]

  • Returns Decimal


ConvertQty

procedure ConvertQty(ItemNo: Code[20]; UoMCode: Code[10]; NewUoMCode: Code[10]; Qty: Decimal): Decimal

Parameters / Return Value

  • ItemNo Code[20]

  • UoMCode Code[10]

  • NewUoMCode Code[10]

  • Qty Decimal

  • Returns Decimal


CollectEdiHeadersByDocument

procedure CollectEdiHeadersByDocument(DocumentVariant: Variant; var TempEdiHeader: Record "EOS074 EDI Message Header"): Boolean

Parameters / Return Value

  • DocumentVariant Variant

  • TempEdiHeader Record "EOS074 EDI Message Header"

  • Returns Boolean


Events

OnBeforeExportFile

local procedure OnBeforeExportFile(var EDIMsgHeader: Record "EOS074 EDI Message Header"; EDIMsgSetup: Record "EOS074 EDI Message Setup"; var Handled: Boolean)

Execute before exporting the file If you want to use an alternative export method

Parameters / Return Value

  • EDIMsgHeader Record "EOS074 EDI Message Header"

  • EDIMsgSetup Record "EOS074 EDI Message Setup"

  • Handled Boolean


OnBeforeInsertEDIFile

local procedure OnBeforeInsertEDIFile(Filename: Text; var EDIFile: Record "EOS074 EDI File")

Exexute before insert an EDI File If you want to add values to EDi File

Parameters / Return Value

  • Filename Text

  • EDIFile Record "EOS074 EDI File"


OnBeforeBufferInsert

local procedure OnBeforeBufferInsert(var Buffer: Record "EOS074 EDI Docum. Check Buffer"; var EDIFile: Record "EOS074 EDI File")

Execute before buffer insert If you want to add values to Buffer

Parameters / Return Value

  • Buffer Record "EOS074 EDI Docum. Check Buffer"

  • EDIFile Record "EOS074 EDI File"


OnAfterGetIsInbound

local procedure OnAfterGetIsInbound(MessageType: Enum "EOS074 Message Type"; var inbound: Enum "EOS066 TriState Boolean")

Allows to specify if a message type is inbound or outbound. This is only raised for custom message types that are not already handled by the app.

Parameters / Return Value

  • MessageType Enum "EOS074 Message Type"

    The message type.

  • inbound Enum "EOS066 TriState Boolean"

    Set this to ‘true’ if the message type is inbound.


OnAfterGetIsOutbound

local procedure OnAfterGetIsOutbound(MessageType: Enum "EOS074 Message Type"; var outbound: Enum "EOS066 TriState Boolean")

Allows to specify if a message type is inbound or outbound. This is only raised for custom message types that are not already handled by the app.

Parameters / Return Value

  • MessageType Enum "EOS074 Message Type"

    The message type.

  • outbound Enum "EOS066 TriState Boolean"

    Set this to ‘true’ if the message type is outbound.


OnAfterCreateEdiHeader

local procedure OnAfterCreateEdiHeader(var EdiHeader: Record "EOS074 EDI Message Header"; EdiMessageSetup: Record "EOS074 EDI Message Setup")

Raised after an EDI header has been created. The EDI header.The EDI message setup.

Parameters / Return Value

  • EdiHeader Record "EOS074 EDI Message Header"

  • EdiMessageSetup Record "EOS074 EDI Message Setup"



EOS Labs -