Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested answer

Add Filter option to Suggest Vendor Payment

(0) ShareShare
ReportReport
Posted on by 35

Hi there, 

Relatively new to all things Business Central AL, so hoping for some help please.

For Payment Journal > Suggest Vendor Payment > Filter: Vendor > Filter totals by.

How would I go about adding Shortcut Dimensions as filter options under Filter totals by?

Ideally want to add all Shortcut Dimensions as filter options for the report. 

pastedimage1624727844226v1.pngpastedimage1624727852260v2.png

Located the Suggest Vendor Payments.dal (report 393) file and it seems it might be under the local procedure GetVendLedgEntries that the available filters are set. Is that right and how can Shortcut Dimensions be added as filter options here or where ever that needs to happen?

Suspecting its a Report Extension but not really sure how to go about adding it.

Any help is much appreciated.

pastedimage1624728631762v3.png

  • Suggested answer
    Suresh Kulla Profile Picture
    47,688 on at
    RE: Add Filter option to Suggest Vendor Payment

    Unfortunately you cannot extend the calcformulae and adding all the fields to reference the new flowfilter looks a lot of work.

  • landcrab2 Profile Picture
    35 on at
    RE: Add Filter option to Suggest Vendor Payment

    Hi Suresh Kulla,

    Once I have created the Shortcut Dimensions as a Flowfield, how can I use them in the CalcFormula of a field?

    Is it possible to add additional filters to an existing CalcFormula for a field, or do I need to create a whole new field to replace the existing ones and then extend the filter condition?

    I suspect what needs to happen is this, create Flowfield, create new definition of a field, example here being the 'Balance' field which I have have named 'NewBalance'.

    Is this the right way to do it? If so, I would need to do this for all the fields that have a CalcFormula already and there are about 15-20 of them or more.

    tableextension 59100 "Extend Vendor" extends Vendor

    {

      fields

      {

          field(50000; "Shortcut Dimension 3 Filter"; Code[20])

          {

              CaptionClass = '1,1,3';

              Caption = 'Shortcut Dimension 3 Filter';

              FieldClass = FlowFilter;

              TableRelation = "Dimension Value".Code WHERE("Global Dimension No." = CONST(3));

          }

          field(50010; "NewBalance"; Decimal)

          {

              AutoFormatExpression = "Currency Code";

              AutoFormatType = 1;

              CalcFormula = - Sum("Detailed Vendor Ledg. Entry".Amount WHERE("Vendor No." = FIELD("No."),

                                                                             "Initial Entry Global Dim. 1" = FIELD("Global Dimension 1 Filter"),

                                                                             "Initial Entry Global Dim. 2" = FIELD("Global Dimension 2 Filter"),

                                                                             "Initial Entry Shortcut Dim. 3" = FIELD("Shortcut Dimension 3 Filter"),

                                                                             "Currency Code" = FIELD("Currency Filter")));

              Caption = 'New Balance';

              Editable = false;

              FieldClass = FlowField;

          }

      }

    }

    I have also added this to 'Detailed Vendor Ledger Entry' to make the above work.

    tableextension 59101 "Extend DetailVendLedgEntry" extends "Detailed Vendor Ledg. Entry"

    {

      fields

      {

          field(100; "Initial Entry Shortcut Dim. 3"; Code[20])

          {

              Caption = 'Initial Entry Shortcut Dim. 3';

              TableRelation = "Dimension Value".Code WHERE("Global Dimension No." = CONST(3));

          }

    }

  • Suggested answer
    JAngle Profile Picture
    89 on at
    RE: Add Filter option to Suggest Vendor Payment

    Granted that flow filter on the vendor table sounds good but if it’s for all shortcut dimensions won’t the chosen filters need translating into the dimension set ID? Flow filter would need to be that if it’s worth going for.

    I would follow a pattern similar to the dimension filter option on the general ledger entries page. It pops a page where you select all dimensions - not just the defined shortcuts. It then returns the appropriate dimension ID’s. I’d verify if a report extension can handle this. Otherwise your own version makes sense and just extend the page with a new page action. Hide the old one by adjusting the visibility or use the replace report feature with a codeunit and event subscriber

  • Suggested answer
    Suresh Kulla Profile Picture
    47,688 on at
    RE: Add Filter option to Suggest Vendor Payment

    All those filters are based on the flowfilters defined on the table it is not a change on the report, if you have a flowfilter in the underlying table and if that is used in the calculated fields then that will appear automatically.

  • Suggested answer
    Teddy Herryanto (That NAV Guy) Profile Picture
    13,622 Moderator on at
    RE: Add Filter option to Suggest Vendor Payment

    There is the event that you can subscribe there OnGetVendLedgEntriesOnBeforeLoop. Just do the filter there.

    Otherwise, you can create a new report by duplicating the current report, and make the modification on the new report.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
YUN ZHU Profile Picture

YUN ZHU 428 Super User 2025 Season 1

#2
Mansi Soni Profile Picture

Mansi Soni 302

#3
Sagar Dangar, MCP Profile Picture

Sagar Dangar, MCP 287

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans