Old code for disable view picker of look up ( before disabling legacy form rendering )
document.getElementById("LookupField").disableViewPicker=1;
New code (After enabling turbo forms)
var lookup="schemaname of field";
lookup.Ctl=Xrm,page.getControl("schemaname of field");
lookuo.SetParameter("disableViewPicker", "1");
document.getElementById("LookupField").disableViewPicker=1;
New code (After enabling turbo forms)
var lookup="schemaname of field";
lookup.Ctl=Xrm,page.getControl("schemaname of field");
lookuo.SetParameter("disableViewPicker", "1");
Hi Linu,
ReplyDeleteI 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.
Frank
is turbo form enabled in your CRM ?
ReplyDeleteDid 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 .
Turbo is on.
ReplyDeleteI 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
put debugger in your code and see which line throwing error .
ReplyDeletethis is no error on the GUI, maybe under the hood.
ReplyDeletedo you have a debugger code for me?
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.
ReplyDeletecrm development company