Show / Hide Table of Contents

    OnBeforeCreateSalesHeader Event

    Codeunit Create Documents

    Raised before a Sales Header is created when documents are created from ContractHeader. The primary purpose for the event is when creating documents from contracts in batch. You can decide if the lines from the current ContractHeader should be added to the last created invoice LastInvoiceNo or if a new SalesHeader should be created for the ContractHeader.

    Signature

    [IntegrationEvent(false, false)]
    OnBeforeCreateSalesHeader(var ContractHeader: Record "QWEPR Contract Header"; LastInvoiceNo: Code[20]; var SalesHeaderExists: Boolean; var SalesHeader: Record "Sales Header"; var IsHandled: Boolean)
    

    Parameters

    var ContractHeader Record "QWEPR Contract Header"

    Specifies the current Contract Header that is being used when the sales document is created.

    LastInvoiceNo Code[20]

    Specifies the Document No. for the last invoice created when creating documents from contracts in batch.

    var SalesHeaderExists Boolean

    Specifies if a SalesHeader for the ContractHeader is created or fetched within the event. If a SalesHeader is created or fetched, it should be set to true, otherwise it should be set to false.

    var SalesHeader Record "Sales Header"

    Specifies the Sales Header if a sales header is created or fetched within the event. This parameter is only relevant if SalesHeaderExists is set to true.

    var IsHandled Boolean

    Should be set to true if creation of sales header is handled. Should be honored if already set.

    This documentation is generated from Parrot v26.2.242726.0

    Back to top Copyright © 2020 SmartApps
    Generated by DocFX