Steps for Approval Process

Step 1: Enter Name and Description.

Step 2: Specify Entry Criteria.

Step 3: Specify Approver Field and Record Editability Properties.

Step 4: Select Notification Templates.

Step 5: Select Fields to Display on Approval Page Layout.

Step 6: Specify Initial Submitters.

Cheers!!!

Unable to add Value field in Dashboard settings for Tabular report

The value field can be anyone of the following data types
  1. Number
  2. Currency
  3. Boolean

Types of Reports in Salesforce

Tabular

     Tabular reports are the simplest and fastest way to look at data. Similar to a spreadsheet, they consist simply of an ordered set of fields in columns, with each matching record listed in a row. Tabular reports are best for creating lists of records or a list with a single grand total. They can't be used to create groups of data or charts, and can't be used in dashboards unless rows are limited. Examples include contact mailing lists and activity reports.

Summary

     Summary reports are similar to tabular reports, but also allow users to group rows of data, view subtotals, and create charts. They can be used as the source report for dashboard components. Use this type for a report to show subtotals based on the value of a particular field or when you want to create a hierarchical list, such as all opportunities for your team, subtotaled by Stage and Owner. Summary reports with no groupings show as tabular reports on the report run page.

Matrix

     Matrix reports are similar to summary reports but allow you to group and summarize data by both rows and columns. They can be used as the source report for dashboard components. Use this type for comparing related totals, especially if you have large amounts of data to summarize and you need to compare values in several different fields, or you want to look at data by date and by product, person, or geography. Matrix reports without at least one row and one column grouping show as summary reports on the report run page.

Joined

     Joined reports let you create multiple report blocks that provide different views of your data. Each block acts like a “sub-report,” with its own fields, columns, sorting, and filtering. A joined report can even contain data from different report types.

Cheers!!!

Insufficient access rights on cross-reference id error

When you try to update the data, you may face this issue. Kindly check the user profile and check whether the user has access to update that record. Even if the user has access, kindly check whether the user has access to update fields like record types.

Troubleshooting steps:
  1. Check the user Profile.
  2. Profile need to have access for the record types.

How to update record using SOQL?

Sample code:

Account act = [SELECT Id, Description__c FROM Account WHERE id = '001A000000vtDZo'];
act.Description__c = 'Fully product based account';

Update act;

Inbound Email - Creating record using email in Salesforce

You can use Apex to receive and process email and attachments. The email is received by the Apex email service and processed by Apex classes that utilize the InboundEmail object.

1. Go to Setup --> App Setup --> Develop --> Apex Classes.

Create a class that implements the interface "Messaging.InboundEmailHandler".

Sample code:

global class createMemberInbound implements Messaging.InboundEmailHandler {
    global Messaging.InboundEmailResult handleInboundEmail(Messaging.InboundEmail email, Messaging.InboundEnvelope env) {
   
        Messaging.InboundEmailResult result = new Messaging.InboundEmailResult();
         
        String myPlainText= '';    
           
        myPlainText = email.plainTextBody; 
       
        List<Member__c> memb = new List<Member__c>();
           
        try {
            Member__c mem = new Member__c(Ext_Id__c = myPlainText, Name = email.Subject);
           
            memb.add(mem);
           
            insert memb;   
            
            System.debug('New member: ' + memb);  
        }
           
        catch (Exception e) {
            System.debug('Error is: ' + e);
        }  
         
        result.success = true;
        
        return result;
    }
}


Note:

For other attributes of Messaging.InboundEmail, check the below link

https://help.salesforce.com/HTViewHelpDoc?id=code_inbound_email.htm&language=en_US

2. Go to Setup --> App Setup --> Develop --> Email Services.

3. Click "New Email Service" button.


4. Fill in the details and click "Save" button.


5. Click "New Email Address" button.



6. Fill in the details and click "Save" button.

7. Copy the generated Email address.

8. Compose an email with to address generated email address.


9. Check whether the record has been created in you Salesforce organization.


For more info, kindly visit the below link

http://www.salesforce.com/us/developer/docs/apexcode/

Salesforce interview questions to be expected

1.    How to reset password for particular users in SaleSforce?   

2.    How to grant your administrator or support personnel to login as you?

3.    How to find out what Salesforce edition you have?

4.    How to import attachments using Apex Data Loader?

5.    How to get security token in Salesforce?

6.    Difference between WhoID and WhatID?

7.    Difference between ISBLANK and ISNULL?

8.    Difference between Sandbox and Developer Edition?

9.    How to get fields for sObject using Apex?Apex and Visualforce?

10.    How to truncate string using apex in Salesforce?

11.    How to get Salesforce.com Organization ID?

12.    How to convert sObject to String in Apex?

13.    How to free list memory using apex?

14.    How to get a subquery field value using Apex?

15.    How do I configure proxy settings for Java?

16.    How to send email to a public group using apex?

Salesforce interview stuffs

1.    How to add Row limit and Dashboard settings for Tabular report?

2.    How to find total no of records using SOQL?

3.    How to use a list variable in SOQL?

4.    How to edit Report folder?

5.    How to schedule export?

6.    How to get values from apex:inputField in controller?

7.    How to include external Javascript file in VF?

8.    How to use Custom Labels in Visualforce page and Apex?

9.    How to schedule a report?

10.    How to display multiple Dashboards in home page?

11.    How to track field history in Salesforce?

12.    How to convert lead using Apex?

13.    How to create Sandbox?

14.    How to make approval process active?

15.    How to execute SOQL query in Developer Console?

apex:actionStatus

A component that displays the status of an AJAX update request. An AJAX request can either be in progress or complete.

Sample Code:

<apex:page >

<apex:form >
    <apex:pageBlock id="ab" >
        <apex:pageBlockSection >
            <apex:pageBlockSectionItem ><apex:commandButton value="Status" status="sts" reRender="ab"/></apex:pageBlockSectionItem>           
        </apex:pageBlockSection>
        <apex:actionStatus id="sts" startText="Loding......."/>
    </apex:pageBlock>
       
</apex:form>

</apex:page>


Output:

Web-to-Case in Salesforce

Using a simple web form, we can allow our customers to submit cases directly to our customer support group on-line. These cases will be automatically created in salesforce.com.

1. Go to Setup --> Build --> Customize --> Self-Service --> Web-to-Case.

2. Click the "Generate the HTML" link.


3. Select the required fields and enter the return URL and click "Generate" button.


4. Copy and paste the HTML generated in your blog or website.

5. Click "Finished" Button.


6. Go to the form created using generated HTML in your blog or website.

7. Click "Submit Query" button.

8. Check the created Case in your Salesforce organization.


Cheers!!!

Web-to-Lead in Salesforce

Using pre-existing pages on our company's website, we can capture contact and profile information from users and automatically generate new leads in Salesforce.com, enabling us to respond in real-time to customer requests.

1. Go to Setup --> Build --> Customize --> Leads --> Web-to-Lead.

2. Click "Create Web-to-Lead form" button.


3. Select the required fields and enter the return URL.

4. Click "Generate" button.

5. Copy and paste the HTML generated in your blog or website.

6. Click "Finished" button.

7. Go to the form created using generated HTML in your blog or website.

8. Click "Submit Query" button.

9. Check the created lead in your Salesforce organization.

Parser was expecting element Data Loader Login issue

In order to avoid "Parser was expecting element" error in data loader, kindly check the following settings in Apex Data Loader

1. Check whether you have given the proxy correctly.

2. Check whether you have given the port number correctly.

3. Check whether you have given the correct url(for Production - https://login.salesforce.com and for Sandbox - https://test.salesforce.com).

4. Make sure "API Enabled" permission is checked on the Profile.

Cheers!!!

GROUP BY, ORDER BY and LIMIT in SOQL

Example:

SELECT Name,MAX(NumberofLocations__c) FROM Account GROUP BY name ORDER BY Name LIMIT 2

Field that are aggregated cannot be used in GROUP BY or ORDER BY.

In the above example, NumberOfLocations__c cannot be used in GROUP BY or ORDER BY because NumberOfLocations__c is aggregated.

How to find total no of records using SOQL?

Select count(name) From Account 
      - Returns the total number of Account records.

Salesforce Developer Interview questions

1. If the OWD for account is "Private", is it possible for a user in higher hierarchy to see the records owned by the user below his/her hierarchy?

2. If without sharing class calls with sharing class, how the with sharing class behaves(with sharing or without sharing)?

3. How to extend report access to group of users?

4. How to by pass governor limits?

5. Difference between heap limits and governor limits?

6. How to schedule Batch apex?

7. How to update a text field based on Date field?

Cheers!!!

Difference between Governor limit and Heap limit in Salesforce


Governor Limit
Heap limit
Apex run time engine strictly enforces a number of limits to ensure that runaway Apex does not monopolize shared resources.
The allocation of memory storage for use in a computer program during the runtime of that program.
If some Apex code ever exceeds a limit, the associated governor issues a run time exception that cannot be handled.
When you create objects in your Apex code, memory is allocated to store these objects.


Cheers!!!

Governor Limits in Salesforce

Governor limits are runtime limits enforced by the Apex runtime engine. Since Apex runs in a shared, multitenant environment, the Apex runtime engine strictly enforces a number of limits to ensure that code does not monopolize shared resources.

Types of limits that Apex enforces are resources like

1. Memory
2. Database resources
3. Number of script statements to avoid infinite loops
4. Number of records being processed. If code exceeds a limit, the associated governor issues a runtime exception.

Because Apex runs in a multitenant environment, the Apex runtime engine strictly enforces a number of limits to ensure that runaway Apex doesn’t monopolize shared resources. If some Apex code ever exceeds a limit, the associated governor issues a runtime exception that cannot be handled.

The Apex limits, or governors, track and enforce the statistics outlined in the following tables and sections.

1. Per-Transaction Apex Limits
2. Per-Transaction Certified Managed Package Limits
3. Force.com Platform Apex Limits
4. Static Apex Limits
5. Size-Specific Apex Limits
6. Miscellaneous Apex Limits

Cheers!!!

ADM 201 Syllabus

Syllabus:

Organization Setup - 1%
Company profile

User Setup - 9%
Creation of multiple users

Global User Interface - 1%
Pagelayouts
List View

Security and Access - 15%
OWD
Role
Sharing Rules
Manual Sharing
Profile

Standard and Custom Objects - 18%
Types of objects
Types of fields
Record types and business processes
Implications of deleting fields
Formula fields

Sales Cloud Applications - 9%
Sales process
Big Deal Alert
Web to Lead
Lead Assignment Rule

Service Cloud Applications - 6%
Case management
Web to Case
Email to Case
Public Solution
Community
Salesforce Knowledge

Activity Management - 3%
Task
Event

Chatter - 1%
Describe the features of Chatter

Data Management - 11%
Dataloader
Data export
Dataloader.io
Import Wizard

Content and Folder Management - 2%
Salesforce Content
Folders - Email Templates, Reports, documents

Reports and Dashboards - 13%
Reports
Custom Report Types
Dashboards

Workflow Automation - 7%
Workflows
Approval process

Desktop and Mobile Administration - 2%
Salesforce1 and SalesforceA
Salesforce for Outlook

AppExchange - 2%

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

For sample questions and materials, kindly use the below link

http://www.infallibletechie.com/search/label/ADM%20201

Cheers!!!

Class with sharing and without sharing in Salesforce

With Sharing - Enforce the sharing rules that apply to current user.
Without Sharing - Doesn't enforce the sharing rules.

If a class is not declared as either with or without sharing, the current sharing rules remain in effect. This means that if the class is called by a class that has sharing enforced, then sharing is enforced for the called class.

Default is without sharing.

Example:

public with sharing class CWith 
{
  // All code in this class operates with enforced sharing rules. 
    

  Account a = [SELECT . . . ];

  public void m() 
  { 
      . . . 
  }
  
}

public without sharing class CWithout 
{
  // All code in this class ignores sharing rules and operates  
    
  // as if the context user has the Modify All Data permission. 
    
  public void m() 
  {  
     . . . 

    // This call into CWith operates with enforced sharing rules 
    
    // for the context user. When the call finishes, the code execution  
    
    // returns to without sharing mode. 
    
    CWith.m();
  }


  public class CInner 
  {
    // All code in this class executes with the same sharing context 
    
    // as the code that calls it.  
    
    // Inner classes are separate from outer classes. 
    
    . . .

    // Again, this call into CWith operates with enforced sharing rules 
    
    // for the context user, regardless of the class that initially called this inner class. 
    
    // When the call finishes, the code execution returns to the sharing mode that was used to call this inner class. 
    
    CWith.m();
  }

  public class CInnerWithOut exends CWithout 
  {
    // All code in this class ignores sharing rules because 
    
    // this class extends a parent class that ignores sharing rules. 
    
  }
}

Cheers!!!

Organization Wide Default - OWD in Salesforce

While roles and profiles are used to determine the user-based security, the organization wide default determines the distribution of data with the user. We use the defaults in the object to determine which people across the role hierarchy can access which objects.

Organization-wide defaults are used to restrict data in the sharing model.
In a master-detail relationship, detail records inherit organization-wide defaults from the master record. But in Lookup relationship, parent and child have different OWDs.

The four permissions in OWD are
  1. Private
  2. Public Read Only
  3. Public Read/Write
  4. Public Read/Write/Transfer(Only for Case and Lead)
  5. Public Full Access(Only for Campaign)

Go to Setup --> Administration Setup --> Security Controls --> Sharing Settings --> Organization Wide Default.


Cheers!!!

Password policies in Salesforce

Password policies are user security settings with the password policy for the users. Password policies help us to maintain a strict and complex pattern in password with the automatic expiry. By default Salesforce passwords expire in 90 days and the user cannot use three previous passwords. Passwords are 8 characters in length and should be a combination of alpha-numeric characters. These policies can be changed using the Password Policies settings.

To change the Password Policies perform the following steps:
1. Go to User name --> Setup --> Administration Setup --> Security Controls--> Password Policies.
2. Change the policies according to the requirements as shown in the following screenshot:


3. The message and help link can be provided to the users in case they forget the password. If the system administrator forgets the password we can reset it using the reset link sent to the e-mail.

4. Click 'Save' button to save the changes.

Field
Description
User passwords expire in
The length of time until all user passwords expire and must be changed. Users with the “Password Never Expires” permission are not affected by this setting. The default is 90 days. This setting is not available for Self-Service portals.
Enforce password history
Save users’ previous passwords so that they must always reset their password to a new, unique password. Password history is not saved until you set this value. The default is 3 passwords remembered. You cannot select No passwords remembered unless you select Never expires for the User passwords expire in field. This setting is not available for Self-Service portals.
Minimum password length
The minimum number of characters required for a password. When you set this value, existing users aren’t affected until the next time they change their passwords. The default is 8 characters.
Password complexity requirement
The requirement for which types of characters must be used in a user’s password.
Complexity levels:
  • No restriction—allows any password value and is the least secure option.
  • Must mix alpha and numeric—requires at least one alphabetic character and one number. This is the default.
  • Must mix alpha, numeric, and special characters—requires at least one alphabetic character, one number, and one of the following characters: ! # $ % - _ = + < >.
Password question requirement
The values are Cannot contain password, meaning that the answer to the password hint question cannot contain the password itself; or None, the default, for no restrictions on the answer. The user’s answer to the password hint question is required. This setting is not available for Self-Service portals, Customer Portals, or partner portals.
Maximum invalid login attempts
The number of login failures allowed for a user before they become locked out. This setting is not available for Self-Service portals.
Lockout effective period
The duration of the login lockout. The default is 15 minutes. This setting is not available for Self-Service portals.Note
If users are locked out, they must wait until the lockout period expires. Alternatively, a user with the “Reset Passwords and Unlock Users” permission can unlock them by clicking Your Name | Setup | Manage Users | Users, selecting the user, then clicking Unlock. This button is only available when a user is locked out.
Message
When set, this custom message appears in the Account Lockout email and at the bottom of the Confirm Identity screen for users resetting their passwords. You can customize it with the name of your internal help desk or a system administrator. For the lockout email, the message only appears for accounts that need an administrator to reset them. Lockouts due to time restrictions get a different system email message.
Help link
If set, this link displays with the text defined in the Message field. In the Account Lockout email, the URL displays just as it is typed into the Help link field, so the user can see where the link takes them. This is a security feature because the user is not within a Salesforce organization.
On the Confirm Identity password screen, the Help link URL combines with the text in the Message field to make a clickable link. Security isn’t an issue since the user is in a Salesforce organization when changing passwords.
Valid protocols:
  • http
  • https
  • mailto:

Sample output for Help Link and Message:


Cheers!!!

How to use a list variable in SOQL?

Sample Code:

    public List<String> ids = new List<String>{'003A0560014LLW9','a03A0000014LLWi','s03A000er14LLWq','a03A034d014LLWi','a03un000014LLWi','a03A0y00014LLW9','0019000000GuZEF'};
    

    public List<Account> acc {get;set;}
   
    public void find()
    {       
        acc = Database.Query('Select Name, SLA__c From Account Where Id IN: ids');       
    }

Difference between Queue and Public Group



Queue
Public Group
Queue is used for load balancing
Public Group is solely used for sharing
Queue is a feature available to salesforce.com users that allows you to integrate prospect assignments with your current salesforce.com workflow. Rather than assigning to a specific user, you can choose to assign leads to a salesforce.com queue and then use your CRM workflow or manual method of distributing leads to sales representatives.
Public Group is kind of team or group of related users; this will help you to share the data.
Queue can be created for Custom objects and for Case, Lead and Knowledge Article Version.
Public group created can be used across any objects.