Announcements
Added a new field on my form group. now i have added code and created a display method with the following code .I just want to add filter on this display field to search record.
any suggestions?
[ExtensionOf(formStr(BankAccountTrans))] final class BankAccountTrans_ScmFormCust_Extension { [SysClientCacheDataMethodAttribute(true)] public static display InvoiceId markedInvoice (BankAccountTrans _this) { return LedgerJournalTrans::findJournalForVoucher(_this.Voucher,_this.TransDate).MarkedInvoice; } }
Hi Junaid,
You cannot add search filter for display method. Thats the drawback of display method.
To avoid this, you can create a view for the display method and add that view as form DataSource. You can add the fields from the view to the design and you will have filter automatically.
Thanks,
Girish S.
Hi, You can refer this article on how to implement Girish's suggestion.
14-dynamics365.com/.../
i totally understood what you are saying, but in my case i have added field into "Field group" of table as i wan to add field inside the field group .
but when i will create a view (the view field will be added into the grid ) its field will be added on "form grid" outside the field group. I have to add the field in "field group". in that case , what will be the scenario?
any guidance?
My suggestion will be hiding the current grid and creating a new grid with all the available fields along with the fields from the view.
got you. Thanks for reply .
Hi Girish,
found this, article for adding search filter on display field. Can you help me understand how "Override Context method of Form control " while I am doing form customization.
according too my knowledge i can not override a method while I'm customizing a form.
You are adding display method on the standard form - If it's your custom form you can override the context method of display method control. But since it's a standard form there is no event available for context method.
But you can write COC for context method.
[Extensionof(formControlStr(FormName, ControlName))] internal final class ClassName_Extension { public void context() { next context(); //add the code as mentioned in the blog. } }
I am not sure about adding the filter to display method on the blog you posted. But you can give it a try and let us know the output.
Context method is called when user right click on field and gets the context menu with options. As per below article, Options to 'Filter by Field', Filter by Selection were added in the code.
msddax.wordpress.com/.../
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!
Thanks to all of our 2025 Community Spotlight stars!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
André Arnaud de Cal... 634 Super User 2026 Season 1
Abhilash Warrier 361 Super User 2026 Season 1
Giorgio Bonacorsi 283