Skip to content

[Event Change Request] Table 11000003 "Detail Line" - OnValidateSerialNoEntryOnBeforeValidateAmountFromVendLedgEntry #29795

@KateDovgalova

Description

@KateDovgalova

Why do you need this change?

In 4PS Construct we use event OnValidateSerialNoEntryOnBeforeValidateAmountFromVendLedgEntry to implement additional checks on Vendor Ledger Entry. Some of those checks include CurrFieldNo so we would like it to be added to event parameters.

Describe the request

Dear ALAppExtensions team,

On behalf of 4PS I would like to request adding CurrFieldNo to parameters of integration event 'OnValidateSerialNoEntryOnBeforeValidateAmountFromVendLedgEntry' in "Serial No. (Entry)" - OnValidate in table 11000003 "Detail Line".

                    "Account Type"::Vendor:
                        begin
                            GetVendorEntries();
                            OnValidateSerialNoEntryOnOnAfterGetVendorEntries(Rec, VendLedgEntry, CurrFieldNo);
                            VendLedgEntry.TestField(Open, true);
                            VendLedgEntry.TestField("Vendor No.", "Account No.");
                            "Currency Code (Entry)" := VendLedgEntry."Currency Code";
                            Vend.Get(VendLedgEntry."Vendor No.");
                            FillVendorDescription(CompanyInfo, Vend);

                            IsHandled := false;
                            //OnValidateSerialNoEntryOnBeforeValidateAmountFromVendLedgEntry(Rec, TrMode, VendLedgEntry, IsHandled); //old
                            OnValidateSerialNoEntryOnBeforeValidateAmountFromVendLedgEntry(Rec, TrMode, VendLedgEntry, CurrFieldNo, IsHandled); //new
                            if not IsHandled then
                                if TrMode."Pmt. Disc. Possible" and
                                (VendLedgEntry."Remaining Pmt. Disc. Possible" <> 0) and
                                (VendLedgEntry."Pmt. Discount Date" >= Date)
                                then
                                    Validate("Amount (Entry)", -(VendLedgEntry."Remaining Amount" - VendLedgEntry."Remaining Pmt. Disc. Possible") -
                                    CalculateTotalAmount("Currency Code (Entry)"))
                                else
                                    Validate("Amount (Entry)", -VendLedgEntry."Remaining Amount" - CalculateTotalAmount("Currency Code (Entry)"));
                        end;
    [IntegrationEvent(false, false)]
    //local procedure OnValidateSerialNoEntryOnBeforeValidateAmountFromVendLedgEntry(var DetailLineRec: Record "Detail Line"; TrMode: Record "Transaction Mode"; VendLedgEntry: Record "Vendor Ledger Entry"; var IsHandled: Boolean) //old
    local procedure OnValidateSerialNoEntryOnBeforeValidateAmountFromVendLedgEntry(var DetailLineRec: Record "Detail Line"; TrMode: Record "Transaction Mode"; VendLedgEntry: Record "Vendor Ledger Entry"; CurrFieldNo: Integer; var IsHandled: Boolean) //new
    begin
    end;

Internal work item: AB#624426

Metadata

Metadata

Assignees

No one assigned

    Labels

    FinanceGitHub request for Finance areaevent-requestRequest for adding an event

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions