- Apex - Deployment
- Apex - Testing
- Apex - Debugging
- Apex - Batch Processing
- Apex - Governer Limits
- Apex - Trigger Design Patterns
- Apex - Triggers
- Apex - Invoking
- Apex - Security
- Apex - SOQL
- Apex - SOSL
- Apex - Database Methods
- Apex - DML
- Apex - Interfaces
- Apex - Objects
- Apex - Methods
- Apex - Classes
- Apex - Collections
- Apex - Loops
- Apex - Decision Making
- Apex - Constants
- Apex - Arrays
- Apex - Strings
- Apex - Variables
- Apex - Data Types
- Apex - Example
- Apex - Environment
- Apex - Overview
- Apex - Home
Apex Useful Resources
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
Apex - Deployment
What is Deployment in SFDC?
Till now we have developed code in Developer Edition, but in real pfe scenario, you have to do this development in Sandbox and then you might need to deploy this to another sandbox or production environment and this is called the deployment. In short, this is the movement of metadata from one organization to another. The reason behind this is that you cannot develop Apex in your Salesforce production organization. Live users accessing the system while you are developing can destabipze your data or corrupt your apppcation.
Tools available for deployment −
Force.com IDE
Change Sets
SOAP API
Force.com Migration Tool
As we are using the Developer Edition for our development and learning purpose, we cannot use the Change Set or other tools which need the SFDC enterprise or other paid edition. Hence, we will be elaborating the Force.com IDE deployment method in this tutorial.
Force.com Ecppse IDE
Step 1 − Open Ecppse and open the class trigger that needs to be deployed.
Step 2 − Once you cpck on Deploy to server , then enter the username and password of the organization wherein, the Component needs to be deployed.
By performing the above mentioned steps, your Apex components will be deployed to the target organization.
Deployment using Change Set
You can deploy Vapdation rules, workflow rules, Apex classes and Trigger from one organization to other by connecting them via the deployment settings. In this case, organizations must be connected.
To open the deployment setup, follow the steps given below. Remember that this feature is not available in the Developer Edition −
Step 1 − Go to Setup and search for Deploy .
Step 2 − Cpck on Outbound Change Set in order to create change set to deploy.
Step 3 − Add components to change set using the Add button and then Save and cpck on Upload.
Step 4 − Go to the Target organization and cpck on the inbound change set and finally cpck on deploy.
SOAP API Calls to Deploy
We will just have a small overview of this method as this is not a commonly-used method.
You can use the method calls given below to deploy your metadata.
compileAndTest()
compileClasses()
compileTriggers()
Force.com Migration Tool
This tool is used for the scripted deployment. You have to download the Force.com Migration tool and then you can perform the file based deployment. You can download the Force.com migration tool and then do the scripted deployment.
Advertisements