var FetchXml = ""; var LayoutXml = ""; Xrm.Page.getControl("Field Name").addCustomView("00010000-0100-0010-0100-010000010001", "Entity Logical Name", "View Name", FetchXml, LayoutXml, true);
I have started to debug and I have found source of issue:
Issue was in following line
crmGrid.SetParameter("viewtype", o.options[o.selectedIndex].Type);
Solution came easily – view id should contain brackets { and }:
var FetchXml = ""; var LayoutXml = ""; Xrm.Page.getControl("Field Name").addCustomView("{00010000-0100-0010-0100-010000010001}", "Entity Logical Name", "View Name", FetchXml, LayoutXml, true);
No comments:
Post a Comment