web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Supply chain | Supply Chain Management, Commerce
Suggested Answer

Additional column to improve filtering functionality on the On-Hand screen

(2) ShareShare
ReportReport
Posted on by 75

Hi Team,

I’m planning to add an additional column to improve filtering functionality on the On-Hand screen. Could you please suggest the best approach for implementing this? If possible, sharing some examples code or references would be greatly appreciated.

Required column is "Item Group"

Thanks in advance for your help!

Screenshot

Best regards,
Bibin TV

I have the same question (0)
  • Adis Profile Picture
    6,686 Super User 2026 Season 1 on at
    Hi,
     
    Moved to SCM and adjusted category.
     

    Kind regards, Adis

     

    If this helped, please mark it as "Verified" for others facing the same issue

    Keep in mind that it is possible to mark more than one answer as verified

  • Suggested answer
    Martin Dráb Profile Picture
    239,451 Most Valuable Professional on at
    The best example is the actual implementation - look into addFilterPaneRanges() method to see how Microsoft added ranges from your screenshot. You can use CoC to extend the method and add your range there.
  • BibinTV Profile Picture
    75 on at
    Hi Martin,
     
    Thank you 
    Following your suggestion, I've used this code, but the column isn't visible in the form. See the screenshot for reference. I tried to insert but not available.
     
    Code
    [ExtensionOf(formStr(InventOnhandItem))]
    final class AFZInventOnhandListPage_ItemGroup_Extension
    {
        protected void addFilterPaneRanges()
        {
            next addFilterPaneRanges();
    
            QueryBuildDataSource inventTableQbds = InventTable_DS_DS.query().dataSourceName(InventTable_DS_DS.name());
            SysQuery::findOrCreateRange(inventTableQbds, fieldNum(InventItemGroupItem,ItemGroupId));
        }
    }
     
     
     
  • Martin Dráb Profile Picture
    239,451 Most Valuable Professional on at
    You have a bug there - the field you're trying to use doesn't belong to the data source. If you want to filter by fields of InventItemGroupItem table, you need a query data source for InventItemGroupItem. You're currently using InventTable data source, therefore your code is adding a filter to a field of InventTable that has the same ID as ItemGroupId field has in InventItemGroupItem table. That's clearly not what you want.
     
    You need to join InventItemGroupItem to InventTable and add the range to InventItemGroupItem. You can either add a regular form data source and set the join in the designer, or you can modify just the query at runtime (by using adding QueryBuildDataSource by addDataSource()).
  • BibinTV Profile Picture
    75 on at
    Hi Martin,
     
    I have applied the change you suggested. Kindly see the below.
     
    Code
    protected void addFilterPaneRanges()
        {
            next addFilterPaneRanges();
      
            QueryBuildDataSource inventItemGroupItemQbds = DsInventItemGroupItem_ds.query().dataSourceName(DsInventItemGroupItem_ds.name());
            SysQuery::findOrCreateRange(inventItemGroupItemQbds, fieldNum(InventItemGroupItem,ItemGroupId));
        }
     
    New Data Source
    Properties
     
    Still the field is not added to the filter
  • Suggested answer
    Martin Dráb Profile Picture
    239,451 Most Valuable Professional on at
    It works fine for me:
     

    I used an exists join. Using an outer join is wrong, because it wouldn't filter out anything. And we don't display any data, therefore an exists join is sufficient.
     
    This is my code:
     
    protected void addFilterPaneRanges()
    {
        next addFilterPaneRanges();
    
        SysQuery::findOrCreateRange(
            InventItemGroupItem_ds.queryBuildDataSource(),
            fieldNum(InventItemGroupItem, ItemGroupId));
    }
    I've just simplified yours a bit.
  • BibinTV Profile Picture
    75 on at
    Hi Martin,
    I attempted a full rebuild and cleared the cache, but the issue persists—the filter still doesn't appear on the form.
  • Martin Dráb Profile Picture
    239,451 Most Valuable Professional on at
    Will you see the same if you switch to the default view?
     
    If you can see any reason, you can debug the code to see when the range disappears from the query.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Supply chain | Supply Chain Management, Commerce

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 155 Super User 2026 Season 1

#2
Laurens vd Tang Profile Picture

Laurens vd Tang 101 Super User 2026 Season 1

#3
Zain Mehmood Profile Picture

Zain Mehmood 89 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans