ADM 201 Salesforce Certification

The Salesforce.com Certified Administrator exam is intended for an individual who has experience performing as a Salesforce Administrator.

ADM 201 Syllabus

Concepts:

1. Manage users, data, and security
2. Maintain and customize Sales Cloud and Service Cloud applications
3. Build reports, dashboards, and workflow

Administrator's responsiblities:

1. Customizing your application, including page layouts, fields, tabs, and business processes.
2. Creating a secure Salesforce environment.
3. Maintaining and import clean data.
4. Creating high-value reports and dashboards.
5. Setting up workflow automation.

To know more, kindly visit the below links

http://certification.salesforce.com/Administrators

http://www.salesforce.com/assets/pdf/datasheets/DS_ADM201.pdf

Cheers!!!

Winter '14 Release in Salesforce

Winter '13 Release in Salesforce

Salesforce Interview questions with answers Part 21

1. How is salesforce implemented in the project you are working on?

Salesforce can be implemented for

Sales - Sales Cloud is used.
Service - Service cloud is used.
Marketing - Marketing cloud is used.

2. How many users do you have?

Number of active users in your Salesforce organization.
It is based on the client's requirement.

I have supported upto 15000 users in a project.

Normally it will be from 2000 to 10000.

3. Which edition are you using? 


Enterprise edition for small client.

Unlimited edtition for bigger client.

4 What are controller extensions and how are you managing them in the project?

http://www.infallibletechie.com/2012/11/difference-between-standardcontroller.html

Unable to get values from __r Reference in a trigger

In a trigger we cannot get parent record or child record values using __r notation.

The work around for this is we have to get the parent records or child records using the trigger.newMap.keySet().

Sample Code:

List<ParentObject> List = [SELECT Name, Id FROM ChildRecord WHERE ParentObject__c IN : trigger.newMap.keySet();

Why am I getting an “obsolete report” error message in Reports in Salesforce?

You may see this error because:
  1. An object in the report isn’t enabled for reporting anymore.
  2. A lookup relationship used by objects in the report has been deleted or modified.
  3. An object in the report has been deleted.
  4. You don’t have “View” permissions for an object in the report.

Source: http://help.salesforce.com/help/doc/en/faq_reports_error_obsolete.htm

Cheers!!!

How to change the default Lead owner while creating Leads from Web to Lead form in Salesforce?

Change the Default lead creator field while creating Web-To-Lead form.

 


Use of IN operator in SOQL in Salesforce

Sample Code:

Set<ID> AcctIds = new Set<ID>();
AcctIds.add('001U000000doU9v');
AcctIds.add('001U000000doU9w');
AcctIds.add('001U000000doU9x');
AcctIds.add('001U000000doU9y');
AcctIds.add('001U000000doU9z');

String SOQL = 'SELECT Name FROM Account WHERE ID IN : AcctIds';
List<Account> Acct = Database.query(SOQL);

Example:

Visualforce page:

<apex:page controller="Sample" showheader="true">
    <apex:pageBlock >
        <apex:pageblockTable value="{!Acct}" var="A">
            <apex:column value="{!A.Name}"/>
        </apex:pageblockTable>
    </apex:pageBlock>
</apex:page>


Apex Controller:

public class Sample
{   
    Set<ID> AcctIds = new Set<ID>();
    public List<Account> Acct {get;set;}
   
    public Sample() {       
        AcctIds.add('001U000000doU9v');
        AcctIds.add('001U000000doTbx');
        AcctIds.add('001U0000002LIXQ');
       
        String SOQL = 'SELECT Name FROM Account WHERE ID IN : AcctIds';
        Acct = Database.query(SOQL);
    }
}


Output:


List Views in Salesforce

List views are used for frequently performed searches.
Using List views we can:
  1. Save list views for future use.
  2. Filter on a specific field or fields.
  3. Specify which groups of users have access to the list view.
  4. Print list views.
  5. Edit records in list views.
  6. Follow records and view related Chatter posts.
1. Open any tab.

2. Click "Create New View".


3. Give any name, select fields and to whom it should be visible.


4. Click "Save" button.


How to add users to Public Group using Apex in Salesforce?

Sample Trigger:

trigger AddToPG on User (after insert) {
    List<GroupMember> GMlist = new List<GroupMember>();
    for(User U : Trigger.New) {
        if(U.isActive) {
            GroupMember GM = new GroupMember();
            GM.GroupId = '00GU0000001Zjeq';
            GM.UserOrGroupId = U.Id;
            GMList.add(GM);        
        }
    }
    if(!GMList.isEmpty()) {
        System.debug('Group Member List is ' + GMList);
        insert GMList;
    }
}

The ID must begin with / error in Salesforce

This error occurs when action attribute value is wrong.

action="{!methodName}" is correct.

action="methodName" is wrong.

Cross Filters in Reports in Salesforce

Cross filters let you filter the parent records in a report by their related child records, using WITH or WITHOUT conditions.

Example: Opportunities with Products




Merging in Salesforce

Merge used to avoid duplicate records.

Merging is available only for the below Objects
  1. Accounts
  2. Contacts
  3. Leads
Merging cannot be undone.

Example:

1. Go to Account tab and click "Merge Accounts" under Tools.


2. Click "Find Accounts" button.


3. Select the records to merge.


4. Click "Merge" button after selecting the details.


Output:


Cheers!!!

Communities License Types in Salesforce

There are two Communities licenses for external users:

1. Customer Community
2. Customer Community Plus
3. Partner Community

The Customer Community license is similar to a High Volume Customer Portal license and is well-suited for business-to-consumer communities with large numbers of external users. The Partner Community license is similar to a Gold Partner license and is well-suited for business-to-business communities, such as a partner community.

In addition to the new licenses, Communities supports all internal and portal licenses including existing Customer Portal, Authenticated Website, and partner portal licenses. Communities doesn’t support the Chatter External license. Exceeding the below limits may result in additional charges and a decrease in functionality.

Check the below link for latest and more information

https://help.salesforce.com/articleView?id=users_license_types_communities.htm&language=en_US&type=0

Check the below link for pricing

https://www.salesforce.com/products/community-cloud/pricing/

Cheers!!!

Data.com

With Data.com, we can get the quality business data needed to drive sales. With http://data.comyou'll have instant access to millions of company profiles from D&B and tens of millions of complete, up-to-date business contacts—all right from Salesforce. Data.com even cleans data already in Salesforce.

We can find the following in Data.com

1. Accounts
2. Contacts



How to query Product object in Salesforce?

Sample SOQL:

SELECT Id, Name FROM Product2

Output:


How to pass Trigger.Old to Apex class in Salesforce?

Sample Code:

Trigger:


trigger Sample on Opportunity (before update, before insert) {
    if (Trigger.isInsert) {
        SampleApexClass.SampleMethod(Trigger.new);
    } else if (Trigger.isUpdate) {
        SampleApexClass.SampleMethod1(Trigger.new, Trigger.old);
    }
}


Apex Class:

global class SampleApexClass () {
    global static void SampleMethod(List<Opportunity> NewOpps) {
        /* trigger code*/
    }

    global static void SampleMethod1(List<Opportunity> NewOpps, List<Opportunity> OldOpps) {
        /* trigger code*/
    }

 }


Cheers!!!

How to pass Trigger.New to Apex class in Salesforce?

Sample Code:

Trigger:

trigger Sample on Opportunity (before update, before insert) {
    if (Trigger.isInsert) {
        SampleApexClass.SampleMethod(Trigger.new);
    } else if (Trigger.isUpdate) {
        SampleApexClass.SampleMethod1(
Trigger.new, Trigger.old);
    }
}


Apex Class:

global class SampleApexClass () {
    global static void SampleMethod(List<Opportunity> NewOpps
) {
        /* trigger code*/
    }



    global static void SampleMethod1(List<Opportunity> NewOpps, List<Opportunity> OldOpps) {
        /* trigger code*/
    }

 }

Cheers!!!

How to associate multiple contacts to a single contact in Salesforce?

To associate multiple contacts to a single contact in Salesforce, create a custom field "Primary Contact" as a lookup field to Contact(Self-relationship) in Contact object.

Whenever the user clicks the Primary Contact, it will display all the associated contacts.

Cheers!!!

How to add user Role in report filters in Salesforce?

To add a report filter by user Role, use Object Name: Owner Role in filter fields.


(Or)

Create a Report Type with User object



CTI

Computer telephony integration, also called computer–telephone integration or CTI, is a common name for any technology that allows interactions on a telephone and a computer to be integrated or coordinated. The term is predominantly used to describe desktop-based interaction for helping users be more efficient, though it can also refer to server-based functionality such as automatic call routing.

For Salesforce CTI integration, kindly visit the below URL

http://login.salesforce.com/help/doc/en/salesforce_cti_developer_guide.pdf

What does SLA stands for ?

SLA - Service - Level Agreement

A service-level agreement is a negotiated agreement between two or more parties, where one is the customer and the others are service providers. This can be a legally binding formal or an informal "contract" (for example, internal department relationships). Contracts between the service provider and other third parties are often (incorrectly) called SLAs – because the level of service has been set by the (principal) customer, there can be no "agreement" between third parties; these agreements are simply "contracts." Operational-level agreements or OLAs, however, may be used by internal groups to support SLAs.

The SLA records a common understanding about services, priorities, responsibilities, guarantees, and warranties. Each area of service scope should have the "level of service" defined. The SLA may specify the levels of availability, serviceability, performance, operation, or other attributes of the service, such as billing. The "level of service" can also be specified as "expected" and "minimum," which allows customers to be informed what to expect (the minimum), while providing a measurable (average) target value that shows the level of organization performance. In some contracts, penalties may be agreed upon in the case of non-compliance of the SLA (but see "internal" customers below). It is important to note that the "agreement" relates to the services the customer receives, and not how the service provider delivers that service.

SLAs commonly include segments to address: a definition of services, performance measurement, problem management, customer duties, warranties, disaster recovery, termination of agreement. In order to ensure that SLAs are consistently met, these agreements are often designed with specific lines of demarcation and the parties involved are required to meet regularly to create an open forum for communication. Contract enforcement (rewards and penalties) should be rigidly enforced, but most SLAs also leave room for annual revisitation so that it is possible to make changes based on new information.

Allow external users to self-register in Communities

To allow external users to self-register in Communities, kindly modify the "CommunitiesSelfRegController" controller



Communities in Salesforce

1. Go to Setup --> Build --> Customize --> Communities --> Settings.


2. Check "Enable Communities", select a domain, check availability and click "Save" button.


3. Click "New Community".


4. Enter a Name and click "Create" button.


5. Click "Edit" link.


6. Click "Publish" button.


7. Select "Login Page".


8. Optionally select "External Users to Self Register" check box.


9. Click "Force.com" link.


10. Open the link under domain name to open the Community


Service cloud Workbook in Salesforce

How to update a field in Master record when child record is updated?

To update a field in Master record when child record is updated, we have to use Trigger.

Sample Trigger:

In the below trigger, if a Contact is created or updated, the Average_Rating__c field will be updated as average of all Contacts Rating__c under that Account.

trigger RatingAverage on Contact(after insert, after update) {

    Map<Id, List<Contact>> AcctCont = new Map<Id, List<Contact>>();
    Map<Id, Contact> NewMap = trigger.NewMap;
    List<Account> AcctList = new List<Account>();
    List<Contact> ContList = new List<Contact>();
    Set<ID> AcctIds = new Set<ID>();
   
    for(Contact Con : trigger.New) {
        AcctIds.add(Con.AccountId);       
    }
    System.debug('Account ids are ' + AcctIds);
   
    AcctList = [SELECT Average_Rating__c FROM Account WHERE Id IN : AcctIds];
    System.debug('Account List is ' + AcctList);
   
    ContList = [SELECT Rating__c, AccountId FROM Contact WHERE AccountID IN : AcctIds];
    System.debug('Contact List is ' + ContList);
   
    for(ID TempId : AcctIds) {
        List<Contact> TempContList = new List<Contact>();
        for(Contact Con : ContList) {
            if(Con.AccountId == TempId) {
                TempContList.add(con);
            }
            Contact TempCont = new Contact();
            System.debug('Contact Id is ' + con.Id);
        }
        AcctCont.put(TempId, TempContList);
    }
    System.debug('Account and contacts are ' + AcctCont);
   
    for(Account Acct : AcctList) {
        List<Contact> TempContList = new List<Contact>();
        Decimal Total = 0;
        System.debug('Account Id is ' + Acct.Id);
        TempContList = AcctCont.get(Acct.Id);
        for(Contact Con : TempContList) {
            Total = Total + Con.Rating__c;
        }
        Acct.Average_Rating__c = Total/(TempContList.size());
    }
    Update AcctList;
}

Online Salesforce Data loader

Visit the below link for online Salesforce Data loader

https://dataloader.io/

Cheers!!!

Sample Export using dataloader.io:

1. Go to https://dataloader.io/.

2. Click "Login with Salesforce".


3. Select Production or Sandbox and click "Login".


4. Click "New Task" and select "Export".


5. Select Object and click "Next".


6. Select Field, click "Verify" and click "Next".


7. Click "Save and Run".


8. Click "Success" link.


Output:


How to create chatter post using Apex in Trigger or Controller?

Sample Code:

//Adding a Text post
FeedItem post = new FeedItem();
post.ParentId = oId; //eg. Opportunity id, custom object id..
post.Body = 'Enter post text here';
insert post;

//Adding a Link post
FeedItem post = new FeedItem();
post.ParentId = oId; // Record Id eg. Opportunity id, custom object id..
post.Body = 'Enter post text here';
post.LinkUrl = 'http://www.infallibletechie.com';
insert post;

//Adding a Content post
FeedItem post = new FeedItem();
post.ParentId = oId; // Record Id eg. Opportunity id, custom object id..
post.Body = 'Enter post text here';
post.ContentData = base64EncodedFileData;
post.ContentFileName = 'infallible.pdf';
insert post;

External Address Limit per Mass Email in Salesforce



The maximum number of external addresses you can include in each mass email depends on your edition: 

Edition
External Address Limit per Mass Email
Personal, Contact Manager, and Group Editions
Mass email not available
Professional Edition
250
Enterprise Edition
500
Unlimited Edition
1,000
Developer Edition
10

Difference between Product and Asset?

Product:
A product is a thing that your organization sells. A product is member of the list of items.

Asset:
An asset (such as product previously sold and installed) owned by an Account or Contact.

Cheers!!!

What is the difference between Customizable Forecasts and Collaborative Forecasts?



Customizable Forecasts
Collaborative Forecasts
The forecast categories can reflect aggregate information.
The forecast categories only display information for that specific category.
Territory Management is supported.
Territory Management is not supported.


Kindly use the below link to know the complete difference


Cheers!!!

Storing values in Multi-Select picklist using Apex in Salesfoce

Sample Code:

Visualforce page:

<apex:page controller="Sample">
<apex:form >   
    <apex:pageBlock >
        <apex:pageBlockSection columns="1">
            <apex:pageBlockSectionItem >
                <apex:outputLabel >Member Name:</apex:outputLabel>
                <apex:inputText value="{!Name}"/>               
            </apex:pageBlockSectionItem>
            <apex:pageBlockSectionItem >
                <apex:outputLabel >Member Interest:</apex:outputLabel>
                <apex:selectList value="{!SelectedInterests}" multiselect="true" size="3">
                    <apex:selectOptions value="{!InterestOptions}"/>
                </apex:selectList>
            </apex:pageBlockSectionItem>
        </apex:pageBlockSection>
        <apex:pageBlockButtons location="bottom">
            <apex:commandButton value="Save" action="{!sav}"/>
        </apex:pageBlockButtons>
    </apex:pageBlock>
</apex:form>
</apex:page>


Apex Controller:

public class Sample
{   
    public List<String> SelectedInterests {get;set;}
    public String Name {get;set;}
   
    public List<SelectOption> getInterestOptions() {
        List<SelectOption> Options = new List<SelectOption>();
        Options.add(new SelectOption('None','None'));
        Options.add(new SelectOption('Cricket','Cricket'));
        Options.add(new SelectOption('Hockey','Hockey'));
        Options.add(new SelectOption('Swimming','Swimming'));
        Options.add(new SelectOption('Rugby','Rugby'));
        return Options;
    }
   
    public void sav() {
        Member__c Mem = new Member__c();
        Mem.Name = Name;
        String Interests = '';
        Boolean Start = true;
        if(!SelectedInterests.isEmpty()) {          
            for(String Str : SelectedInterests) {
                if(Start) {
                    Interests = Str;
                    Start = false;
                } else {              
                    Interests = Interests + ';' + Str;
                }
            }
        }
        Mem.Interests__c = Interests;
        insert Mem;
    }
}



Note:
Here Member__c is my Custom Object and Interests__c is a multi-picklist field.

Output:



Cheers!!!