Announcements
No record found.
Hi Guys,
I have a form in which there is a filter applied to it to show certain results that the users need, this filtering if a user erase it it will show many records that the user don't need to see, below is a screenshot for the thing I want it to be disable from editing by the normal user:
Is this can be disabled? or is there is something can be done from VS to achieve this?
Thanks,
Hi mohamd.dhaif ,
Yes, it can be disabled by code but make sure it won't affect other filters.
You need to add the code in the init method of the form like below.
Public void init() { FormCommandButtonControl filter; #SysSystemDefinedButtons super(); filter= this.control(this.controlId(#SystemDefinedShowFiltersButton)) as FormCommandButtonControl; filter.visible(false); }
Girish S.
Hi Mohamd,
When you apply filter ranges via x++ coding, you can make the ranges hidden. In that case, the user will not see those ranges, but still can add other filters when he needs to search for particular records.
The code suggestion from Girish will not block the option for the Advanced filter/sort form which the user then can still use. Note that in case there is an option to use the 'Open in Excel' function on this form, it will have access to all records again. You can consider implementing a security policy using XDS which will always ensure the user will only see records that are intended for him to see. This can be extended to data entities as well. Extensible Data Security and data entities - Microsoft Dynamics 365 for Finance and Operations - (dynamicspedia.com)
Thank you, Girish and Andre, for your responses, it's so helpful your clarification you highlight.
For doing this task, is there is a tutorial online to applying this idea?
Mohammed
Hi Mohammed,
Which exact idea do you want to try out first?
- Disable filter pane,
- Hide query range
- Security policy (XDS)
Hi Andre,
Hide query range
I'm not aware of a blog, but the standard application has a lot of examples in it. E.g. the class HcmPersonLookup. The Status on the QueryBuildRange object can be set to Hidden.
QueryBuildRange qbr = _workerDataSource.addRange(fieldNum(HcmWorker, RecId)); qbr.value(queryvalue(reportsEnumerator.current())); qbr.status(RangeStatus::Hidden);
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.
Congratulations to our 2026 Super Stars!
We are thrilled to have these Champions in our Community!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Giorgio Bonacorsi 660
André Arnaud de Cal... 655 Super User 2026 Season 1
CP04-islander 557