Monday, 5 September 2016

CRM 2016 Synatax changes after disabling legacy form rendering engine (enable Turbo forms)

Old code for disable view picker of look up ( before disabling legacy form rendering )


New code (After enabling turbo forms)

var lookup="schemaname of field";
lookup.Ctl=Xrm,page.getControl("schemaname of field");
lookuo.SetParameter("disableViewPicker", "1");


  1. Hi Linu,

    I try your tip but no success. Any Idea why?

    Here my script:

    function disableViewPicker () {

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

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

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

    lookup.SetParameter("disableViewPicker", "1"); //setDisabled(true);

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


    Is your code supported by Microsoft. The old version is it not.


  2. is turbo form enabled in your CRM ?

    Did you debug this code?
    "lookup_WorkTags" is it your look up actual field name ? noramally fields names in all small letters .
    kindly debug this code and make sure all lines of code are processing without any syntax error .

  3. Turbo is on.

    I think the field name is right, because to set the defaultview (in the script) is working. Only that is not working: lookup.SetParameter("disableViewPicker", "1");

    I get no error on the form when loaded

  4. put debugger in your code and see which line throwing error .

  5. this is no error on the GUI, maybe under the hood.

    do you have a debugger code for me?

  6. Yes, this game is not just about who has the faster internet connection or the luck to win. You have to have strategy and you need to master the mathematics behind it so that you be declared as the winner.
    crm development company