Extract Custom Button using Salesforce Package.xml

Meta data name for custom button is WebLink and below is the format to use it in your package.xml to extract using workbench or any other deployment tools like Eclipse,  ANT, Gearset, Pipeline, ClickDeploy,  AutoRABIT, Flosum etc

Salesforce Package.xml file structure:

<?xml version=”1.0″ encoding=”utf-8″ standalone=”yes”?>
<Package xmlns=”http://soap.sforce.com/2006/04/metadata”>
<types>
<members>Case-Case Feed Layout</members>
<name>Layout</name>
</types>
<types>
<members>Case.SendEmail</members>
<name>WebLink</name>
</types>
<version>41.0</version>
</Package>

 

Once retrieved the button details exists in the Case object with webLinks tag like below:

<CustomObject xmlns=”http://soap.sforce.com/2006/04/metadata”>
<webLinks>
<fullName>SendEmail</fullName>
<availability>online</availability>
<displayType>massActionButton</displayType>
<encodingKey>UTF-8</encodingKey>
<linkType>url</linkType>
<masterLabel>SendEmail</masterLabel>
<openType>replace</openType>
<protected>false</protected>
<requireRowSelection>false</requireRowSelection>
<url>http://theblogreaders.com</url>
</webLinks>
</CustomObject>

Deploying a custom button is a straightforward and can be done using change set as well using the below steps:

  • Enable Organization connections between source and target Organization. You can access it under  Setup:- “Deploy -> Deployment Settings”
  • Setup a change-set in the source org
  • Push change-set to target org

make sure to include following items in the change-set:

  1. Custom Button
  2. Account/Contact page layouts

and simply deploy to target organization

About Salesforce Change Sets:

Salesforce Deployment Connections:

Written by 

I am Sakthivel Madesh, a certified Salesforce Advanced Developer & Administrator working on Salesforce Technology since 2011. I am currently working in Techforce Services as Sr. Salesforce Developer. I have worked on multiple technologies Like PHP, Java, Salesforce, I am very passionate about Salesforce and to earn 15x Salesforce Certification. I love Trailhead for learning Salesforce Skill and Become a Trailhead 5x Ranger too. I Love to Learn & Share my Salesforce knowledge to Salesforce Learners/Beginner using My Blog and Salesforce Community.

Leave a Reply

Your email address will not be published. Required fields are marked *

*