Hi, i want to add presearch on my subgrid based on optionset value. Basically the code is working fine. But i have a little modification within the code. And the code start not working as i expected. Here is the code
subgridLookup.addPreSearch(function() {
//Standard logic to build up the filter query string
var problemType = Xrm.Page.getAttribute("lnkt_problemtype").getValue();
var filterQuery1= "<filter type='and'>"+"<condition attribute='lnkt_problemtype' operator='eq' value='"+problemType+"' />"+"</filter>";
var filterQuery2= "<filter type='and'>"+"<condition attribute='lnkt_problemtype' operator='eq' value='180000000' />"+"</filter>";
//filterQuery = "<filter type='and'.....></filter>";
//..
//..
//Standard call to add filter to the lookup control
subgridLookup.addCustomFilter(filterQuery1);
//alert(filterQuery1);
});
This function work if i use filterQuery2. But if i use filterQuery1 the look up on the subgrid display no record. Something wrong within this code ?
Also i have make sure that variable problemType contain optionsetvalue too
*This post is locked for comments
I have the same question (0)