Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

CRM 2016 Online: Disable the viewpicker in a lookup dialog from a subgrid with JavaScript

Posted on by Microsoft Employee

Hello,

I added this code to a form on crm online 2016 wave 1:

function disableViewPicker () {

var lookup = Xrm.Page.getControl("lookup_WorkTags");

if (lookup) {
 var id = "{E57F5DE2-7764-E611-80DD-C4346BAC0E68}";
 var defaultView = lookup.getDefaultView();

 if (defaultView != id) { lookup.setDefaultView(id); }

 lookup.SetParameter("disableViewPicker", "1");
 }

setTimeout( function () { disableViewPicker(); } , 1000);

}

I want to set the default view and disable the viewpicker. First works , second not. Does anyone have an idea to make that happen. MS supported...;-).? BTW I also tried to use the GUI to configure this. No success....

Frank

*This post is locked for comments

  • Tim N Profile Picture
    Tim N 15 on at
    RE: CRM 2016 Online: Disable the viewpicker in a lookup dialog from a subgrid with JavaScript

    I am looking for the same, a solution to disable the view picker (CRM 2016 on premise). I could not get code like above to work either. What has worked for me for now is the answer in this thread: community.dynamics.com/.../190153

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans