Can anybody explain me how to hide look up new button.
Tried the following code but no use.
function RemoveNewButtonFromLookUp()
{
if(parentcontactid)
{
var lookUpControl = Xrm.Page.getControl(parentcontactid);
if(lookUpControl)
{
lookUpControl.addPreSearch(function () {
setTimeout(function() {
document.getElementById("Dialog_" + parentcontactid+ "_i_IMenu").childNodes[1].childNodes[1].style.display = "none";
}, 100);
});
}
}
}