Hi All,
I am aware that there is an out of the box functionality to pre filter a lookup field based on another lookup field. However, that out of the functionality works only in the form not in the Business Process Flow, isn't? So I have created a JavaScript functionality that adds addPreSearch() function to the lookup field I would like to be pre-filtered. This is working fine when I populated the parent lookup field then populate child lookup field. But, when I deleted the value from both lookup fields then populated them again, on my child lookup field, it will say "No records found". This does not work in the form as well. Below is the code for my pre-filter.
if (Xrm.Page.getControl("header_process_new_ratetype") != null) {
Xrm.Page.getControl("header_process_new_ratetype").addPreSearch(function () {
fetchXml = "<filter><condition attribute='new_ratecategory' operator='eq' value='" + rateCategory[0].id + "' /></filter>";
Xrm.Page.getControl("header_process_new_ratetype").addCustomFilter(fetchXml);
});
}
Am I missing something here?
Thanks in advance.
Regards,
Marvin
*This post is locked for comments
I have the same question (0)