3
Я пытаюсь удалить фильтр PreSearch, и мой код выглядит следующим образом. Как я могу достичь того же?Как удалить фильтр AddPreSearch
Xrm.Page.getControl("productid").removePreSearch(function() {
Object
});
Xrm.Page.getControl("productid").addPreSearch(function() {
fetchxml2();
});
function fetchxml2() {
var fetchXml1 = "<filter type='and'>"
fetchXml1 += "<condition attribute='productid' operator='in' >";
for (var i = 0; i < Itemid.length; i++) {
fetchXml1 += "<value>" + Itemid[i] + "</value>";
}
fetchXml1 += "</condition>";
fetchXml1 += "</filter>";
Xrm.Page.getControl("productid").addCustomFilter(fetchXml1);
//Xrm.Page.getControl("productid").removePreSearch(fetchXml1);
};