Posts

Showing posts from 2017

Salesforce: Automate creation of Change Set using Selenium

Have you ever been involved in creation of change set for a release? If the number of components are high, then creation of change set becomes a time consuming process. And then the same change set creation has to be replicated across all the env: dev, QA, UAT and finally on Staging. To avoid all the manual work and save time, I have automated the creation of change set using Selenium. You just need the provide the name of your components in a property file and the application will take care of creating the change set. Currently the application is limited to 3 types of components: Apex class, VF page and Triggers and I will be enhancing it soon to support most of the component types. To use this application, create a new Java project in eclipse and follow below steps: 1) Copy following classes in src/main folder:     a) ChangeSet.java     b) ChangeSetUtils.java     c) SeleniumUtils.java 2) Create a file named config.properties under src folder and copy the contents giv

Automate data backup of Salesforce org

Image
Salesforce provides a feature called "Data Export Service" through which you can generate backup files of data on a weekly or monthly basis depending on your salesforce edition. You can export all your org’s data into a set of comma-separated values (CSV) files. The sad part over here is that this feature in not supported in Sandbox yet. Developers frequently have the requirement to take the data backup of sandbox org, especially if they are working with a managed package.  Here is a batch class which will allow you to take a backup of your entire org data and store it under Notes and Attachment under a custom Backup object. In the next blog, I will enhance this code to store the backup in Google Drive instead of storing it in a custom object in org. Here are the steps you need to take to make this work : 1) Create a custom object in your org whose API name should be  Backup__c 2) Create below batch class in your org global class DataExportBatch