I was deploying an app I work on to a Winter16 prerelease org and my deployment is failing. All the child objects (have the detail end of a master-detail relationship) are failing to deploy with the message: Cannot enable enhanced lookups for this object: SomeCustomObject__c

I do have a <enableEnhancedLookup>true</enableEnhancedLookup> element in all of the metadata for these custom objects, but this was never an issue previously, and I can't find anything saying enhanced lookups are de-supported on detail objects (and that would be horrible if it was the case).

All other types of objects seem to work. Google turns up nothing for this error. What's going on?


This turns out to be related to the new "Search Faster by Disabling Search for Some Custom Objects" feature.

New custom objects are documented as not being searchable by default, which would strongly imply they aren't indexed. I know internally that lookups use SOSL, and not being SOSL indexed would certainly be a reason for enhanced lookups to not work.

So if you (er.. me?) want to keep enhanded lookups on these objects you'll need to mark them with an enableSearch element.

I.e. in my metadata I need to change to:


Note that this requires APIv35 in package.xml, so you're realistically forced to upgrade if you want enhanced lookups to work on fresh deployments.


With the above solution in .xml file I also need to enable the Allow Search checkbox provided in object manager definition for the product.


  • enableSearch in package XML represents Allow Search setting in UI. So your answer is not valid. – Raul Mar 13 '18 at 8:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.