2
votes

Following is the exact scenario in my CRM application -

In one of the stages of the Business Process Flow, I want to display a lookup field containing list of users having specific security roles .

For that, I have created a new Lookup View which retrieves those users. Now I want to associate this Lookup View to the field in the Business Process Flow so users are restricted to select only those users which are returned in the Lookup View.

Can anyone please help me in finding out how to achieve this?

1

1 Answers

3
votes

You'll need to use JavaScript. BPF controls are prefixed with header so you'll need something like this:

var control = Xrm.Page.getControl("header_new_mysecurityroleid");
if(control){
    control.setDefaultView("{9202D01D-73CF-E511-80EF-3863BB36EB48}");
}

You'll of course need to replace "new_mysecurityroleid" with the name of your field, and {9202D01D-73CF-E511-80EF-3863BB36EB48} with the Guid of your view...