You may come across the Salesforce error No more than 10 columns may be specified in lookupPhoneDialogsAdditionalFields when carrying out a validation or deployment. We've seen this occur with the Contact object.
This article explains why this error occurs and how you can get past it.
What in my metadata is causing the error?
In your Gearset comparison results, if you check the XML of the object that's failed the validation/deployment with this error, you will find that it has more than 10 lines for lookupPhoneDialogsAdditionalFields. Here's an example:
(As shown in the screenshot above, the object may be split into two line items; in which case, check both.)
How do I fix the error?
To view and fix this in your org you need to use Salesofrces Classic View and then navigate to the search layouts.
Click your Profile Avatar (top right) and select Switch to Salesforce Classic.
Click Setup in the top right menu.
In the left-hand navigation pane, expand Build > Customize > Contacts > Search Layouts.
Locate Lookup Phone Dialogs in the list and click Edit
Move fields from the Selected Fields box to the Available Fields box until you have 10 or fewer fields selected.
Click Save.
How did I get more then 10 lookups?
It may be that Salesforce didn't use to have this limit. We've previously observed that 'when adding a new phone number field to an object in Salesforce, it will automatically include it in the ‘Lookup Phone Dialogs’ search layout', so this may have added extra fields to the search layout.
Is my source or my target causing the error? Why is this object included anyway?
If your Contact object (or whichever object is failing) is showing in the Gearset comparison results as Different, and you have selected it to deploy, then the XML from the source will be deployed to the target. In this case, review the configuration in your source.
However, if you have just selected components of Contact (such as a custom field, record type, list view or validation rule), the Contact object will be automatically brought into the deployment package. The Contact object from the target will be redeployed in the target to act as a 'container' for the component to stitch into. This is described in this support document. In that case, review the configuration in the target.
If you haven't selected the Contact object or any of its components, it may be that a Gearset problem analyzer has brought it in automatically - review the configuration in the target.




