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

Pre filtering CRM 2015 v 7.0.2.146

$
0
0

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


Viewing all articles
Browse latest Browse all 82002

Latest Images

Trending Articles



Latest Images