function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

How to add button to search layout, please?

How can I add my button to list view?
In custom deployment process i added




to Contact object file. Yet it didn't add the button to list view search layout. What else do I have to do?

Once you create your Custom Button (be sure to select List Button as the Display Type), you can follow this help to add the custom button to your list view.
Hope that helps,
From trying to prototype this out in my own DE org and using the IDE to see the metadata representation, I think the <searchLayouts> metadata components are only supported on custom objects, unfortunately. I added a list button to the Account Search Results layout and then added another list button to a custom object's Search Results layout. Then I refreshed my IDE project to get the updated metadata representation and I only see the <searchLayouts> component in the custom object.

You can select the List Button in your metadata list in the IDE, and you can view its XML definition under objects, but the "deploy to server" will "detect no difference", so you'll need to check it manually for it to be deployed.  It's deployed correctly (tested in IDE ver. 20).


However there's still no way to deploy the customized standard Search Results layout - in my case it's for Contact.