Announcements
Hi FolksJust have an inquiry regarding to filtering lookup field on editable grid. Is it possible to use sort of addCustomView js functionality to filter data by creating custom view based on our own fetchXML? I know that we can utilise the pre-built lookup filtering functionality on editable grid which is already provided by D365 standard configuration, but that requires the field that needs to be used for filtering to be available on the view which is not favored by our client. Any hint would be very much appreciated. Many thanks in advance.
Regards,Jonas
D365 CE v9.0.20.7 UCI on-premise
hi,
Did you try the Add Lookup option in the Controls tab, Editable View (in Form Editor)?
This option allows you to filter the lock-up based on the fields on the form.
good luck.
Hi mate
Thanks for the response. I did try that, but there is no option to filter lookup based on the fields on the form, the available option is to filter lookup on the view based on the field on the view itself. Is there any special configuration to make it available to be filtered by the field on the form? We thought of using a script, but could not find such available api event yet to do so on the editable grid. Thanks.
Regards,
Jonas
hello,
I think you left something outThe image below is the Add Lookup form on the editable gridIn the Contains section, you can choose which field of the related records you selected above will be filtered, which is certainly one of the related records of the same entity in which you are in its form.
Yes, that's the one that we use to filter using pre-built feature by selecting available fields on the view. However, there is no way found yet to filter based on fields on the form which is non-existent on the view.
It was found that the customer data on the grid view is still empty, hence we can use this feature when we fill the field to filter on background process for the custom entity. Thanks, mate!
I still think that could be the solution for you!
OK. You can also use JavaScript to do this. Call the following function for the OnRecordSelect editable grid event. Also check "Pass execution context as first parameter".In this function, you have access to all the fields on the editable grid, and you can filter the lock-up fields here as well as filtering a lock-up on the form.
function onSelectSubGrid(context) { var subGrid = context.getFormContext().data.entity; subGrid.attributes.forEach(function (field, i) { field.controls.get(0).setDisabled(true); }); }
Hi Mehran
Thanks for sharing those, although we just found out that the pre-built lookup field on editable grid in on-premise version that we tried yesterday is somehow malfunctioning. It does not always work, so I suppose that it is why we are still looking for some other way in the first place since it is something that we need to report to MS Support further. Anyhow, thanks, though!
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.
Tom_Gioielli 56 Super User 2026 Season 1
Eugen Podkorytov 49
Jimmy Passeti 31 Most Valuable Professional