September 13, 2017

    Microsoft Dynamics 365 for Finance and Operations: Filtering in Workspaces

    The Workspaces concept is a relatively new one in Dynamics 365 for Finance and Operations, and as any new concept it keeps changing, improving and adding new capabilities to cover more and more complex functional requirements. The most obvious and the least documented feature of the Workspaces is a new data filtering engine that is used to slice data and provide better understanding of the situation for a user. While this engine can be used for any other form types, it is generally way easier to use query ranges instead. However, in the case of the workspaces, we have a set of tiles and form parts that are not bound together with a common datasource.

    It is possible to implement a method on each form part that is used on the workspace that would get a filter value from its parent workspace form and trigger those methods each time a modified() method is triggered on a workspace itself. However, this solution has two main issues. First, some controls may not be present on the workspace itself, but they can be located on the setup dialog, that is called from the workspace instead (like the inventory dimensions’ setup). Second, the count tiles are basically menu items with a particular query specified, so there is no way to create or trigger any method within them.

    Tile filtering and form part filtering share common interfaces and still, there are some differences in implementation. Below are instructions for both:

    Tile Filtering

    1. Create a new AOT query and use it as a source for the count tile.
    2. Create a new class that implements the SysIFilterStructureStrategy interface and extends the SysFilterStructureStrategyQuery.1.png
    3. Implement the SysIFilterProvider interface for your workspace.
    4. Add methods that will bound the filter control with the SysIFilterStructureStrategy engine.

     2.png

     

    Form Part Filtering

    The Form part filtering shares the same approach as the Tile filtering but it requires an additional code on the form part itself.

    1. Create a new form part and use the AOT query as the main datasource for the form. It will be used to filter for data. Implement the SysIFilterEventHandler and SysIFilterConsumerForm interfaces.
    2. Create a new class that implements the SysIFilterStructureStrategy interface and extends the SysFilterStructureStrategyQuery similarly to the class described in the Tile filtering section of this article
    3. Add methods that will bound the form datasource with the filter control from your workspace.

     3.png

         4. Add your form part to the workspace and set the RunMode property value to Local.

    Please note: The solution described above utilizes Dynamics 365 for Finance and Operations cache and tile cache storages. The query or class renaming might require the usage data and tile configuration refresh.

     

    About the Author - Fedir Kryvyi

    Fedir Headshot-224308-edited.jpg 4 years of experience as a Senior Software Development Engineer at ENAVATE.

     

     

     

     

     

     

    Enavate Recent Posts

    January 9, 2025

    Microsoft Dynamics GP Year-End Close: AP & 1099 Processing

    Knowing how to close out your Microsoft Dynamics GP instance can be difficult if you don’t know best practices and how to streamline the process. At Enavate, we can assist... Read More
    January 8, 2025

    17 Reasons to Upgrade to Dynamics GP 18.7

    Microsoft releases new features for the Dynamics GP platform three times a year. Each of these releases adds upwards of thirty new features to the platform, in addition to... Read More
    January 7, 2025

    Microsoft Dynamics GP Year-End Close: Tips & Tricks for U.S. Payroll

    Conducting your Year-End Close in Microsoft Dynamics GP can be complex— if you don’t know all the ways to streamline it. At Enavate, we help with just that, sharing tips and... Read More

    Subscribe to Receive Email Updates