Wednesday, May 20, 2020

Set Default View in CRM Subgrid


function subGridLookupView(){

debugger;
var subgrid= Xrm.Page.getControl("lookup_grdContacts");
if (subgrid!= null){
// you can add other conditions(subgrid!= 'undefined' || subgrid!='') as per your criteria 
//get the view ID from Advanced find Look for : View  and add the condition Name Equals "CustomContactsView"
Xrm.Page.getControl("lookup_ grdContacts ").setDefaultView("{00000000-0000-0000-0000-000000000000}");
                }
setTimeout(subGridLookupView, 1000);
}

No comments:

Post a Comment