Monday, July 2, 2012

Disabling View Picker in a Look up (disableViewPicker )

There are times that we want the lookup filter to be disabled and display only the view that we want the customer to see. This is possible by creating a custom view and using the in-built functionality of CRM look up filter to the view picker.

If you want to do this in java script how would you go on about it? Is there a way?

There are couple of java scripts that you can write. However some of them won’t work with some of the Update roll ups in CRM 2011. Here I have listed some of them below.

Xrm.Page.ui.controls.get("lookupname").$0_3._element.disableViewPicker = 1;
This works with UR 6, but doesn’t work with UR 8.

document.getElementById("lookupname").disableViewPicker = 1;
The above seems to be a safe bet as it works with UR 6 and 8 both.

No comments:

Post a Comment

Retrieving Calendar of a Bookable Resource in Dynamics

There are occasions where we need to retrieve working days and working times of a resource in Dynamics grammatically. This is quite possible...