locked
Custom Lookup View - CustomerAddress RRS feed

  • Question

  • I'm trying to create a custom lookup view that contains Customer Address records.   Here is our current code...

    var viewId = "{1FB0BF0B-FE0A-4A1D-A190-7704CFF08D0F}";
    var viewDisplayName = "Customer Addresses";
    var entityName = "customeraddress";

    var fetchXml = "<fetch version='1.0' " +
                            "output-format='xml-platform' " +
                            "mapping='logical'>" +
                        "<entity name='customeraddress'> " +
                        "<attribute name='name' /> " +
                        "<attribute name='customeraddressid' /> " +
                        "</entity>" +
                        "</fetch>";

    var layoutXml = "<grid name='resultset' " +
                                "object='1071' " +
                                "jump='name' " +
                                "select='1' " +
                                "icon='1' " +
                                "preview='1'>" +
                            "<row name='result' id='customeraddressid'>" +
                                "<cell name='name' width='200' />" +
                            "</row>" +
                            "</grid>";

    Xrm.Page.getControl(lookupFieldName).addCustomView(viewId, entityName, viewDisplayName, fetchXml, layoutXml, true);

    When we open the lookup it is showing the Customer Address records and the search is working, but it isn't showing the field we are specifying in the layoutXML.  For some reason it's displaying the Address Name, Postal Code, City and Street Address fields rather than just the name field.

    Any ideas what could be causing this?



    • Edited by Cipher Friday, August 16, 2013 7:24 AM
    Friday, August 16, 2013 7:20 AM

All replies