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.


Cheers!!!

Upsert operation in Salesforce

Upsert opeation makes use of the sObject record's primary key(Salesforce.com 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.
Cheers!!!

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

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

http://www.infallibletechie.com/search/label/SOQL

Cheers!!!

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.


Cheers!!!

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.

Syntax:

@isTest
public class testClass {
@TestSetup static void setupData() {
SampleCustomSettings__c obj = new SampleCustomSettings__c(Name = 'Testing');
insert obj;
}
static testMethod void test() {
Test.StartTest();
/*..............
..............*/
Test.stopTest();        
}
}

Cheers!!!

CTS Opening


Developer (Job Number: 00009523011)

India-West Bengal-Kolkata

Description

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.
Qualifications
 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:axis>
    <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:chart>
</apex:page>

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;
        }
    }
}

Output:


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="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script> 
    <script>
        var $ = jQuery.noConflict();
        function btnClick() {           
            $('input[id*=confirmBtn]').attr('value','Saving...');
            $('input[id*=confirmBtn]').attr('class', 'btnDisabled');
            callShow();
        }
        
        function btnComplete(){
            $('input[id*=confirmBtn]').attr('value','Saved');
            $('input[id*=confirmBtn]').attr('class', 'btn');
            return true;
        }
    </script>
    <apex:form id="frm">
        <apex:actionFunction name="callShow" action="{!show}"/>        
        <apex:outputText value="{!temp}"/>
        <br/>
        <apex:commandButton id="confirmBtn" value="Save" onclick="btnClick();" oncomplete="btnComplete();" reRender="frm"/>
    </apex:form>
</apex:page>

Apex controller:

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

Output:


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) {
        quoteIds.add(struct.Quote__c);
    }
    
    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>());
                }
                quoteIdStructListMap.get(struct.Quote__c).add(struct);
            }    
            
            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:

Example:

InventoryStatusPage

------------------------------------------------------------------------------------------------------------

Controller Name:

Example:

InventoryStatusController

------------------------------------------------------------------------------------------------------------


Extension Name:

Example:

InventoryStatusExt

------------------------------------------------------------------------------------------------------------


Test Class Name:

Example:

InventoryStatusTest

------------------------------------------------------------------------------------------------------------


Batch Class Name:

Example:

InventoryStatusBatch

------------------------------------------------------------------------------------------------------------


Scheduler Class Name:

Example:

InventoryStatusScheduler

------------------------------------------------------------------------------------------------------------

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

Sample Code:

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

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

Cheers!!!

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:

https://nextstep.tcs.com/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

http://www.qlikview.com/us/services/training/free-training

Cheers!!!

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.


Cheers!

QlikView

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

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.

Workday.com Community

Check the below link for Workday.com Community

https://community.workday.com/

Cheers!

workday.com

Workday.com 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 www.workday.com.

Cheers!!!

Test class for Schedulable class in Salesforce

Sample :

@istest
public with sharing class SampleTest {
    static testmethod void testSample() {
        Test.startTest();
        Datetime dt = Datetime.now().addMinutes(1);
        String CRON_EXP = '0 '+ dt.minute() + ' * ' + dt.day() + ' ' + dt.month() + ' ? ' + dt.year();
        String jobId = System.schedule('Sample_Heading', CRON_EXP, new Schedulable_Class() );   
        Test.stopTest();
    }

}

Cheers!!!

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.

Cheers!!!

Test class for Batch Apex in Salesforce

When testing your batch Apex, you can test only one execution of the execute method. You can use the scope parameter of the executeBatch method to limit the number of records passed into the execute method to ensure that you aren't running into governor limits.

The executeBatch method starts an asynchronous process. This means that when you test batch Apex, you must make certain that the batch job is finished before testing against the results. Use the Test methods startTest and stopTest around the executeBatch method to ensure it finishes before continuing your test. All asynchronous calls made after the startTest method are collected by the system. When stopTest is executed, all asynchronous processes are run synchronously. If you don’t include the executeBatch method within the startTest and stopTest methods, the batch job executes at the end of your test method for Apex saved using Salesforce.com API version 25.0 and later, but not in earlier versions.

Starting with Apex saved using Salesforce.com API version 22.0, exceptions that occur during the execution of a batch Apex job that is invoked by a test method are now passed to the calling test method, and as a result, causes the test method to fail. If you want to handle exceptions in the test method, enclose the code in try and catch statements. You must place the catch block after the stopTest method. Note however that with Apex saved using Salesforce.com API version 21.0 and earlier, such exceptions don't get passed to the test method and don't cause test methods to fail.

Sample Test Class:

@isTest
public class SampleTest {
public static testMethod void testBatch() {
Test.StartTest();
Batch_Class_Name obj = new Batch_Class_Name();
ID batchprocessid = Database.executeBatch(obj );
Test.StopTest();
}
}

Cheers!!!

Formula Expression is required on the action attributes error

Formula Expression is required on the action attributes error occurs when pagereference('/apex/pageName') doesn't have backslash in front of apex.

Correct: pagereference('/apex/sample1');

Incorrect: pagereference('apex/sample1');

in incorrect, backslash ('/') is missing in front of apex.

Cheers!!!

apex:actionFunction is not calling Apex method - Work around

Sometimes, apex:actionFunction is not calling Apex method. The Work around for this is, the Javascript function should return true or false. In apex:commandButton, before calling the Javascript function, we should add return. If the Javascript function returns true, then the method will be invoked else it will not invoke the Apex method.

Sample:

Visualforce page:

<apex:page sidebar="false" Controller="Sample" showHeader="true">
<apex:form >
    <apex:commandButton value="show" onClick="return confirmReq();" action="{!show}"/>
</apex:form>
<apex:outputPanel id="jspanel">
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script>
    <script>
        function confirmReq() {
        if(condition) {
            return true;    
        } else {
        {  
            return false;                                
        }
    </script>
</apex:outputPanel>
</apex:page>

Controller:


public class Sample {     
    public sample() {
    }
    public void show() {
    /*...................
    ...................
    ...................
    ...................*/
    }
}


in the above example, show() from Apex will not be executed until the Javascript function returns true.

Cheers!!!

How to apply auto number for existing records in Salesforce?

Check "Generate Auto Numbers for existing records" check box while creating auto number field.

It will take some time to reflect after creating the field.

Cheers!


How to display Parent, Child and Grandchild records in pageBlockTable in Salesforce?

Objects: Member, Interest, Equipment

Parent : Member
Member's Child : Interest
Member's Grandchild and Interest's Child : Equipment

Visualforce page:

<apex:page sidebar="false" Controller="Sample" showHeader="true">
<apex:form >
<apex:pageBlock >
    <apex:pageBlockTable value="{!memberWrapperList}" var="W">
        <apex:column value="{!W.member.Name}"/>
        <apex:column value="{!W.member.Age__c}"/>
        <apex:column >
            <apex:pageblockTable value="{!W.intrstList}" var="I">
                <apex:column value="{!I.Name}"/>
                <apex:column >
                    <apex:pageBlockTable value="{!I.Equipments__r}" var="E">
                        <apex:column value="{!E.Name}"/>
                        <apex:column value="{!E.Serial_Number__c}"/>
                    </apex:pageBlockTable>
                </apex:column>
            </apex:pageblockTable>
        </apex:column>
    </apex:pageBlockTable>
</apex:pageBlock>
</apex:form>
</apex:page>

Apex Controller:

public class Sample { 
    public List<Member__c> memberList { get; set; }
    public List<Interest__c> interestList { get; set; }
    public Map<Id, List<Interest__c>> memIdInterestListMap { get; set; }
    Set<Id> memberIds = new Set<Id>();
    Map<Id, Member__c> memberMap = new Map<Id, Member__c>();
    
    public List<MemberWrapper> memberWrapperList { get; set; }

    public Sample() {   
        memberList = [SELECT Age__c, Name FROM Member__c];
        memIdInterestListMap = new Map<Id, List<Interest__c>>();
        memberWrapperList = new List<MemberWrapper>();
        if(memberList.size() > 0) {
            for(Member__c mem : memberList) {
                memberIds.add(mem.Id);
                memberMap.put(mem.Id, mem);
            }
            interestList = [SELECT Name, Member__c, (SELECT Name, Serial_Number__c FROM Equipments__r) FROM Interest__c WHERE Member__c IN : memberIds];
            system.debug('Interest List is ' + interestList);
        }
        if(interestList.size() > 0) {
            for(Interest__c intrst : interestList) {
                if(!memIdInterestListMap.containsKey(intrst.Member__c)){
                    memIdInterestListMap.put(intrst.Member__c, new List<Interest__c>());
                }
                memIdInterestListMap.get(intrst.Member__c).add(intrst);
            }
            for(Id interestId : memIdInterestListMap.keySet()) {
                memberWrapperList.add(new MemberWrapper(memberMap.get(interestId), memIdInterestListMap.get(interestId)));
            }
        }
    } 
    
    public class MemberWrapper {
        public Member__c member { get; set; }
        public List<Interest__c> intrstList { get; set; }
        
        public MemberWrapper(Member__c member, List<Interest__c> intrstList) {
            this.member = member;
            this.intrstList = intrstList;
        }
    }
}

Output:



How to get parent's parent id using jQuery?

Sample Code:

$(this).parent().parent().attr('id');

THE HINDU - HITACHI Scholarships

If you are interested in going to Japan, make use of THE HINDU - HITACHI Scholarships.

Check the below link for more info

http://www.thehindu.com/multimedia/archive/01642/HITACHI-WEB-2013_1642552a.pdf


Cheers!!!

System.LimitException: Too many DML rows: 10001

System.LimitException: Too many DML rows: 10001 error occurs, when we try to do DML operations to more than 10000 records at a time.

If we want to do DML operations to more than 10000 records at a time, we have to call a batch class from the current class to handle it separately.

Cheers!!!

How to sort null values at last in SOQL?

Generally in SOQL, null values are sorted first. In order to sort null values at last make use of NULLS LAST keyword.

Sample:

SELECT Name, Id FROM Account ORDER BY Name DESC NULLS LAST

How to Sort both in Ascending and Descending order in SOQL?

Sample:

SELECT Name, CMR_Number__c FROM Account ORDER By Name ASC, AccountSite DESC

Using the above SOQL, accounts will be sorted by Name in ascending order and then by AccountSite in descending order.

How to enable Console Keyboard Shortcuts in Salesforce?

1. Go to Setup --> Build --> Create --> Apps.

2. Open the Console App.


3. Click "Customize keyboard shortcuts" link.


4. Click "Edit".


5. Enable "Keyboard Shortcuts" and click "Save" button.


6. Go to the Console application and click "Show Keyboard Shortcuts".



Salesforce Console for Sales Application

In Winter '14 Release, Salesforce has introduced Console for Sales application.

Salesforce Console for Sales allows users to access Leads, Contacts, Accounts, etc.. very easily and quickly with less number of navigation.

Advantages of Salesforce Console for Sales:

1. Quickly one can get helpful and useful information from Sales intelligence.

2. One can log interaction with the records.

3. We can pin frequently viewing record on the screen for easier access instead of searching it.

4. One can switch over other records using sub tabs instead opening the record in new window or in new tab in the browser.

Note:

 Live Agent can’t be enabled in a Salesforce Console for Sales unless Service Cloud is enabled for your organization.

Setup procedure:


1. Contact salesforce.com to have the Salesforce Console for Sales enabled for your organization.

Use the below links to Contact Salesforce.com support

http://www.infallibletechie.com/2013/01/how-to-contact-salesforce-customer.html

Or

http://www.infallibletechie.com/2012/05/how-to-contact-salesforce-customer.html 

2. Assign the Sales Console User permission set license to a user.

3. Enable the “Sales Console”permission on the permission set.

4. Assign the user to the permission set. Only users with a Sales Console User permission set license can be assigned to permission sets that include the “Sales Console” permission.

5. Create a Salesforce Console app and make it available in the user’s profile.

Incorrect Parameter type for operator '&' error in formula field in Salesforce

This error occur when you are trying to concatenate two fields values into a single formula field or just populating a value from a field in Formula Field which is not returning text.

To avoid this error, use TEXT() method.

Example:

TEXT(CreatedDate) & TEXT(Age__c)

here CreatedDate is a Date Field and Age__c is Number Field.

TEXT() method should be used even in case of Picklist Field.

Cheers!!!

Newly deployed fields missing issue in Salesforce

After deploying the fields and after adding those fields to the page layout, sometimes it will not be available to the users. This is mainly due to Field Level Security.

So, after deploying the fields, we have to deploy the profiles or else we have to set the Field Accessibility.

To check the field accessibility, kindly use the below link

http://www.infallibletechie.com/2013/02/field-accessibility-in-salesforce.html

How to find the initial owner of the record in Salesforce?


CreatedBy is used to find the initial owner of the record in Salesforce.

Page Layout Assignment


After defining page layouts, assign which page layouts users see. A user’s profile determines which page layout he or she sees. In addition, if your organization is using record types for a particular tab, the combination of the user’s profile and the record type determine which page layout is displayed.
You can assign page layouts from:
1. The object's customize page layout or record type page
2. The enhanced profile user interface.
3. The original profile user interface

Standard Object:



Custom Object:


Salesforce Success Community

Kindly visit the below link for Salesforce Success Community

https://success.salesforce.com/

In Salesforce Success Community, we can

1. Discuss about our issues we are facing in Salesforce project.

2. Get information about known issues in Salesforce.

3. Improve our knowledge in Salesforce.

4. Get quick solution from experts for our issues in Integration, Development, Administration, Web Services and so on.

5. Gain more knowledge in all aspects of Salesforce.

6. Help others for their issues where we can avoid the same issue when we face the same.

Price Waterfall

The price waterfall is a way of describing the progression of prices from published list price to the final price paid by a customer.

The Price Waterfall is at the heart of any pricing organisation. It is an effective tool to identify margin leakages and creates visibility from a reference list price down to the pocket margin, including discounts, rebates, and other cost elements. On top of that, the visual representation of your cost allocations makes comparison with your peers very easy.

We have seen that quick wins usually lie in effective pricing execution. Examples of opportunities in this area include raising product/service value perception, introducing price corridors, optimising product mix and minimizing margin leakages through effective discounting.

By analyzing the price waterfall, marketers can determine where product value is being lost. This can be especially important in businesses that allow the sales channel to reduce prices in order to secure customers. The price waterfall can help focus attention on deciding whether these discounts make sense for the business.

Cheers!!!

Difference between Salesforce and SAP

SAP
Salesforce.com
Very huge Software
Less weighted Software
Difficult for maintenance
Easy for maintenance
Limits are very less
Limits are very high
Has very complex process
Has very easy process
SAP coding is bulky and inefficient
Salesforce.com coding is easy and efficient
It is not that much user friendly
Very user friendly
Complex in usage
Ease in usage


How to send free SMS using Google SMS?

1. Log in to your Gmail Account.

2. Go to Settings.


3. Go to "Labs" tab.

4. Enable "SMS (text messaging) in Chat" app.


5. Add the Mobile Number to the contact.


6. Search the contact and click "Send SMS" option to send Free SMS.


How to change the password of BSNL wifi router?

To change the password of BSNL wifi router, kindly follow the below steps

1. Go to this link "http://192.168.1.1/".

2. Enter the login credentials

Username  : admin
Password   : admin


3. Go to Interface Setup --> Wireless.

4. Pre-Shared key is the WIFI Password. If you want you can change it here and save.


Validation rule for the Probability field in Opportunity

Sample:

For Probability equal to 0, Probability = 0
For Probability equal to 10, Probability = 0.10
For Probability equal to 20, Probability = 0.20
For Probability equal to 30, Probability = 0.30
For Probability equal to 40, Probability = 0.40
For Probability equal to 50, Probability = 0.50
For Probability equal to 60, Probability = 0.60
For Probability equal to 70, Probability = 0.70
For Probability equal to 80, Probability = 0.80
For Probability equal to 90, Probability = 0.90
For Probability equal to 100, Probability = 1.00

Validation rule to avoid closing an Opportunity other than today in Salesforce

Validation Rule:


AND ( 
CloseDate <> TODAY(), 
OR ( 
ISCHANGED( StageName ) , 
DATEVALUE( CreatedDate ) = TODAY() 
), 
Probability = 1.00//you can use isClosed = true also 
)

Schema Builder in Salesforce


Schema Builder provides a dynamic environment to add new custom objects, custom fields, and relationships to your schema. This eliminates the need to click from page to page to find the details of a master-detail relationship or to add a new custom field to an object in your schema. For example, if you’re using Schema Builder to view the details of your schema, you can add a new custom object without leaving Schema Builder. The drag-and-drop interface lets you easily add a custom object or new field, and saves the layout of your schema any time you move an object.

Schema Builder provides details such as the field values, required fields, and how objects are related by displaying lookup and master-detail relationships. You can view the details for both standard and custom objects in Schema Builder.

Schema Builder is enabled by default and lets you add the following to your schema:
  1. Custom objects
  2. Lookup relationships
  3. Master-detail relationships
  4. Fields of the following types:
  5. Auto Number
  6. Formula
  7. Roll-up Summary
  8. Checkbox
  9. Currency
  10. Date
  11. Date/Time
  12. Email
  13. Number
  14. Percent
  15. Phone
  16. Picklist
  17. Picklist (Multi-Select)
  18. Text
  19. Text (Encrypted)
  20. Text Area
  21. Long Text Area
  22. Rich Text Area
  23. URL
1. Go to Setup --> Schema Builder.


2. Drag and drop Object.


3. Save the object with details.


4. Add a field by drag and drop.


5. Save the field.


Output:



Freeze Button in Salesforce User detail Page

Freeze button prevent users from logging into your organization.

Note: Freezing user accounts doesn't frees the user licenses available for use in your organization.

User permission needed: Manage Users.

Freeze:



Unfreeze:



How to export a report as an Excel file?

1. Open the Report.

2. Click "Export Details".


3. Click "Export".


4. Click "Save".


5. Click "Done".


Work.com Tutorial

Use the below link for Work.com Tutorial


Cheers!!!

Recognition in Work.com in Salesforce

Available in: Enterprise, Performance, and Unlimited Editions.

Recogniton requires a license to Work.com Motivate, Align or Work.com Perform, which are available as add-on licenses for Enterprise Edition or Unlimited Edition and is included in Performance Edition.

Cheers!!!

Work.com in Salesforce

Salesforce Work.com is a sales performance management platform that takes human resources into the future. Focusing on the social elements of goal alignment, employee motivation, and performance management, Salesforce Work.com takes goal-setting, feedback, recognition, and continuous dialogue into the cloud—no more clunky human resources software. Salesforce Work.com seamlessly integrates our social performance management into the applications where your sales, service, and marketing teams work each and every day, aligning employee goals with the company’s mission and objectives. Performance management has never been more engaging, effective, and simple—empowering managers and their employees alike to work better.

Setting up Work.com:

1. Go to Setup --> Build --> Customize --> Work.com --> Settings.

2. Enable the Thanks Settings.

3. Click "Save" button.


4. Go to any record's feed.

5. Click "Thanks".


6. Select the user.

7. Select the badge.

8. Enter the message.

9. Click Share.


Output:


Annotations in Apex in Salesforce.com

An Apex annotation modifies the way a method or class is used, similar to annotations in Java.

Annotations are defined with an initial @ symbol, followed by the appropriate keyword. To add an annotation to a method, specify it immediately before the method or class definition.

Apex supports the following annotations:

1. @Deprecated
2. @Future
3. @IsTest
4. @ReadOnly
5. @RemoteAction
6. @TestVisible

Apex REST annotations:

1. @RestResource(urlMapping='/yourUrl')
2. @HttpDelete
3. @HttpGet
4. @HttpPatch
5. @HttpPost
6. @HttpPut

@future annotation in Salesforce:
     Use the future annotation to identify methods that are executed asynchronously. When you specify future, the method executes when Salesforce has available resources.

     For example, you can use the future annotation when making an asynchronous Web service callout to an external service. Without the annotation, the Web service callout is made from the same thread that is executing the Apex code, and no additional processing can occur until the callout is complete (synchronous processing).

Note:
     1. Methods with the future annotation must be static methods and can only return a void type.
     2. The specified parameters must be primitive data types, arrays of primitive data types, or collections of primitive data types.
     3. Methods with the future annotation cannot take sObjects or objects as arguments.

Cheers!!!

Limits in Custom Settings in Salesforce


Limits in Custom Settings:

1. The total amount of cached data allowed for your organization is the lesser of these two values:

    i.  10 MB
    ii. 1 MB multiplied by the number of full-featured user licenses in your organization

2. Each Certified managed package gets its own separate limit in addition to your organization limit.

3. 300 fields per custom setting.

4. You can’t share a custom setting object or record.

5. No owner is assigned when a custom setting is created, so the owner can’t be changed.

6. Custom settings are a type of custom object. Each custom setting counts against the total number of custom objects available for your organization.

Project Archive in Force.com IDE

Project Archive in Force.com IDE is used to get a backup of destination environment before deployment begins. This Archive can be used for future reference and can be used for reverting back the changes done earlier.

A deployment archive (archive of destination environment) is not generated if the deployment plan only contains deletes.


Cheers!!!

Web Services in Salesforce

Different APIs supported by Salesforce.com are

REST API
Accessing objects in your organization using REST.
SOAP API
Integrating your organization’s data with other applications using SOAP.
Chatter REST API
Accessing Chatter feeds and social data such as users, groups, followers, and files using REST.
Bulk API
Loading or deleting large numbers of records.
Metadata API
Managing customizations in your organization and building tools that can manage the metadata model, not the data itself.
Streaming API
Providing a stream of data reflecting data changes in your organization.
Apex REST API
Building your own REST API in Apex. ExposesApex classes as RESTful Web services.
Apex SOAP API
Creating custom SOAP Web services in Apex. Exposes Apex classes as SOAP Web services.
Tooling API
Building custom development tools forForce.com applications.

APIs act as Web services interface for interacting with Salesforce.

REST API

REST API is mainly used for  ease of integration and development. It supports smaller sets of data.

SOAP API

SOAP API cab be written in any language that supports Web services.
For example, you can use SOAP API to integrate Salesforce with your organization’s ERP and finance systems, deliver real-time sales and support information to company portals, and populate critical business systems with customer information.

Chatter REST API

Chatter REST API provides programmatic access to Chatter feeds and social data such as users, groups, followers, and files.

Bulk API

Bulk API is based on REST principles and is optimized for loading or deleting large sets of data.
Bulk API is designed to process data from a few thousand to millions of records.
The easiest way to use Bulk API is to enable it for processing records in Data Loader using CSV files. This avoids the need to write your own client application.

Use Metadata API

Use Metadata API to retrieve, deploy, create, update, or delete customizations for your organization. The most common use is to migrate changes from a sandbox or testing organization to your production environment. Metadata API is intended for managing customizations and for building tools that can manage the metadata model, not the data itself.
The easiest way to access the functionality in Metadata API is to use the Force.com IDE or Force.com Migration Tool.

Streaming API

Use Streaming API to receive notifications for changes to data that match a SOQL query that you define.
Streaming API is useful when you want notifications to be pushed from the server to the client. Consider Streaming API for applications that poll frequently. Applications that have constant polling action against the Salesforce infrastructure, consuming unnecessary API call and processing time, would benefit from this API which reduces the number of requests that return no data.Streaming API is also ideal for applications that require general notification of data changes. This enables you to reduce the number of API calls and improve performance.

Apex REST API

Use Apex REST API when you want to expose your Apex classes and methods so that external applications can access your code through REST architecture. Apex REST API supports both OAuth 2.0 and Session ID for authorization.

Apex SOAP API

Use Apex SOAP API when you want to expose your Apex methods as SOAP Web service APIs so that external applications can access your code through SOAP. Apex SOAP API supports both OAuth 2.0 and Session ID for authorization.

Tooling API

Use Tooling API when you want to manage and deploy working copies of Apex classes and triggers and Visualforce pages and components, set checkpoints or heap dump markers, execute anonymous Apex, and access logging and code coverage information.