Skip to main content

Notifications

Small and medium business | Business Central, N...
Answered

New CUE with Multi Filters to diferent tables

Posted on by 95
Hello everyone,
I'm creating a CUE to get the sales shiptmen lines pending invoicing, but I would like it to show the information filtered by ID assigned to the sales order of the logged in user.
the filter i am using is  CalcFormula = count ("Sales Shipment Line" where("Type" = Filter(Item | Resource | "G/L Account"), "Qty. Shipped Not Invoiced" = Filter(<> 0)));
but i dont now how i add the filter to the Sales Header ID user. in Sales Shipment Line i have the Nº order to relation both tables, but i dont know how i can do it.
I am noob in AL programing.
Regards,
  • Verified answer
    Terrance Morgan Profile Picture
    Terrance Morgan 515 on at
    RE: New CUE with Multi Filters to diferent tables

    Select Data > Edit Relationships.

    In the Edit Relationships dialog box, do the following:

    Select a data source for Primary data source, and select a data source for Secondary data source.

    Select Custom.

    To define a relationship between fields that have different names, click Add.

    To edit an existing relationship, select the fields on the right, and then click Edit.

    In the Add/Edit Field Mapping dialog box, do the following, and then click OK:

    Under Primary data source field, select a field.

    Under Secondary data source field, select a field with similar data to the field you selected for the primary data source.

    For more information about editing relationships, see Blend Your Data.

    --
    Terrance | Apps4Rent

  • Verified answer
    Business Central Profile Picture
    Business Central 95 on at
    RE: New CUE with Multi Filters to diferent tables

    Hello,

    I have been able to solve it with a query as indicated.

    Thank you

  • Suggested answer
    RE: New CUE with Multi Filters to diferent tables

    Hello,

    It sounds like what you need to use is an Query object.  With a Query object, you will be able to join the two or more tables.  Then on the CUE table you will need to create a new normal field that gets populated through AL code.  In the AL code you will need to at least initialize the value in the page OnOpenPage trigger.  I have included some links to our documentation that should help:

    • Query Object: docs.microsoft.com/.../devenv-query-object

    • Creating CUEs: docs.microsoft.com/.../devenv-cues-action-tiles

    • Page Triggers: docs.microsoft.com/.../devenv-page-and-action-triggers

    Best Regards,

    Thomas Brownell

    Sr Support Engineer

    Dynamics NAV/Business Central

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans