Asked by:
Dynamics CRM 2013: How can I disable the view selector dropdown for a lookup?

Question
-
hi there,
In CRM 2011, I could disabled the lookup view selector with the following code:
document.getElementById(fieldName).disableViewPicker = 1;
However, this doesn't seem to work in Dynamics CRM 2013. Any ideas how I can achieve this result in CRM 2013?
Regards,
P.Sunday, November 3, 2013 4:02 AM
All replies
-
Hi,
Try this :
document.getElementById("lookupfieldnameId").setAttribute("disableViewPicker", "1");
http://crmjavascripts.blogspot.com/2013/05/crm-java-scripts-for-rollup-12-changes.html
Hope this helps. If you get answer of your question, please mark the response as an answer and vote as helpful !
Vikram !- Edited by _Vikram Sunday, November 3, 2013 4:27 AM
Sunday, November 3, 2013 4:23 AM -
Hi,
Tried this code but nothing happens. It doesn't return any errors either.
I also had a look in the URL you sent me and I noticed that the code they specify is this:
document.getElementById("Lookup Id")._behaviors[0].AddParam("DisableViewPicker", "1");document.getElementById("Lookup Id ")._behaviors[0].set_showProperty(1);However such code returns me an error. So annoying :(
Regards,
P.
- Edited by pmdci Sunday, November 3, 2013 10:36 AM
Sunday, November 3, 2013 10:27 AM -
Were you able to resolve this issue? Are you able to turn it off from Form editor?Monday, March 31, 2014 9:55 PM
-
I'm afraid I wasn't none of the jScript provides worked for me.Monday, March 31, 2014 9:56 PM
-
Try to add "_i" with field name
ie. ("fieldname_i")
document.getElementById(fieldName_i).disableViewPicker = 1;
Thanks,
Kautuk
Friday, July 18, 2014 6:38 AM