Codeunit 18123044 EOS EDoc. Utilities

Codeunit 18123044 EOS EDoc. Utilities

Gather all utility functions used in electr. document management

Methods

FormatAmountOutbound

procedure FormatAmountOutbound(inValue: Decimal): Text

Format Amount with this format <Precision,2:2><Standard Format,9>

Parameters / Return Value

  • inValue Decimal

    Decimal

  • Returns Text

    Text


FormatDateOutbound

procedure FormatDateOutbound(inValue: Date): Text

Format Date with this format <Standard Format,9>

Parameters / Return Value

  • inValue Date

    Date

  • Returns Text

    Text


DownloadBLOB

procedure DownloadBLOB(TempBlob: Codeunit "Temp Blob"; FolderName: Text; FileName: Text; FileFilter: Text) Result: Boolean

Download BLOB

Parameters / Return Value

  • TempBlob Codeunit "Temp Blob"

    Blob with file to download

  • FolderName Text

    The folder Name

  • FileName Text

    the File Name

  • FileFilter Text

    File Filter

  • Returns Boolean

    true equals success


IsForeignCustomer

procedure IsForeignCustomer(CustomerNo: code[20]): Boolean

Parameters / Return Value

  • CustomerNo code[20]

  • Returns Boolean


IsValidForeignRecipient

procedure IsValidForeignRecipient(RecipientCode: code[10]) IsValidRecipient: Boolean

Parameters / Return Value

  • RecipientCode code[10]

  • Returns Boolean


CheckIsBasicLatinSuppl

procedure CheckIsBasicLatinSuppl(TAGNAme: Text; TAGValue: Text): Text

Parameters / Return Value

  • TAGNAme Text

  • TAGValue Text

  • Returns Text


CheckIsBasicLatin

procedure CheckIsBasicLatin(TAGNAme: Text; TAGValue: Text): Text

Parameters / Return Value

  • TAGNAme Text

  • TAGValue Text

  • Returns Text


FormatSpecialString

procedure FormatSpecialString(CurrFieldNo: Integer; MaxLen: Integer; DeleteSpecialChr: Boolean; inString: Text) RetString: Text

Parameters / Return Value

  • CurrFieldNo Integer

  • MaxLen Integer

  • DeleteSpecialChr Boolean

  • inString Text

  • Returns Text


RemoveCountryFromVatRegNo

procedure RemoveCountryFromVatRegNo(Value: Text; CountryCode: Code[10]): Text

Parameters / Return Value

  • Value Text

  • CountryCode Code[10]

  • Returns Text


SetCountryOnVatRegNo

procedure SetCountryOnVatRegNo(Value: Text; CountryCode: Code[10]): Text

Parameters / Return Value

  • Value Text

  • CountryCode Code[10]

  • Returns Text


GetTAGMaxLenght

procedure GetTAGMaxLenght(TAGName: Text; TAGValue: Text): Integer

Parameters / Return Value

  • TAGName Text

  • TAGValue Text

  • Returns Integer


GetISOCountryCode

procedure GetISOCountryCode(CountryCode: Code[10]; RaiseError: Boolean): code[10]

Parameters / Return Value

  • CountryCode Code[10]

  • RaiseError Boolean

  • Returns code[10]


GetCodiceDestinatario

procedure GetCodiceDestinatario(RecRef: RecordRef; RaiseError: Boolean) Result: code[7]

Parameters / Return Value

  • RecRef RecordRef

  • RaiseError Boolean

  • Returns code[7]


CheckDocStatus

procedure CheckDocStatus(VAR RecRef: RecordRef; Type: Option Create,Send,"Create+Send"; HideDialog: Boolean) Result: Boolean

Parameters / Return Value

  • RecRef RecordRef

  • Type Option

    Create (0) , Send (1) , "Create+Send" (2)

  • HideDialog Boolean

  • Returns Boolean


CheckStatusSingle

procedure CheckStatusSingle(RecRef: RecordRef; Type: Option Create,Send,"Create+Send") Result: Boolean

Parameters / Return Value

  • RecRef RecordRef

  • Type Option

    Create (0) , Send (1) , "Create+Send" (2)

  • Returns Boolean


GeIXFEProgressiveNo

procedure GeIXFEProgressiveNo(SourceEntryNo: Integer) RetValue: Text[50]

Parameters / Return Value

  • SourceEntryNo Integer

  • Returns Text[50]


GetDocPECEmailAddress

procedure GetDocPECEmailAddress(RecRef: RecordRef) PECEmailAdd: Text

Parameters / Return Value

  • RecRef RecordRef

  • Returns Text


CheckCustElectrInvoiceData

procedure CheckCustElectrInvoiceData(Customer: Record Customer; inFieldNo: Integer; HideDialog: Boolean) Return: Boolean

Parameters / Return Value

  • Customer Record "Customer"

  • inFieldNo Integer

  • HideDialog Boolean

  • Returns Boolean


ConvertAmount2LCY

procedure ConvertAmount2LCY(Value: Decimal; CurrencyCode: Code[10]; CurrencyFactor: Decimal; CurrencyDate: Date; ForceConvertion: Boolean; EOSOutbElectrDocSetup: Record "EOS Outb. Electr. Doc. Setup") RetValue: Decimal

Parameters / Return Value

  • Value Decimal

  • CurrencyCode Code[10]

  • CurrencyFactor Decimal

  • CurrencyDate Date

  • ForceConvertion Boolean

  • EOSOutbElectrDocSetup Record "EOS Outb. Electr. Doc. Setup"

  • Returns Decimal


GetTipoDocumento

procedure GetTipoDocumento(RecRef: RecordRef) Result: Code[5]

Parameters / Return Value

  • RecRef RecordRef

  • Returns Code[5]


GetDateFromText

procedure GetDateFromText(DateStr: Text[10]) RetDate: Date

Parameters / Return Value

  • DateStr Text[10]

  • Returns Date


GetTextFromDate

procedure GetTextFromDate(inDate: Date) RetDate: Text[10]

Parameters / Return Value

  • inDate Date

  • Returns Text[10]


GetDecimalFromText

procedure GetDecimalFromText(DecStr: Text[21]) RetDecimal: Decimal

Parameters / Return Value

  • DecStr Text[21]

  • Returns Decimal


RemoveFileSpecialChars

procedure RemoveFileSpecialChars(VAR inText: Text[1000])

Parameters / Return Value

  • inText Text[1000]

SplitText

procedure SplitText(inStr: Text; MaxLen: Integer; var outStr: array[100] of Text[250]): Integer

Parameters / Return Value

  • inStr Text

  • MaxLen Integer

  • outStr Text[250]

  • Returns Integer


TransferDimFromStandardText

procedure TransferDimFromStandardText(var PurchaseLine: Record "Purchase Line"; ElectronicDocPreviewLine: Record "EOS Inb. EDoc. Preview Line")

Parameters / Return Value

  • PurchaseLine Record "Purchase Line"

  • ElectronicDocPreviewLine Record "EOS Inb. EDoc. Preview Line"


InsertInvLineFromRcptLine

procedure InsertInvLineFromRcptLine(var PurchRcptLine: Record "Purch. Rcpt. Line"; var PurchLine: Record "Purchase Line")

Parameters / Return Value

  • PurchRcptLine Record "Purch. Rcpt. Line"

  • PurchLine Record "Purchase Line"


InsertInvLineFromRetShptLine

procedure InsertInvLineFromRetShptLine(var ReturnShipmentLine: Record "Return Shipment Line"; var PurchLine: Record "Purchase Line")

Parameters / Return Value

  • ReturnShipmentLine Record "Return Shipment Line"

  • PurchLine Record "Purchase Line"


UploadXMLFile

procedure UploadXMLFile(var is: InStream): Text[250]

Parameters / Return Value

  • is InStream

  • Returns Text[250]


UploadXMLZip

procedure UploadXMLZip(var is: InStream)

Parameters / Return Value

  • is InStream

unzip

procedure unzip(ZipIs: InStream; var NameValueBufferOut: Record "Name/Value Buffer")

Parameters / Return Value

  • ZipIs InStream

  • NameValueBufferOut Record "Name/Value Buffer"


RemoveXSLTag

procedure RemoveXSLTag(is: InStream; var tempBlob: Codeunit "Temp Blob")

Parameters / Return Value

  • is InStream

  • tempBlob Codeunit "Temp Blob"


ConvertP7MStream

procedure ConvertP7MStream(var is: InStream; var filename: Text[250]; SkipValidation: Boolean; var xml: Codeunit "Temp Blob")

Parameters / Return Value

  • is InStream

  • filename Text[250]

  • SkipValidation Boolean

  • xml Codeunit "Temp Blob"


GotoPage

procedure GotoPage(Notif: Notification)

Parameters / Return Value

  • Notif Notification

NotificationHandler

procedure NotificationHandler(PageNoToOpen: Integer; Scope: NotificationScope; MessageText: Text; ActionText: Text; HasAction: Boolean)

Parameters / Return Value

  • PageNoToOpen Integer

  • Scope NotificationScope

  • MessageText Text

  • ActionText Text

  • HasAction Boolean


InitXMLTemplates

procedure InitXMLTemplates()

RemoveCountry

procedure RemoveCountry(Value: Text; CountryCode: Code[10]): Text

Remove Country code from text

Parameters / Return Value

  • Value Text

    Text

  • CountryCode Code[10]

    Code[10]

  • Returns Text

    Text


IsItaly

procedure IsItaly(CountryCode: Code[10]): Boolean

Is Country code = Italy

Parameters / Return Value

  • CountryCode Code[10]

    Code[10]

  • Returns Boolean

    Boolean


IsRenegotiated

procedure IsRenegotiated(CustLedgerEntry: Record "Cust. Ledger Entry"): Boolean

Parameters / Return Value

  • CustLedgerEntry Record "Cust. Ledger Entry"

  • Returns Boolean


Events

OnBeforeIsValidRecipient

local procedure OnBeforeIsValidRecipient(var RecipientCode: code[10]; var IsValidRecipient: Boolean; var IsHandled: Boolean)

Parameters / Return Value

  • RecipientCode code[10]

  • IsValidRecipient Boolean

  • IsHandled Boolean


OnAfterIsValidRecipient

local procedure OnAfterIsValidRecipient(var RecipientCode: code[10]; var IsValidRecipient: Boolean)

Parameters / Return Value

  • RecipientCode code[10]

  • IsValidRecipient Boolean


OnBeforeAskOverrideStatusCheck

local procedure OnBeforeAskOverrideStatusCheck(Type: Option Create,Send,"Create+Send"; var MsgTxt: Text; var Result: Boolean; var HideDialog: Boolean; var DialogSeverity: option Message,Confirm,Error)

Raised when some selected document is in a status that need a user confirm to proceed with create/send

Parameters / Return Value

  • Type Option

    Create (0) , Send (1) , "Create+Send" (2)

    Specifies the request type ( Create,Send,“Create+Send”)

  • MsgTxt Text

    Preconfigured message that will be submitted to the user to confirm create/send. You can modify this text to customize UI

  • Result Boolean

    Return value, TRUE means proceed with docuent create/send, FALSE means no document will be created or sent

  • HideDialog Boolean

    TRUE means no confimation message will be used, FALSE (default) means asj to the user to proceed or not

  • DialogSeverity option

    Message (0) , Confirm (1) , Error (2)

    Values: Message,Confirm,Error. Specifies in case of return message what kind of dialog must be exposed


OnBeforeCheckStatusOutboudDoc

local procedure OnBeforeCheckStatusOutboudDoc(RecRef: RecordRef; Type: Option Create,Send,"Create+Send"; var Result: Boolean; var IsHandled: Boolean)

Raised before single document status is checked versus the requested action type

Parameters / Return Value

  • RecRef RecordRef

    The header of the sales or service document

  • Type Option

    Create (0) , Send (1) , "Create+Send" (2)

    Specifies the request type ( Create,Send,“Create+Send”)

  • Result Boolean

    Return value, TRUE means proceed, FALSE means operation to be approved by user

  • IsHandled Boolean

    No following standard code will be executed


OnAfterCheckStatusOutboudDoc

local procedure OnAfterCheckStatusOutboudDoc(RecRef: RecordRef; Type: Option Create,Send,"Create+Send"; var Result: Boolean)

Raised before single document status is checked versus the requested action type

Parameters / Return Value

  • RecRef RecordRef

    The header of the sales or service document

  • Type Option

    Create (0) , Send (1) , "Create+Send" (2)

    Specifies the request type ( Create,Send,“Create+Send”)

  • Result Boolean

    Return value, TRUE means proceed, FALSE means operation to be approved by user


OnBeforeCheckCustElectrInvoiceData

local procedure OnBeforeCheckCustElectrInvoiceData(Customer: Record Customer; inFieldNo: Integer; var HideDialog: Boolean; var Return: Boolean; var isHandled: Boolean)

Parameters / Return Value

  • Customer Record "Customer"

  • inFieldNo Integer

  • HideDialog Boolean

  • Return Boolean

  • isHandled Boolean



EOS Labs -