+ Start a Discussion
DokerDoker 

How to add button to search layout, please?

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

<searchLayouts>

<listViewButtons>Mark_as_Rebate_Contact</listViewButtons>

</searchLayouts>

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

shillyershillyer
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,
Sati
aalbertaalbert
From trying to prototype this out in my own DE org and using the Force.com 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 Force.com IDE project to get the updated metadata representation and I only see the <searchLayouts> component in the custom object.
Here-n-nowHere-n-now

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.