How to commit and deploy Search Layouts with Copado

Search Layouts doesn't have their own Metadata Type therefore they cannot be selected in the Metadata Grid in Copado like for example objects (CustomObject), fields (CustomField), layouts (Layout) or workflow rules (WorkflowRule).

Because Search Layouts doesn't have a Metadata Type to select them specifically, the only way of committing them is by selecting the component they belong to which is the object (CustomObject).
If you need to commit and deploy a change that was made on a search layout in the Account object, the entire Account object will have to be committed. This will commit any change made on the search layouts.

There is something important to consider when committing search layouts. As mentioned before, when selecting the object, the search layouts will be committed but, if an extra component which is part of that object is also selected, only changes in that component will be pushed to Git and not the search layouts. For example:

Let's supposed you have done 2 modifications in the Account object. One of them is a field addition to one of the search layouts and the other one is a field creation in the Account object. Both, search layouts and fields are located in the xml file of the Account object. If you select the Account object and the field, only the field will be pushed to Git. In order to commit the search layouts, only the Account object must be selected. This will also push the field into Git but it will not be deployed since it will not be listed in the deployment components.





 

How did we do?