Skip to content

[Event Request] table 37 "Sales Line" - CheckPrepmtAmounts procedure #30113

@tuan-nguyen-fenwick

Description

@tuan-nguyen-fenwick

Why do you need this change?

We would like to propose a new integration event to extend the CheckPrepmtAmounts procedure in the Base Application.

The current implementation enforces validation to ensure that the prepayment amount is not reduced below the amount already invoiced. Our requirement is to enable controlled adjustments to Quantity after a prepayment invoice has been posted, while preserving the integrity of the standard FieldErrors logic.

Although the existing OnBeforeCheckPrepmtAmounts event could be used to bypass the procedure, this approach is not ideal as it skips the standard validation logic and FieldErrors. By introducing a more granular event within the procedure, our extension can adjust behaviour without losing the standard checks and reducing code duplication.

Describe the request

Below is the proposed event to be added at the end of the SalesLine.Table.al object:

    [IntegrationEvent(false, false)]
    local procedure OnCheckPrepmtAmountsOnBeforeErrorIfPrepmtAmtLessThanInvoiced(var SalesLine: Record "Sales Line"; var xSalesLine: Record "Sales Line"; SalesHeader: Record "Sales Header"; var RaiseError: Boolean)
    begin
    end;

The event should be placed right before the If condition that checks the prepayment amount invoiced and the document status. Please see the code suggestion below:

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    missing-infoThe issue misses information that prevents it from completion.

    Type

    No fields configured for Task.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions