Specific Differences In Salesforce

WhoId Vs WhatId

WhoId WhatId
WhoId represents the person type things. WhatId represents object type things.
LeadId and ContactId are categorized under the whoId. WhatId are typically categorized as an Account ID or an Opportunity ID.
WhoId is equivalent to a contact’s ID or a lead’s ID. The label is Name ID. WhatId is equivalent to the ID of a related object. The label is Related To ID.

Standard Controller Vs Custom Controller

Standard Controller Custom Controller
Standard Controller consists of similar logics and functionality which are been used for standard salesforce page. Custom Controller is a class where page logic and functionality is written in Apex language.
Standard Controller are considered as standard and custom objects that are available in Salesforce. Standard Controller are not objects in Salesforce but Apex classes which are used to frame page logics and functionality.
The standard controller is auto geenrated by SF for all objects. Custom controllers are written by you and do what your code tells them to do.

Note : Other than Standard and Custom controller we also have Controller Extensions through which we can extends the standard or custom controller functionality. controller extension class executes in system mode, if a controller extension extends a standard controller, the logic from the standard controller does not execute in system mode.

User Mode Vs System Mode

System Mode User Mode
In System Mode apex code is running by ignoring user's permission. In User Mode apex code is running by following user permissions and sharing records.
In System Mode an apex code has access to all objects and fields and object permissions, field-level security, sharing rules won't applied there for the current user. In User Mode logged in user don't have create permission and so they are not able to create a record.
All apex code runs in System Mode. Standard controllers and Anonymous block window run in user mode.

Custom Setting Vs Custom Object

Custom Setting Custom Object
Custom settings are used for those resources which can either be used frequently. We can directly fetch data by using getAll() and getValues(dataSetName) methods. Custom Object are used to create for general purpose of resources in Salesforce.
One can create custom setting by Setup-> Develop-> Custom Setting. For Creating custom Object Setup -> Objects-> New Custom Object
Data under the custom setting get exposed into cache. Data under custom object is not exposed into cache for which one can query to fetch data.
We can't define validation in custom settings. We can define validation in custom object.
We can’t define workflow rules or triggers on a Custom Setting We can define workflow rules or triggers on a Custom Object.
We can’t re-arrange fields on the page layout for Custom Settings. We can re-arrange fields on the page layout for Custom Object.

15 Digit ID Vs 18 Digit ID

15 Digit ID 18 Digit ID
15 Digit CRM ID is reference in the UI. 18 Digit CRM ID is reference through API calls.
15 digit CRM ID is case-sensitive. 18 digitCRM ID is case-insensitive.

System Log Vs Debug Log

System Log Debug Log
System logs contains all the system related information. Debug logs are used to recognize only about the debug statements and program executions which are related to user for which the debug is logged.
System Logs are used to refer all the recorded logs like workflows, test class executions etc. Debug logs are used to display only statements under debug in Apex class code.

Standard Picklist Vs Custom Picklist Vs Dynamic Picklist

Standard Picklist Custom Picklist Dynamic Picklist
Standard Picklist are standard fields that already exist in the Salesforce org in standard format. Custom Picklist are those which has been created as a custom field on any object with their respective custom values. Dynamic Picklist are those picklist that makes available on visualforce page by using and components.
For Example Lead Source and Opportunity Stage fields For Example Any custom picklist field For Example please follow below code:

Dynamic Picklist Code Example:

Visalforce Page :

          Object : 


public class DisplayData {
Public list resultList{get;set;}
public string selectObject{get;set;}
public DisplayData()
resultList = new list();
public void SearchObject()
if(selectObject != 'None')
resultList = Database.query('SELECT Name FROM '+selectObject+' LIMIT 20');

Thanks For Reading !!

Happy Salesforce!!


Popular Salesforce Blogs