Skip to main content

Posts

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...
Recent posts

Different ways to schedule Batch Class

1.       Write a schedulable class for your Batch class. ·          Lets us assume my batch class name is SFDC_ExecuteAccountBatch. ·          To schedule it we need to create a new class and implement a schedulable interface ·          Syntax: global with sharing class  SFDC _ExecuteAccountBatchScheduler implements Schedulable {     global void execute(SchedulableContext sc) {                   SFDC _ExecuteAccountBatch b = new  SFDC _ExecuteAccountBatch();                 database.executebatch(b);     } } 2.       Write a batch class with Schedulable interface ·      ...

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...

Visual Studio Code Setup for Salesforce

This Article explains the initial setup of the VS Code, to start coding in your sandbox or prod org. You will be able to create a component and save back to the org from this article. Step 1) Install  VsCode . Click  here to download .(Please use 1.24 version) Step 2) Install  SFDC CLI     https://developer.salesforce.com/tools/sfdxcli Step 3) Install the  Salesforce Extension for VS Code . and " ForceCode " Extensions. Step 3) Restart the VS Code.                 NOTE : To run all the commands use ctl+shft+P Step 4) Run below command to create new project with manifest 1.        sfdx: create project with manifest 2.        Enter Project name and select folder path. 3.        NOTE: Don’t use space in Name, you may need to run this comman...

Atomated Deployment using pipeline Benefits.

            ·          Retrieve All components and automatically commit it in branch using package.xml. ·          Validate components in branch by every commit or specified commit by one click, without installing any software. ·          No need to install any software in local machine. ·          No need of technical knowledge. ·          You can see the validation in target org deployment history. ·          You can manage pipeline history for tracking. ·          Immediately correct deployment issue when committing in branch, this will reduce deployment timings. ·          Execute test classes in target environment w...

Automated Salesforce Deployment Using Jenkins

Salesforce deployment is a painful manual task. You need to configure many things every time you do deployment in salesforce irrespective of what method you are using for deployment. This article is to setup automated salesforce deployment, using open source software Jenkins .  Features:     You just need to configure everything one time for automated deployment.    You can receive email after every deployment.   You can schedule time and date according to your requirement. Limitation:   You just need to keep your Laptop in sleep or turn on to start deployment at specific time.  Prerequisite Software:  ANT  GIT  PuTTYgen Jenkins Setup: here are two ways to start with Jenkins,   Install Jenkins in local system.   Use cloudbees Online. In this article I will use Jenkins installed on my local system. You can refer below link to install Jenkins. Install for W...