Skip to main content

Different deployment methods in salesforce



After successful development of our application in salesforce, we need to deploy it to production or any other environment as per our requirement. Salesforce provides various methods to deploy your code in any other environment.
Below are the types of methods you can use to deploy your code.

1.       Change Sets.
2.       Salesforce force.com migration tools – Ant/Java base
3.       Workbench
4.       Salesforce Package.

Let’s discuss about all different types of tools and their Limitations and Advantages.
  •   Change Sets – It is the easiest way to deploy meta-data from one salesforce sandbox to another. It is provided by salesforce and you need to configure change-sets from salesforce sandbox itself. It will work only for connected sandboxes (i.e Developer to Test Sandbox & Test Sandbox to Production Sandbox). We cannot use it between any individual sandbox to migrate meta-data.

Advantages –
Ø  Easy to configure.
Ø  Can deploy selected components from one sandbox to another.
Ø  UI based deployment.
Limitations –
Ø  Can migrate only between connected Sandboxes (Developer to Test, Test to Production).
Ø  Need to manually select all components that needs to be migrated, which is time consuming for large number of components.

  • Salesforce force.com migration tools ( Ant/Java base)  -  Salesforce provides force.com migration tool, which is java base ant migration to deploy meta-data between any sandboxes. It uses command line to deploy code. It also gives flexibility to ‘validate’ your code first and then ‘deploy’ it. It also allows you to configure deployment with or without ‘test classes’. It is useful to deploy large number of components and it gives you control to deploy code according to target sandbox requirement, rather than replicating same components from source Sandbox.

Advantages –
Ø  Useful for enterprise level project to deploy large number of meta-data components.
Ø  Useful when we need to deploy code to another developer Sandbox with test class execution.
Limitations –
Ø  Need to configure Ant before deployment, it is one time activity.
Ø  May not give compilation error in one ‘validation’, therefore need to validate deployment many times till all compilation errors are solved.

  •  Workbench –  Workbench is web based tool, which allows you to deploy package by uploading it in workbench. It is good for small package. Like Ant base migration, it allows you to migrate between any Sandbox.

Advantages –
Ø  Easy to deploy by uploading package for limited components deployment.
            Limitations –
Ø  Need to upload proper package for deployment.
Ø  Does not provide option to deploy with test classes. Therefore not suitable for production deployment.

  •  Salesforce Package –  Salesforce allows you to deploy components using packages. There are two types of packages ‘Manged’ and ‘Unmanged’. It is not recommended to deploy using packages as it may override components if wrong package is deployed. It will also not allows you to validate ‘code coverage’ before deployment.


Packages are useful when you want to give some functionality which users can’t modify, and just use that functionality with help of ‘Managed’ Packages.

Comments

Popular posts from this blog

Salesforce lightning component e.force:navigateToURL

This article will explain how to use ‘e.force:navigateToURL’ lightning component to navigate the system to any URL (visualforce page, record, any custom URL). Syntax of ‘e.force:navigateToURL’ var urlEvent = $A.get("e.force:navigateToURL");         urlEvent.setParams({           "url": "/" + recordId ,             "isredirect": "true"         });         urlEvent.fire(); Description of the parameters, 1.        URl – Set this parameter to the required URL that you want to redirect, in this example ‘recordId’ is my variable with has the Id of the record I want to redirect. We can use static URL (e.g https://www.salesforce.com ) as well. 2.        Isredirect – This is optional, this flag will not...

Best practices for Data Loading in Salesforce

Data loading is a very common requirement in most of the salesforce projects. We need to load many master data and transactional data in production based on requirements that include thousands of records. In this article, I am going to list some best practices that we can follow and keep in mind while loading data in production. 1.     Organization-Wide Sharing defaults - While loading data in production, if objects have ‘Private’ OWD then it does additional processing in the background. Therefore, it is better to load data using read/write OWD and change it to ‘private’ after cutover. 2.     Workflow rules, validation rules, and triggers - If these tools are enabled in your production org while loading data, it can give many errors and it may slow down the process. Therefore, it is recommended to disable these tools before loading data.   3.     Bulk API Vs. SOAP API - SOAP API is useful for small data sets where...

How to start with salesforce

'Salesforce' is cloud computing company, which provides many services and uses many technology to deliver services. Salesforce is high demanding cloud computing technology that provides 'PAAS' to create your application on cloud and deliver to users.  But how to start with salesforce. This article will provide you basic idea to start with Salesforce if you are new to this technology.  If you are a developer, it will be very easy to jump in Salesforce technology and master it. How Salesforce is useful to deliver solution: Salesforce platform will help you to deliver CRM Applications. You can build CRM applications which can be used by businesses to track sales activity. Salesforce Platform is employed across all industries to build and launch game changing apps for every department in a company, including HR, IT, operations, finance, legal, and marketing.  Here is the example of some applications that you can build with help of salesforce. ...