Quantcast
Channel: Sam's Activities
Viewing all articles
Browse latest Browse all 3363

Filter Lookup on Business Process Flow

$
0
0

Hi,

I have to filter a lookup on a Business Process Flow. I have used the code to filter on the lookup field Truck Sales Area. The code is triggered on on-Load. I Always get an error ff the stage where the lookup exists is not active. I want the code to be triggered once a specific stage named 'Add Company Details' is selected

function formonload() {
    preFilterTruckSalesArea();
}

function preFilterTruckSalesArea() {
    Xrm.Page.getControl("header_process_new_areaid").addPreSearch(function new_areaid() {
  var fetchXml = "<filter type='and'><condition attribute='new_areacode' operator='eq' value='1'/></filter>";     
        Xrm.Page.getControl("header_process_new_areaid").addCustomFilter(fetchXml);
    });
}

Any suggestions.


Viewing all articles
Browse latest Browse all 3363

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>