I'm trying to deploy a PricebookEntry object containing a SearchLayout which contains standard and custom fields however I'm having issues when I include a custom field.

The following is what happens:

If I add the custom field to the search layout through the UI and I retrieve the metadata using the Force.com migration toolkit the searchLayout contains the following.

    <searchResultsAdditionalFields xsi:nil="true"/>

In this is at the position where I added the custom field to the searchLayout through the UI. If I deploy the same metadata back to the org it removes the custom field from the search layout. I've tried therefore to change the metadata as follows to add the custom field directly.


but the following error is returned

  1. objects/PricebookEntry.object -- Error: In field: searchResultsFields - no CustomField named PricebookEntry.PRODUCT2.Manufacturer__c found

The Manufacturer__c field does exists on product2 though. Does anyone know how custom fields can be added to the search layout for deployment?

I noticed the following related post How do you deploy edited Search Layouts via Metadata API using ANT or Force.com IDE? but it does not provide a solution.

1 Answer 1


As an FYI. I opened a case with Salesforce on this. It's already a known bug (reported by a different customer) and is currently being actioned by R&D. I'm not sure when it will be resolved.

  • 1
    did you ever get an answer to this?
    – PepeFloyd
    Commented Oct 14, 2019 at 11:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .