Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 46379

SubGrid lookup filter wont work

$
0
0

Hello,

I have a Problem with the subgrid element in CRM 2016.

I want to select users in a subgrid from a prefiltert lookup. But it doesnt work. i dont get an error or something like this. The looup field just doesnt filter the users in the lookup field. i use the following Java script code. Does anyone have an idear whats wrong with my code?

 function filterSubGrid() {

        var grid = window.parent.document.getElementById("GridName");
        var currentleadId = Xrm.Page.data.entity.getId();;
        if (grid == null) {
            setTimeout(filterSubGrid, 500);
            return;
        }


        var fetch = "<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false'>"
        + "<entity name='systemuser'>"
        + "<attribute name='fullname' />"
        + "<attribute name='title' />"
        + "<attribute name='address1_telephone1' />"
        + "<attribute name='businessunitid' />"
        + "<attribute name='siteid' />"
        + "<attribute name='positionid' />"
        + "<attribute name='systemuserid' />"
        + "<order attribute='fullname' descending='false' />"
        + "<filter type='and" >
        +"<condition attribute='isdisabled' operator='eq' value='0' />"
        + "<condition attribute='accessmode' operator='ne' value='3' />"
        + "<condition attribute='accessmode' operator='ne' value='5' />"
        + "<condition attribute='oldUser' operator='eq' value='1' />"
        + "</filter>"
        + "</entity>"
        + "</fetch>";

        if (grid.control != null) {
            debugger;
            grid.control.SetParameter("fetchXML", fetch);
            grid.control.refresh();
        }
        else {
            setTimeout('filterSubGrid()', 500);
        }
    }


Viewing all articles
Browse latest Browse all 46379

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>