Dynamics CRM 365 窗体的Lookup字段通过JS按照某个字段过滤数据
function form_load() { Xrm.Page.getControl("new_remarktemplate").addPreSearch(addFilternew_remarktemplate); } function addFilternew_remarktemplate() { var conditionStr = ""; var remarktype = rtcrm("#new_remarktype").val(); if (remarktype) { conditionStr += "<condition attribute=‘new_remarktype‘ operator=‘eq‘ value=‘" + remarktype[0].id + "‘ />" } }