Concepts or coding lessons of Salesforce that you can implement easily

Salesforce Interview Questions - Part 4

81. How to get the debug log of Connection user in salesforce to salesforce Integration?
Answer
When configuring Debug Logs, you cannot choose a Salesforce to Salesforce Connection User from the User Lookup, but there is a workaround to achieve this.

To begin capturing Debug Logs for a Connection User open the following URL in your browser:
https://YOURSALESFORCEINSTANCE.salesforce.com/p/setup/layout/AddApexDebugLogUser?retURL=%2Fsetup%2Fui%2FlistApexTraces.apexp&UserLookupInput_lkid=YYYYYYYYYYYYYY
&UserLookupInput=Connection%20User
Replace YOURSALESFORCEINSTANCE with your salesforce instance, UserLookupInput_lkid is the ID of the Connection User and UserLookupInput is the User name. You can find the user ID of the connection user, by inspecting the CreatedById for a record created by this user. (eg. via eclipse or Force.com explorer)

82. What are different user licenses available in salesforce and explain them?
Answer : Below is the list of licenses available in salesforce
1)     Salesforce : Full access to salesforce CRM and appExchange
2)     Salesforce Platform : Access only to Custom apps but not standard CRM
3)     Force.com One App : Designed to access only one custom app with unlimited number of tabs
4)     Force.com Knowledge Subscription : Grant user access to Force.com Light app or Force.com enterprise app but no CRM functionality
5)     Knowledge Only User :Designed for users who only need access to the Salesforce Knowledge app
6)     Chatter Free : User has access to chatter which includes feeds, profiles, files and groups 
7)     Chatter External : Designed to allow customers in Chatter groups. Customers are users outside of a company’s email domain.
8)     Chatter Only : User has access to Groups, feeds, people, profiles and files along with access to view accounts and contacts, modify custom objects and use CRM contents, Ideas.

83. What is the difference between Customer portal and Partner portal?
Answer : Traditionally Partner Portal is part of companies Partner Channel Sales efforts. It is a portal focused more on Sales force automation and the efforts of those partners that sell your products to nurture the leads you pass to them, the leads they enter in themselves and the convert to Opportunity and subsequent sale.

Customer Portal on the other hand is more focused on the Service and Support of one’s Customers.

The feature differences are that Partner Portal exposes the Leads and Opportunity objects whereas the Customer Portal does not. However, only the top tier of Partner licensing (Gold Partner licenses) exposes the Case object whereas this is standard in the Customer Portal.

84. What is a Solution in Salesforce?
Answer 
• An answer to a common question or problem
• Enables Customer Support users get up to speed quickly
• Enables Support teams to answer questions quickly and consistently
• Customers search for and browse published Solutions to self assist
• Content-Rich Solutions are an enhancement to the Solution Object which allows solution writers to integrate rich text and
images into their solutions to completely solve a problem

85. Explain Lead conversion?
Answer 
Lead can be converted in salesforce.com and the converted information is mapped to the appropriate business objects – Account, Contact or Opportunity

• The system automatically maps standard lead fields to standard account, contact, and opportunity fields
• For custom lead fields, your administrator can specify how they map to custom account, contact, and opportunity fields
• The system assigns the default picklist values for the account, contact, and opportunity when mapping any standard lead picklist fields that are blank. If your organization uses record types, blank values are replaced with the default picklist values of the new record owner.
• If the lead has a record type, the default record type of the new owner is assigned to records created during lead conversion.

86. Explain the lead conversion process in salesforce?
Answer : When you convert a lead, the standard lead fields are automatically converted to the new account, contact, and, optionally, an opportunity using the information from the lead.
Custom lead fields are converted to custom account, contact, and opportunity fields as specified by your administrator.
All open and closed activities from the lead are attached to the account, contact, and opportunity.


87. What are differences between workflows and approval process?
Answer 
The key difference between workflows and approval process are as below
Workflow rules consist of single step and a single action where as approval process has multiple steps and different actions.
Workflow rules trigger automatically and the rules when triggered are not visible to the user. Approval process on the other hand, contains multiple step s each requiring a specific "I Approve or Reject" user action by the specified approvers.


88. Tell me about Jump Start Wizard versus Standard Wizard in Salesforce?
Answer 
The Jump Start wizard creates a one-step approval process for you in just a few minutes
The Standard Wizard is useful for complex approval processes.

Jump Start Wizard
• The jump start wizard is useful for simple approval processes with a single step.
• Use the jump start wizard if you want to create an approval process quickly by allowing Salesforce to automatically choose some default options for you.

Standard Wizard
• The standard wizard is useful for complex approval processes.
• Use it when you want to fine tune the steps in your approval process.
• The standard wizard consists of a setup wizard that allows you to define your process and another setup wizard that allows you to define each step in the process.

89. What is the Parallel Approval Routing ?
Answer :
Parallel Approval Routing is sending approval requests to multiple approvers in a single step Wait for approval from all the approvers or wait for approval from any one
Configure an approval step to request approval from any combination of multiple users and related users
Configure 25 parallel approvers at each step.

90. What are the Time-Dependent Workflow – Considerations ?
Answer :
Maximum of 10 time triggers per rule
Maximum of 40 actions (10 x 4 types) per time trigger, and 80 actions per workflow rule
Workflow default user must be set up before creating time-based rules
Precision limited to hours or days
Cannot convert leads with time-dependent actions in the Workflow Queue
Time triggers cannot be added to or removed from activated workflow rules
Not possible to create a time-dependent action associated to a rule with a trigger type of Every time the record is created or updated

91. What are the Time-Dependent Workflow Limitations ?
Answer :
Time triggers don’t support minutes or seconds.
Time triggers can’t reference the following:
•  DATE or DATETIME fields containing automatically derived functions, such as TODAY or NOW.
•  Formula fields that include related-object merge fields.

You can’t add or remove time triggers if:
•  The workflow rule is active.
•  The workflow rule is deactivated but has pending actions in the queue.
•  The workflow rule evaluation criteria are set to Evaluate the rule when a record is: created, and every time it’s edited.
•  The workflow rule is included in a package

92. We have a Time Based Workflow and there is Action scheduled to be executed. If we Deactivate the workflow, Scheduled actions will be removed from queue or not?
Answer :
Even after deactivation of workflow, its action will be active in queue.

93. We have Time Based Workflow and there is action scheduled to be executed. Can we delete that workflow?
Answer : If a workflow has any pending time dependent action, then we cannot delete the workflow.

94. How to clear the Time based workflow action queue?
Answer 
Two ways to achieve this: 
1. Make criteria false for all those records. 
2. Navigate to Set up -> Monitoring -> Time Based Workflow, search for scheduled actions and remove from queue.

95. When the Add Time Trigger button is unavailable?
Answer :
The evaluation criteria are set to Evaluate the rule when a record is: created, and every time it’s edited.
The rule is activated.
The rule is deactivated but has pending actions in the workflow queue.

96. In salesforce which fields are indexed automatically?
Answer :
The following fields are indexed by default:
•  primary keys (Id, Name and Owner fields),
•  foreign keys (lookup or master-detail relationship fields),
•  audit dates (such as LastModifiedDate),
•  Custom fields marked as External ID or Unique

97. What is a Category in Salesforce ?
Answer :
• Mechanism to organise Solutions
• Solutions may be associated to one or more Categories
• Categories make up a Solution Category tree structure
What are Suggested Solutions?
• The suggested solutions feature displays up to ten relevant solutions that may help users and customers solve a particular case from the case detail page and the Self-Service portal.
• Suggested Solutions can be enabled for the following:
Cases tab
Self Service Portal
Case auto-response rules and emails.

98. What are different Organization Wide Defaults? Explain each of them?
Answer :
Below are the different OWD values :
Private
    If the OWD for an object is set to private, then only the owner, and users above that role in role hierarchy, can view, edit and report on those records
Public Read Only :
    If the OWD for an object is set to Public Read Only, then all users can view and report on records but they cannot edit them. Only the record owner and the users above that role in the role hierarchy can edit the records
Public Read/Write :
If the OWD for an object is set to Public Read/Write, then all users can view, edit and report on all records. But only owner of the record can delete the records.

Public Read/Write/Transfer :
This is available only for Case and Lead objects
If the OWD for an object is set to Public Read/Write/Transfer then, all users can view, edit, Transfer and report on all the records but only owner of the record can delete the records

Public Full Access :
This is available only for Campaign object.
If the OWD for Campaigns are set Public Full Access then, all users can view, edit, delete and report on all records.

No Access, View Only or Use :
This is available only for Price Book object.
If the OWD for Price Book is set Use then, all users can access the Price Book information and as well as using the Price Book configuration for Opportunities with Products.
If the OWD for Price Book is set View Only then, all users can access the Price Book information but not to use that Price Book detail in Opportunities with Products
If the OWD for Price Book is set No Access then, it restricts users from accessing information for Price Book and Prices.

Controlled By Parent :
If the OWD for any object is set as Controlled By Parent, then user can perform an action on the record based on whether they can do the same on the parent record associated with it.

99. What are differences between custom settings and custom objects?
Answer :
Custom Settings:
1. Custom settings are SOQL inexpensive
2. We can’t write triggers on custom settings
3. Fields on which we can create custom settings are restricted like picklists, lookups and formula fields can’t be created in custom settings
4. No Page layouts, record types, validation rules and workflow rules can be used on custom settings.
5. Custom Settings SOQL is faster than custom objects.

Custom Objects:
1. Custom Objects are SOQL Expensive
2. We can have triggers on custom objects
3. No restrictions on creation of fields
4. Can be used on Custom objects
5. Custom objects SOQL not fast as a custom Settings . 

100. How to get all the required fields of sObject dynamically?
Answer :
There is no direct property available in Apex dynamic API to represent the required field. However there is another way to know about it.
If any fields have below three properties then it is mandatory field.
1. If it is Creatable
2. If it is not nillable and
3. If it does not have any default value

Map<String, Schema.SObjectType> m  = Schema.getGlobalDescribe() ;
Schema.SObjectType s = m.get(so.apiName) ; // Like Account object
Schema.DescribeSObjectResult r = s.getDescribe() ;
Map<String,Schema.SObjectField> fields = r.fields.getMap() ;
for(String f : fields.keyset())
{
    Schema.DescribeFieldResult desribeResult = fields.get(f).getDescribe();
    if( desribeResult.isCreateable()  && !desribeResult.isNillable() && !desribeResult.isDefaultedOnCreate() )
    {
//This is mandatory / required field
    }
}


More Salesforce Interview Questions and Answers: