locked
custom View not showing up in dynamics 2011 RRS feed

  • Question

  • I'm trying to add a custom view on quoted customer field change and my end customer view is not changing.

    function customEndCustomer() {
        var viewId = "{257b2C00006-00000-0000-0200-B00111000}";
        var entityName = "account";
        var viewDisplayName = "Non-EMS Type End Customer";
        var fetchXml =  "<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false'>"
                          "<entity name='account'>" +
                            "<attribute name='name' />" +
                            "<attribute name='accountid' />" +
                            "<attribute name='customertypecode' />" +
                            "<attribute name='am_region' />" +
                            "<attribute name='am_customertype' />" +
                            "<attribute name='axcustomerid' />" +
                            "<attribute name='axcompany' />" +
                            "<order attribute='name' descending='false' />" +
                            "<order attribute='customertypecode descending='false' />" +
                            "<filter type='and'>" +
                              "<condition attribute='am_customertype' operator='eq' value='930680000' />" +
                              "<condition attribute='customertypecode' operator='ne' value='6' />" +
                            "</filter>" +
                          "</entity>" +
                        "</fetch>"
        var layoutXml = "<grid name='resultset' object='1' jump='name' select='1' icon='1' preview='1'>" +
    	                    "<row name='result' id='accountid'>" +
    	                        "<cell name='name' width='150' />" +
                                "<cell name='customertypecode' width='100' />" +
                                "<cell name='axcustomerid' width='100' />" +
                                "<cell name='am_region' width='100' />" +
                                "<cell name='am_customertype' width='100' />" +
                                "<cell name='axcompany' width='100' />" +
    	                    "</row>" +
                        "</grid>";
        alert('adding custom view');
        Xrm.Page.getControl("pt_customerid").addCustomView(viewId, entityName, viewDisplayName, fetchXml, layoutXml, true);
    }

    Can anyone help me debug this? Been stuck on this for a whole day now.


    • Edited by scoobaroo Wednesday, August 9, 2017 7:08 PM
    Wednesday, August 9, 2017 7:08 PM