Category Archives: Salesforce

SOQL query to fetch all fields of an object

By | September 1, 2017

Just in case if we need to fetch all fields with SOQL in salesforce, what we will do? SOQL query to fetch all fields of an object can be achieved with below approach. Write each field in SOQL Go to developer console, open the object, select all fields and click on query, then copy all fields… Read More »

Switch to Lightning Experience Using Apex Salesforce

By | August 28, 2017

In this post we will see how we can Switch to Lightning Experience Using Apex salesforce. When we are logged in salesforce org, then we can switch to lightning experience using UI. But what if we want to switch other users to lightning experience, so there are two ways. Individually login as all user and… Read More »

Excel FISHER Function in Apex Salesforce

By | August 21, 2017

In this post we will see how we can write Excel FISHER function in Apex Salesforce. Before going to the apex code lets first see some details about FISHER function. This function returns the fisher transformation at x. Syntax of FISHER function is as follows in Excel FISHER(x) WHERE x is required Value of x should be… Read More »

Excel CORREL function in Apex Salesforce

By | August 14, 2017

Today we will see salesforce apex equivalent code for Excel CORREL function. Excel CORREL function in Apex Salesforce can be used if we need to perform same calculation on salesforce data as excel CORREL  function. Syntax of CORREL function is as follows in Excel CORREL(array1, array2) WHERE array1 and array2 both are Required. We must ensure that array1 and array2… Read More »

Excel INTERCEPT function in Apex Salesforce

By | August 7, 2017

Hello awesome Developers!!! This post will save your time if you are going to implement Excel INTERCEPT function in apex salesforce. In my previous post of excel function (Excel LINEST function in Apex Salesforce), we coded for LINEST function of excel. Before we jump to code, lets have a quick view of INTERCEPT function. Syntax of Intercept… Read More »

Excel LINEST function in Apex Salesforce

By | July 7, 2017

As a developer we sometime need to implement excel function in code for meeting client’s requirement. Here I will share code for Excel LINEST function in apex. You can check LINEST function/method of excel here. See below code method, you can use it in your apex class.

It will save your time if you… Read More »

Getting length of integer part and fractional part in apex of a number type field salesforce

By | June 29, 2017

Sometimes we need to play with field (custom field or standard) properties in apex. If we need to find the integer part length in a “Number” type field, then there is no direct method in Describe Field Result (DescibeFieldResult) class. But we can find it using some other methods of DescribeFieldResult class. Lets suppose we… Read More »

Overlapping pseudo code

By | June 11, 2017

As a developer, we sometimes need to write code for checking overlapping. We check overlapping for two objects having one start and end point (Overlapping between two appointments, overlapping between two courses, programs etc). For example lets take a Course as object, So Course has a Start Date and End Date. Course (StartDate, EndDate). Now… Read More »

setTabIcon in Service Console is not showing full icon/image.

By | May 25, 2017

Recently I came across service console in Salesforce, Where I need to show the tab Icon for a custom visual-force page. There is a standard method setTabIcon() , which we can use to set the tab icon. This method works fine if we have image/icon of exactly 16*16 px. But if our image/icon is larger, than its… Read More »