How to enable quotes in Salesforce?

Hard Delete

Using Hard Delete operation, we can delete existing records from our Salesforce organization permanently. Deleted records will not be available in Recycle Bin. “Bulk API Hard Delete” check box should be enabled in user profile for permanently deleting the records.


Upsert operation in Salesforce

Upsert opeation makes use of the sObject record's primary key( Record Id) or the external ID, if specified to determine whether new records should be created or else we have to update the existing records.
  • If the key is not matched, then a new record is created.
  • If the key is matched once, then the existing record is updated.
  • If the key is matched multiple times, then an error is generated and the object record is neither inserted nor updated.

How to remove space from a string in Salesforce?

deleteWhitespace() is used to remove spaces in a string in Salesforce.

Sample Code:

String str = 'Hello Hi';
system.debug(str.deleteWhitespace()); //HelloHi


SOQL(Salesforce Object Query Language) is used to build a query to fetch data. As we write a query in SQL(Structure Query Language) with the columns and a table, here in SOQL we write the queries with the fields and an Object.

Check the below link for sample SOQLs


Detail page of Case in Salesforce

How to check whether my Batch Apex or Future Method or Scheduled Apex completed in Salesforce?

Go to Set up --> Jobs --> Apex Jobs to check whether my Batch Apex or Future Method or Scheduled Apex completed.


Getting Null values from Custom Settings in Test class in Salesforce

Create records for Custom Setting to avoid null values from Custom Settings in Test class in Salesforce.


public class testClass {
@TestSetup static void setupData() {
SampleCustomSettings__c obj = new SampleCustomSettings__c(Name = 'Testing');
insert obj;
static testMethod void test() {


CTS Opening

Developer (Job Number: 00009523011)

India-West Bengal-Kolkata


Key Responsibilities
 Involved in coding, testing, debugging. Responsible for delivery of assigned work, under a module lead or team lead supervision. Needs to understand technology and quality processes within Cognizant.
 Bachelor’s degree in Engineering or Science graduates with 0-4 years of experience.

Link to Apply:

Radar Chart using Visualforce and Apex in Salesforce

Sample Code:

Visualforce page:

<apex:page sidebar="false" Controller="Sample" showHeader="true" id="pg">
<apex:chart height="750" width="800" legend="true" data="{!data}">
    <apex:legend position="left"/>
    <apex:axis type="Radial" position="radial">
        <apex:chartLabel />
    <apex:radarSeries xField="memName" yField="tenthPercent" tips="true" opacity="0.4"/>
    <apex:radarSeries xField="memName" yField="twelthPercent" tips="true" opacity="0.4"/>
    <apex:radarSeries xField="memName" yField="age" tips="true" markerType="cross" strokeWidth="2" strokeColor="#f33" opacity="0.4"/>

Apex Controller:

public class Sample {   

    public List<RadarData> data {get;set;}
    public sample() {
    data = new List<RadarData>();
        List<Member__c> memList = new List<Member__c>();
        memList = [SELECT Name, Age__c, X10th__c, X12th__c FROM Member__c];
        for(Member__c mem : memList) {
            data.add(new RadarData(mem.Name, mem.X10th__c, mem.X12th__c, mem.Age__c));
    public class RadarData {
        String memName {get;set;}
        Decimal tenthPercent {get;set;}
        Decimal twelthPercent {get;set;}
        Decimal age {get;set;}
        public RadarData(String memName, Decimal tenthPercent, Decimal twelthPercent, Decimal age) {
            this.memName = memName;
            this.tenthPercent = tenthPercent;
            this.twelthPercent = twelthPercent;
            this.Age = age;


How to disable and enable button in Visualforce page in Salesforce?

Sample Code:

Visualforce page:

<apex:page sidebar="false" Controller="Sample" showHeader="true" id="pg">
    <script src="" type="text/javascript"></script> 
        var $ = jQuery.noConflict();
        function btnClick() {           
            $('input[id*=confirmBtn]').attr('class', 'btnDisabled');
        function btnComplete(){
            $('input[id*=confirmBtn]').attr('class', 'btn');
            return true;
    <apex:form id="frm">
        <apex:actionFunction name="callShow" action="{!show}"/>        
        <apex:outputText value="{!temp}"/>
        <apex:commandButton id="confirmBtn" value="Save" onclick="btnClick();" oncomplete="btnComplete();" reRender="frm"/>

Apex controller:

public class Sample {   
    public String temp {get;set;}
    public sample() {
    public pagereference show() {
        temp = 'Testing';
        return null;


Before clicking the Button:

While Button processing:

After clicking the Button:

Trigger to sum all the child record field and storing it in another object field in Salesforce

Consider the below Scenario
Quote and Structure__c --> Master Detail relationship
Quote and Bigmachine__c --> Lookup relationship
Structure__c and Bigmachine__c --> Lookup relationship

We have to calculate total scope on Big Machine object, which should be the sum of all scope in Structure__c object.

Sample Trigger:

trigger Structure_AIUD on Structure__c (after insert, after update) {
    Set<Id> quoteIds = new Set<Id>();
    List<Structure__c> structList = new List<Structure__c>();
    Map<Id, List<Structure__c>> quoteIdStructListMap = new Map<Id, List<Structure__c>>();
    List<Big_Machine__c> bigMachineList = new List<Big_Machine__c>();
    Map<Id, Double> quoteIdTotalScopeMap = new Map<Id, Double>();
    for(Structure__c struct : trigger.New) {
    structList = [SELECT Id, Scope__c, Quote__c FROM Structure__c WHERE Quote__C IN : quoteIds];
    bigMachineList = [SELECT Id, Total_Scope__c, Quote__c FROM Big_Machine__c WHERE Quote__C IN : quoteIds];
    if(bigMachineList.size() > 0) {
        if(structList.size() > 0) {
            for(Structure__c struct : structList) {
                if(!quoteIdStructListMap.containsKey(struct.Quote__c)) {
                    quoteIdStructListMap.put(struct.Quote__c, new List<Structure__c>());
            for(Id quoteId : quoteIdStructListMap.keySet()) {
                List<Structure__c> tempStructList = new List<Structure__c>();
                tempStructList = quoteIdStructListMap.get(quoteId);
                Double tempTotalScope = 0;
                for(Structure__c struct : tempStructList) {
                    tempTotalScope = tempTotalScope + struct.Scope__c;
                quoteIdTotalScopeMap.put(quoteId, tempTotalScope);
        for(Big_Machine__c bigMachine : bigMachineList) {
            bigMachine.Total_Scope__c = quoteIdTotalScopeMap.get(bigMachine.Quote__c);
        update bigMachineList;

Coding standards in Salesforce

Visualforce page Name:




Controller Name:




Extension Name:




Test Class Name:




Batch Class Name:




Scheduler Class Name:




1. Never use SOQL and DML inside for loop.

2. Never hard code values inside the apex classes. Make use of Custom Label or Custom Component.

Test Class for Standard Controller in Salesforce

Check the below code for writing test class for standard controller apex class.

Sample Code:

  1. Account a = new Account( Name = 'Test' );  
  2. Class_Name obj = new Class_Name( new ApexPages.StandardController( a ) );  

here the controller is referred to a page where the standard controller is Account.

TCS Off Campus for 2012 and 2013 passedouts

Company: TCS
Salary Offered: Best in the Industry
Job Role: Software Engineer
Qualification: B.E/B.Tech, MCA, MS, MTECH
Experience: Fresher

Register using the below link for upcoming off campus:

CreatedBy and CreatedDate in SOQL

Sample SOQL:

SELECT Id, CreatedById, CreatedDate FROM Account

QlikView free tutorial

Check the below link for QlikView free tutorial


CurrentStatus in user object in Salesforce

CurrentStatus is similar to posting your current status in Facebook. If we create a Post in Facebook, it will be available in your posts. Similarly whenever this current status is updated, a new Post will be posted in your chatter.

If you update this field, the API automatically adds a post of type UserStatus on the user’s profile in Chatter.

This field is deprecated in API version 25.0. To achieve similar behavior, post to the user directly by creating a FeedItem with the user’s ParentId.



QlikView is the most flexible Business Intelligence platform for turning data into knowledge. More than 24,000 organisations worldwide have enabled their users to easily consolidate, search, and visually analyse all their data for unprecedented business insight using QlikView’s simplicity.

 Effective decision-making is based on having the right information available and easy accessible.
Taking just minutes to learn, the automatic associations of QlikView create endless possibilities for making ad hoc queries without requiring tediously defined structures and hierarchies, as is typical in other data analysis tools. QlikView promotes unrestricted analysis of application data, helping users make time-saving and accurate decisions.

It brings a whole new level of analysis, insight, and value to existing data stores with user interfaces that are clean, simple, and straightforward.

Opening for Freshers 2011|2012|2013|2014

Name Of The Company: Capgemini
Experience Required: Freshers
Educational Qualification: Any Graduate/PG
Job Designation: Entry Level Engineer
Functional Area: Application Programming
Type of Industry: IT-Software Services
Package Offered : Best in Market
Work Location: Across India
About company: 
Capgemini is one of the world’s foremost providers of consulting, technology and outsourcing services. Present in 40 countries with more than 120,000 employees, the Capgemini Group helps its clients transform in order to improve their performance and competitive positioning.We offer an array of integrated services that combine top-of-the-range technology with deep sector expertise and a strong command of our four key businesses.

Parent relationship queries are disabled in Workbench

1. Go to the Workbench setting.

2. In Query & Search option, check "Allows SOQL Parent Relationship Queries" check box and click on apply setting.

You will be able to access the parent relationship queries. Community

Check the below link for Community

Cheers! is an on‑demand (cloud-based) human capital management and financial management software vendor. It was founded by David Duffield, the founder and former CEO of the ERP giant PeopleSoft, and former PeopleSoft chief strategist Aneel Bhusri following Oracle's hostile takeover of PeopleSoft in 2005. It targets the customers of rivals Oracle or SAP by offering them "online services at a fraction of the cost of upgrading from their incumbent vendors".

Workday is the leader in SaaS-based enterprise solutions for human resources, payroll and financial management, providing new levels of business agility for a fraction of the cost of buying, deploying and maintaining legacy on-premise systems.

Workday Human Capital Management and Workday Financial Management use modern, standards-based technologies to provide an unparalleled level of agility, ease-of-use, and integration capability.

For more information about Workday, kindly visit


Test class for Schedulable class in Salesforce

Sample :

  1. @istest  
  3. public with sharing class SampleTest {  
  5.     static testmethod void testSample() {  
  7.         Test.startTest();  
  8.         Schedulable_Class obj = new Schedulable_Class();  
  9.         obj.execute( null );  
  10.         Test.stopTest();  
  12.     }  
  14. }  

Code Coverage in Salesforce Testing

1. Go to Developer Console.

2. Go to Test --> New Run.

3. Select the Test class and click "Run" button to run the test.