Category: Salesforce
Salesforce | Fetch all the tasks related to an sfobject
Description: I have a situation where I want to fetch all the tasks related to the account object. Solution: You get all the task records which belong to any of SF object using single SQL query. For Single object: For
Salesforce | ALL ROWS
How to get all records of sfobject including records in recycle bin of salesforce and undelete the records? List objlst = [select id,isdeleted from sfobject ALL ROWS]; //Just add ALL ROWS at the end of SOQL, it retrieves all the
Salesforce: Execute flow from Process Builder
How to execute flow from Process Builder in salesforce? Sometime it is very useful to execute flow from the Process Builder. We can execute as many flows as we want. Flow can be used to create record, update record or
Salesforce | Best Practices
Best Practices for Salesforce For Apex Classes: 1. Use Asynchronous Apex methods like @future methods, batch processing, scheduler that does not need to be executed synchronously. 2. Asynchronous Apex should be “bulkified”. It means able to handle collections of records.
Salesforce | Steps to create Web To Lead form
Steps to create Web To Lead form in Salesforce Steps To Follow: 1. Login to your Salesforce account. 2. Click on Setup. 3. Under Build, section click on customize. 4. Click on Leads. 5. Under leads click on the web
Salesforce | Why to use @TestVisible annotation
Problem: Why we use @TestVisible annotation for a private method and private variable of a Class in Salesforce? Description: I have a situation where I want to call a private method of a class in the test class, whenever I
Salesforce | How to track email sent by workflows or process builder in email history section of record?
1.Create an email template. For example, we created a template called “Leads: Welcome email” Somewhere in the template, add “ref:{Object Id of the record}” which you want to track the activity For example, in our template, we added ref: {!Lead.Id}.
Does Java support call by reference?
Java does not support call by reference because in call by reference we need to pass the address and address are stored in pointers. Java does not support pointers and it is because pointers break the security. Java does manipulate
Selenium | how to upload a csv file with Selenium script
In this post I will give an example of how to upload a csv file with Selenium script to a webpage. Below is the screenshot of webpage: Code to automatically select a csv file and then click Submit button is