This function allows you to hide the “New” button from a lookup to stop users to create new records directly from within the lookup window.
//********************************************************* gLookupDisplayNewButton = function(field, bShow){ /* This function is used ti hide or show the New button in a lookuup Params: field = name of lookup field bShow = integer (0 = hide, 1= show) Returns: parameter Example : gLookupDisplayNewButton('cm_instellingid', 0); */ var obj = document.getElementById(field); if(obj != null){ obj.attachEvent("setadditionalparams",NewButton(obj, bShow)); } //********************************************************* function NewButton(field, bShow) { return function(){ field.AddParam("ShowNewButton", bShow); } } }