So, I guess everyone (or most of the people reading this) has once upon a time been using editable grids in Dynamics 365. In the post, I will cover the process of how to filter lookup in an editable grid. In my scenario, a customer is using three entities: A project which can have multiple Real Estates and Each Real Estate is related to a Real Estate Sale, My goal is to show every real estate sale in an editable subgrid on the Project Main Form. From the editable grid, you should be able to choose which real estate to relate to the sale. Therefore it is important that you are not able to choose Real Estates that are not related to this project.
Where we start:
- Create the view or select a view to use in a subgrid on your parent entity.
Make sure the fields you are filtering the lookup based on are located on the view (otherwise the filtering will not work) - Add the subgrid to the form (In my case Project Main Form)
- Navigate to the subgrid
- Once you are located on the subgrids properties, do these following steps
- Navigate to “Controls”
- Click on “Editable Grid”
- Click “Add Lookup” and follow the steps below the picture
- Select the coloumn you want to filter (In my case Real Estate”
- Select the view, im using the default lookup view.
- Select the entity the subgrid is located on
- Select the related entity you want to filter based on.
Remember to publish after making the customizations.
Now you should have a filtered lookup in your Editable Grid, please leave a comment if you got any questions that didn’t get answered in this post.