Skip to content

[Event Request] Report 8051 "Contract Deferrals Release" #11725

Description

@Flokuonen

Why do you need this change?

We would like to be able to set additional filters for Customer/Vendor Contract Deferrals in report 8051 "Contract Deferrals Release" before they are counted and released.

This was originally requested in microsoft/ALAppExtensions#29435 and received positively there.

Describe the request

Add an integration event raised after the standard filters are set, so subscribers can extend the filtering before the deferrals are counted.

Existing Source Code:

local procedure FilterAndCountContractDeferrals()
begin
    ContractDeferralIteration := 0;

    GlobalCustomerContractDeferral.SetRange("Posting Date", 0D, PostUntilDate);
    GlobalCustomerContractDeferral.SetRange("Document Posting Date", 0D, PostUntilDate);
    GlobalCustomerContractDeferral.SetRange(Released, false);
    GlobalVendorContractDeferral.SetRange("Posting Date", 0D, PostUntilDate);
    GlobalVendorContractDeferral.SetRange("Document Posting Date", 0D, PostUntilDate);
    GlobalVendorContractDeferral.SetRange(Released, false);
    TotalContractDeferralsCount := GlobalVendorContractDeferral.Count + GlobalCustomerContractDeferral.Count;
end;

New Source Code:

local procedure FilterAndCountContractDeferrals()
begin
    ContractDeferralIteration := 0;

    GlobalCustomerContractDeferral.SetRange("Posting Date", 0D, PostUntilDate);
    GlobalCustomerContractDeferral.SetRange("Document Posting Date", 0D, PostUntilDate);
    GlobalCustomerContractDeferral.SetRange(Released, false);
    GlobalVendorContractDeferral.SetRange("Posting Date", 0D, PostUntilDate);
    GlobalVendorContractDeferral.SetRange("Document Posting Date", 0D, PostUntilDate);
    GlobalVendorContractDeferral.SetRange(Released, false);
    OnFilterAndCountContractDeferralsOnAfterFilterGlobalContractDeferral(GlobalCustomerContractDeferral, GlobalVendorContractDeferral); //CHANGED (!)
    TotalContractDeferralsCount := GlobalVendorContractDeferral.Count + GlobalCustomerContractDeferral.Count;
end;

[IntegrationEvent(false, false)]
local procedure OnFilterAndCountContractDeferralsOnAfterFilterGlobalContractDeferral(var CustSubContractDeferral: Record "Cust. Sub. Contract Deferral"; var VendSubContractDeferral: Record "Vend. Sub. Contract Deferral")
begin
end;

Provide an implementation (optional)

  • I will provide the implementation for this extensibility request

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions