Conditionally disable one record page on Lookup modal box
I have to remove one record page on Contact Lookup modal box (button New menu items -> Customer). This is a standard lookup on UserPage. But of course "Employee" record page should stay.
How can i do this ?
I know from some post that there is "excludeTypes" property on lookupconfig but it doesn't work for me (maybe this property is deprecated or id provided in array are not ContactType id's).
Second thought was to use "hideActions" property but whole New button menu will be removed from page.
Can i somehow replace function in LookupPageViewGenerator (eg. in getSelectionControlsConfig add some logic) ? In browser debugger i can remove one item from array and it's works but i don't know how to implement this logic in package.