This article provides a JavaScript snippet that allows you to change the default view when clicking "Add Existing" in the Subgrid area on Model Driven Apps. The code allows you to implement business logic to limit users to select records based on a specific view. The JavaScript code provided prepares the necessary parameters for the function to work and uses Xrm.WebApi.execute to associate the selected record with the primary entity. The article also provides instructions on how to set up the caller and customize the command button using Ribbon Workbench. Finally, the article includes a demo showcasing the functionality.
Login now to access my digest by 365.Training