Skip to content

[Event Request] Codeunit 11401 "Post Code Management" - OnAfterFindStreetNameForPurchaseBuyFromAddress #30128

@KateDovgalova

Description

@KateDovgalova

Why do you need this change?

In 4PS Construct we extended table 38 "Purchase Header" with fields "Buy-from Phone No." and "Buy-from Fax No." and need those fields to be filled in event subscriber PurchaseHeaderOnBeforeValidateBuyFromAddress in codeunit 11401 "Post Code Management". Using another subscriber to OnBeforeValidateEvent for 'Buy-From Address' field in table 38 "Purchase Header" would invoke FindStreetName again (duplicate lookup), and ordering of subscribers is non-deterministic.
New event would allow to copy already resolved PhoneNo and FaxNo to tableextension fields.

Describe the request

Dear ALAppExtensions team,

On behalf of 4PS I would like to request integration event 'OnAfterFindStreetNameForPurchaseBuyFromAddress' to be added to procedure PurchaseHeaderOnBeforeValidateBuyFromAddress in codeunit 11401 "Post Code Management":

    [EventSubscriber(ObjectType::Table, Database::"Purchase Header", 'OnBeforeValidateEvent', 'Buy-From Address', false, false)]
    local procedure PurchaseHeaderOnBeforeValidateBuyFromAddress(var Rec: Record "Purchase Header")
    var
        PhoneNo: Text[30];
        FaxNo: Text[30];
    begin
        FindStreetName(
            Rec."Buy-from Address", Rec."Buy-from Address 2", Rec."Buy-from Post Code", Rec."Buy-from City",
            Rec."Buy-from Country/Region Code", PhoneNo, FaxNo);
        OnAfterFindStreetNameForPurchaseBuyFromAddress(Rec, PhoneNo, FaxNo); //new
    end;
    [IntegrationEvent(false, false)]
    local procedure OnAfterFindStreetNameForPurchaseBuyFromAddress(var PurchaseHeader: Record "Purchase Header"; PhoneNo: Text[30]; FaxNo: Text[30])
    begin
        //new
    end;

Internal work item: AB#636303

Metadata

Metadata

Assignees

No one assigned

    Labels

    FinanceGitHub request for Finance areaevent-requestRequest for adding an event

    Type

    No fields configured for Task.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions