Javascript problems with CRM 2011 Update Rollup 12


We have faced problem for hiding the "NEW" button on lookup in CRM 2011 because It does not support following

crmForm.all.attributename.AddParam("ShowNewButon",0)


As Microsoft blogs(http://blogs.msdn.com/b/crm/archive/2012/06/21/microsoft-dynamics-crm-2011-custom-code-validation-tool-released.aspx) suggests that this .AddParam() is not supported in Update Rollup 12 of CRM 2011

So,we create a workaround for this:-

document.getElementById("attributename")._behaviours[0].AddParam("ShowNewButton",0);


This works fine cross-browser.

Comments

  1. Thanks you for this line of code.

    Have to add there is a typo in it though. It should be "_behaviors" instead of "_behaviours". Worked wonderfull after.

    ReplyDelete

Post a Comment

Popular Posts