microsoft / ALAppExtensions

Repository for collaboration on Microsoft AL application add-on and localization extensions for Microsoft Dynamics 365 Business Central.
MIT License
748 stars 600 forks source link

[Event Request] Table 5050 Contact - Procedure ShowBusinessRelation - OnAfterFilterBusinessRelations #26751

Closed MH1612 closed 5 days ago

MH1612 commented 1 week ago

Describe the request

Please add the following Event/-s OnAfterFilterBusinessRelations to procedure ShowBusinessRelation in Table 5050 Contact

Table 5050 Contact - Procedure ShowBusinessRelation

    var
        ContBusRel: Record "Contact Business Relation";
        RecSelected: Boolean;
        IsHandled: Boolean;
    begin
        FilterBusinessRelations(ContBusRel, LinkToTable, All);

        OnAfterFilterBusinessRelations(Rec, ContBusRel, LinkToTable, All); <-- NEW EVENT

        if ContBusRel.IsEmpty() then begin
            ShowBusinessRelations();
            exit;
        end;

        if ContBusRel.Count() = 1 then
            RecSelected := ContBusRel.FindFirst()
        else begin
            PAGE.Run(PAGE::"Contact Business Relations", ContBusRel);
            exit;
        end;

        IsHandled := false;
        OnShowCustVendBankOnBeforeRunPage(Rec, RecSelected, ContBusRel, IsHandled);
        if IsHandled then
            exit;

        if RecSelected then
            ContBusRel.ShowRelatedCardPage();

        OnAfterShowCustVendBank(Rec, ContBusRel, RecSelected);
    end;
    [IntegrationEvent(false,false)]
    local procedure OnAfterFilterBusinessRelations(var Rec: Record Contact; var ContBusRel: Record "Contact Business Relation"; LinkToTable: Enum "Contact Business Relation Link To Table"; var All: Boolean)
    begin 
    end;

Additional context

Apply additional filters i.e. to exclude non-standard LinkToTable-Values. Internal work item: AB#539824

JesperSchulz commented 5 days ago

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. Please do not reply to this, as we do not monitor closed issues. If you have follow-up questions or requests, please create a new issue where you reference this one.

Build ID: 21487.