microsoft / microsoft/BCApps

[Event Request] Codeunit "Sales Post Invoice Events" Publishers "RunOnBeforePostLines" and "OnBeforePostLines": add new Parameter InvoicePostingParameters

Open Beginner friendly
#11,536 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

event-request Team: SCM
Dominant language
AL
Stars
683
Forks
459
Avg merge
3d 26m
Merged PRs (30d)
633

Description

Why do you need this change?

We use this event to write additional entries. The "Document No." and other parameters that were generated for the preview mode is available in the record InvoicePostingParameters.

Describe the request

Please add the new parameter InvoicePostingParameters here in the codeunit "Sales Post Invoice Events" and publisher "RunOnBeforePostLines" and "OnBeforePostLines":

    procedure RunOnBeforePostLines(SalesHeader: Record "Sales Header"; var TempInvoicePostingBuffer: Record "Invoice Posting Buffer" temporary; InvoicePostingParameters: Record "Invoice Posting Parameters")
    begin
        OnBeforePostLines(SalesHeader, TempInvoicePostingBuffer, InvoicePostingParameters);
    end;

    /// <summary>
    /// Raised before posting the invoice lines to the general ledger.
    /// </summary>
    /// <param name="SalesHeader">The sales header being posted.</param>
    /// <param name="TempInvoicePostingBuffer">The temporary invoice posting buffer containing lines to post.</param>
    [IntegrationEvent(false, false)]
    local procedure OnBeforePostLines(SalesHeader: Record "Sales Header"; var TempInvoicePostingBuffer: Record "Invoice Posting Buffer" temporary; InvoicePostingParameters: Record "Invoice Posting Parameters")
    begin
    end;
Provide an implementation (optional)
  • I will provide the implementation for this extensibility request

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in the codeunit "Sales Post Invoice Events" and inspect the publishers "RunOnBeforePostLines" and "OnBeforePostLines". Confirm that both publisher signatures and the forwarding call expose InvoicePostingParameters, with the existing SalesHeader and temporary InvoicePostingBuffer parameters preserved.

Written by the indexing model from the issue text.

Assessment

Domain
backend-api-design
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
82/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.