What is Deployment in SFDC?
Till now we have developed code in Developer Edition, but in real life 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 as deployment.In short, this is movement of metadata from one organization to another. The reason is that you can't develop Apex in your Salesforce production organization. Live users accessing the system while you're developing can destabilize your data or corrupt your application.
Tools available for deployment:
- Force.com IDE
- Change Sets
- SOAP API
- Force.com Migration Tool
Force.com Eclipse IDE
Step 1: Open Eclipse and open the class trigger you would like to deployStep 2: Once you clicked on 'Deploy to server' then enter the username and password of the organization in which you would like to deploy the Component.
By performing the above mentioned steps, your Apex components will be deployed to the target organization.
Deployment using Change Set
You could deploy Validation 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 below steps. Remember that this feature is not available in Developer Edition:
Step 1: Go to Setup and search for 'Deploy'.
Step 2: Click on 'Outbound Change Set' in order to create change set to deploy.
Step 3: Add components to change set using 'Add' button and then save and click on upload.
Step 4: Go to Target organization and click on inbound change set and finally click 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 could use the below method calls to deploy your metadata.
- compileAndTest()
- compileClasses()
- compileTriggers()
No comments:
Post a Comment