Table of Contents

KVSADVEDocumentTypeMgt

Procedures

GetSalesInvoiceTypeCode(Record Sales Invoice Header, Code[20]) : Boolean

Summary: This procedure is used to get the E-Document Invoice Type Code for a given Sales Invoice Header record. It checks if there is a matching record in the KVSADVEDocInvTypeCode table based on the TableID and InvoiceTypeCode fields. If a matching record is found, it returns true and sets the InvoiceTypeCode variable to the corresponding value. If no matching record is found, it returns false.

procedure GetSalesInvoiceTypeCode(SalesInvoiceHeader: Record "Sales Invoice Header"; var InvoiceTypeCode: Code[20]): Boolean

Parameters:

  • SalesInvoiceHeader: The Sales Invoice Header record for which the E-Document Invoice Type Code is to be retrieved.
  • InvoiceTypeCode: A variable that will hold the retrieved E-Document Invoice Type Code if a matching record is found.

Returns: Returns true if a matching record is found and the InvoiceTypeCode variable is set; otherwise, returns false.

GetSalesCreditMemoTypeCode(Record Sales Cr.Memo Header, Code[20]) : Boolean

Summary: This procedure is used to get the E-Document Invoice Type Code for a given Sales Credit Memo Header record. It checks if there is a matching record in the KVSADVEDocInvTypeCode table based on the TableID and InvoiceTypeCode fields. If a matching record is found, it returns true and sets the InvoiceTypeCode variable to the corresponding value. If no matching record is found, it returns false.

procedure GetSalesCreditMemoTypeCode(SalesCreditMemoHeader: Record "Sales Cr.Memo Header"; var CreditMemoTypeCode: Code[20]): Boolean

Parameters:

  • SalesCreditMemoHeader: The Sales Credit Memo Header record for which the E-Document Invoice Type Code is to be retrieved.
  • CreditMemoTypeCode: A variable that will hold the retrieved E-Document Credit Memo Type Code if a matching record is found.

Returns: Returns true if a matching record is found and the CreditMemoTypeCode variable is set; otherwise, returns false.

Events

OnBeforeOnPEPPOLManagementOnAfterGetGeneralInfo(Record Sales Header, Text, Boolean) :

Summary: Integration event that is raised before the OnPEPPOLManagementOnAfterGetGeneralInfo event is handled. This event allows subscribers to modify the InvoiceTypeCode or handle the event themselves by setting the IsHandled parameter to true. If IsHandled is set to true, the default handling of the OnPEPPOLManagementOnAfterGetGeneralInfo event will be skipped.

[IntegrationEvent(false, false)]
local procedure OnBeforeOnPEPPOLManagementOnAfterGetGeneralInfo(SalesHeader: Record "Sales Header"; var InvoiceTypeCode: Text; var IsHandled: Boolean): 

Parameters:

  • SalesHeader: The Sales Header record for which the E-Document Invoice Type Code is being retrieved.
  • InvoiceTypeCode: A variable that will hold the retrieved E-Document Invoice Type Code if a matching record is found.
  • IsHandled: A boolean variable that indicates whether the event has been handled by a subscriber. If set to true, the default handling of the OnPEPPOLManagementOnAfterGetGeneralInfo event will be skipped.

Remarks: This event is raised before the OnPEPPOLManagementOnAfterGetGeneralInfo event is handled. Subscribers can use this event to modify the InvoiceTypeCode or handle the event themselves by setting the IsHandled parameter to true. If IsHandled is set to true, the default handling of the OnPEPPOLManagementOnAfterGetGeneralInfo event will be skipped.

OnBeforeOnAfterCreatePEPPOLXMLDocumentSetAdvanceCreditMemoTypeCode(Record E-Document, RecordRef, Codeunit Temp Blob, Boolean) :

[IntegrationEvent(false, false)]
local procedure OnBeforeOnAfterCreatePEPPOLXMLDocumentSetAdvanceCreditMemoTypeCode(var EDocument: Record "E-Document"; var SourceDocumentHeader: RecordRef; var TempBlob: Codeunit "Temp Blob"; var IsHandled: Boolean):