1

I have created a custom button on contact role which will redirect to new case page along with pre-populated some value in the case object and assign to the queue. Then I updated page layout Now I have to deploy this button to QA sandbox. Could anybody tell me how to deploy a button procedure please and what components I have to deploy here?

Object: Account/Contact/Contact role

Pagelayout

  • How did you create a custom button on Contact Role? It only lets you configure picklist values. Are you sure you are not using any Custom VF solution? – Salesforcesmarty Mar 7 '17 at 3:33
  • Are you talking about a button on the Account page layout's Contact Roles related list? – Brent Bow Mar 7 '17 at 3:42
  • @Salesforcesmarty I created a button under custom object name contact role from button, links and action – maruf Mar 7 '17 at 3:55
  • @BrentBow yes. A button on Account page layout's Contact Roles related list – maruf Mar 7 '17 at 3:56
1

Deploying a custom button is really straightforward and can be done using change set.

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

Include following items in the change-set:

  1. Custom Button
  2. Account/Contact page layouts

and simply deploy to target org (QA Sandbox).

  • THanks. Do I have to take profile as well for this deployment ? – maruf Mar 7 '17 at 17:55
  • No profile is not required. – Salesforcesmarty Mar 7 '17 at 23:05
1

There are couple of ways to deploy components from one org to another org. As @Salesforcemarty highlighted the procedure using Change Set. It is one of the simplest method to move components from one org to another.

Another way is to use a tool called as ANT. ANT can be used to deploy components from one org to another. You need to configure ANT in your machine. Refer this link for configuration of ANT. It is open-source software. Once you've configured ANT, follow below steps:

  1. First you need to prepare package.xml which contains details about your components which needs to be deployed. In your case it would be something like this:

`

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types>
        <members>Account-Appointment Layout</members>
        <members>Contact-Event Layout</members>
        
        <name>Layout</name>
    </types> 

    <types>
        <members>Contact.Custom_button</members>
        <name>WebLink</name>
    </types>

<version>34.0</version>
</Package>

`

  1. Prepare build.properties which contains credentials of source and destination orgs and build.xml contains commands which are configured for ANT. A Sample code for build.properties and build.xml can be found here github/mrohit/ant

  2. Once all of these things are ready, simply use those commands to retrieve components, validate them and finally deploy.

You might think it is lengthy process but here are some plus points using ANT over Change Set

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.