This blog post explains how to use JavaScript to set a default view on a lookup field conditionally in a Model Driven App. The requirement is to filter the lookup values of the contact entity on the account entity based on the selected option in the ownership column. The implementation involves using the setDefaultView() method of the lookup control in JavaScript. This method takes a view ID as a parameter and sets it as the default view for the lookup field. The code snippet provided demonstrates how to use this method in the OnChange event handler of the ownership field to dynamically change the default view of the contact lookup field based on the selected option.
Login now to access my digest by 365.Training