YouTube Icon

Interview Questions.

Top 39 Salesforce Crm Interview Questions - Jul 27, 2022

fluid

Top 39 Salesforce Crm Interview Questions

Q1. What Is An External Id In Salesforce? Which All Field Data Types Can Be Used As External Ids?

An external ID is a custom subject which can be used as a unique identifier in a file. External IDs are particularly used while importing records/ records. When importing facts, one the various many fields in those information want to be marked as an outside ID (specific identifier).

An important factor to observe is that only custom fields may be used as External IDs.

The fields that can be marked as outside IDs are: Text, Number, E-Mail and Auto-Number.

Q2. How To Get The User Id Of All The Currently Logged In Users Using Apex Code?

You can get the ID’s of all the presently logged in users by way of the usage of this worldwide function: UserInfo.GetUserId ().

Q3. How To Handle Comma Within A Field While Uploading Using Data Loader?

In a Data Loader .CSV, if there's a comma in field content, you'll ought to enclose the contents within double quotation marks”.

Q4. Can Two Users Have The Same Profile? Can Two Profiles Be Assigned To The Same User?

Profiles determine the level of get right of entry to a person can have in a Salesforce org.

As some distance because the first part of the query is worried, Yes. One profile may be assigned to any wide variety of users. Take the instance of a Sales or Service team in a organization. The whole group can be assigned the identical profile. The admin can create one profile: Sales Profile, to be able to have access to the Leads, Opportunities, Campaigns, Contacts and different gadgets deemed important by way of the agency.

In this manner, many users can be assigned the same profile. In case the crew lead or supervisor need get admission to to extra information/ gadgets then it is able to be executed by using assigning permission units simplest for those users.

Answering the second a part of the query, each person can handiest be assigned 1 profile.

Q5. What Is A Sandbox Org? What Are The Different Types Of Sandboxes In Salesforce?

A sandbox is a replica of the manufacturing surroundings/ org, used for testing and improvement purposes. It’s useful as it lets in development on Apex programming without disturbing the manufacturing environment.

Q6. What Are The Different Ways Of Deployment In Salesforce?

You can install code in Salesforce the use of:

Change Sets

Eclipse with Force.Com IDE

Force.Com Migration Tool – ANT/Java primarily based

Salesforce Package

Q7. What Are The Different Data Types That A Standard Field Record Name Can Have?

A widespread area document call will have information sort of either auto range or textual content subject with a restriction of eighty chars.

For generating automobile numbers, the layout wishes to be specific at the same time as defining the sphere and after that for each document that is added, the variety will get car generated.

For instance:-

Sr No-1

Sr No-2

Sr No-3

Q8. What Is Trigger.New?

Trigger.New is a command which returns the list of facts that have been delivered currently to the topics. To be greater specific, those statistics could be returned which are but to be stored to the database. Note that this concern listing is handiest available in insert and replace triggers, and the records can only be changed in earlier than triggers.

But just for your facts, Trigger. Vintage returns a listing of the vintage versions of the subject information. Note that this subject listing is best available in update and delete triggers.

Q9. What Are The Three Types Of Bindings Used In Visual Force? What Does Each Refer To?

There are three kinds of bindings used in Salesforce:-

Data bindings, which talk over with the records set inside the controller.

Action bindings, which refer to movement methods within the controller.

Component bindings, which talk to different Visual force additives.

Data bindings and Action bindings are the maximum commonplace and they'll be utilized in every Visual pressure page.

Q10. What Is Who Id And What Id In Activities?

Who ID refers to humans. Typically: contacts or leads.

Example:

Lead ID

Contact ID

What ID refers to gadgets.

Example:

Account ID

Opportunity ID

Q11. What Are The Examples Of Non-deterministic Force.Com Formula Fields?

Before I mention a number of the examples, let me come up with an creation to deterministic and non-deterministic components fields. Formula fields whose fee may be static are called deterministic fields. Whereas, method fields whose price can be changed dynamically or whose values will ought to be calculated on the fly, they may be called non-deterministic formula fields. A classic instance of that is a components returning the cutting-edge date and time.

Some examples of non-deterministic fields in Force.Com are:

Lookup fields

Formula fields whose reference spans over different entities

Fields having dynamic date capabilities like:- TODAY() or NOW()

Q12. What Are The Different Types Of Collections In Apex? What Are Maps In Apex?

Collections are the form of variables which can be used to shop multiple number of information (records).

It is useful due to the fact Governor Limits limit the number of records you may retrieve in step with transaction. Hence, collections may be used to save more than one facts in a single variable defined as type series and via retrieving facts in the shape of collections, Governor Limits will be in check. Collections are much like how arrays work.

There are 3 collection sorts in Salesforce:

Lists

Maps

Sets

Maps are used to save statistics within the form of key-price pairs, where each unique key maps to a unmarried fee.

Syntax: Map<String, String> u . S . A . Town = new Map<String, String>();

Q13. What Is The Use Of Writing Sharing Rules? Can You Use Sharing Rules To Restrict Data Access?

Sharing policies are written to present edit get entry to (public examine and write) or public study only get right of entry to to positive individuals in Salesforce org.

A conventional instance is whilst:- simplest your managers or superiors need to take delivery of greater credentials for your facts in gadgets as compared to your friends.

By default, all users on your agency will have corporation-huge-default sharing settings of either Public Read Only or Private.

To provide get right of entry to to greater facts, which customers do not very own, we write sharing regulations.

Example: Sharing policies are used to extend sharing get right of entry to to users in public companies or roles. Hence, sharing policies aren't as strict as company-extensive default settings. They permit greater get entry to for those users.

As a long way as the second part of the question is concerned, the answer is no. We can not use sharing regulations to restrict information get right of entry to. It is best used for allowing greater get admission to to facts.

Q14. How Many Active Assignment Rules Can You Have In A Lead/ Case?

Only one rule may be active at a time.

Q15. What Is Minimum Test Coverage Required For Trigger To Deploy?

In Salesforce, if you need to deploy your code to production, then you definitely should make sure that as a minimum 75% of your Apex code is blanketed through unit exams. And these kinds of exams must whole correctly.

Q16. What Is An Apex Transaction?

An Apex transaction represents a fixed of operations which are carried out as a single unit. The operations here encompass the DML operations which are liable for querying facts. All the DML operations in a transaction both whole successfully, or if an error occurs even in saving a unmarried record, then the whole transaction is rolled returned.

Q17. What All Data Types Can A Set Store?

Sets will have any of the following statistics sorts:

Primitive kinds

Collections

Object

User-described sorts

Built-in Apex types

Q18. Can You Edit An Apex Trigger/ Apex Class In Production Environment? Can You Edit A Visual Force Page In Production Environment?

No, it isn't always viable to edit apex training and triggers directly in manufacturing environment.

It desires to be executed first in Developer version or trying out org or in Sandbox org. Then, to deploy it in manufacturing, a user with Author Apex permission need to install the triggers and instructions the use of deployment tools.

However, Visual force pages may be created and edited in both sandbox and in production.

Only if the page has to do something unique (unique values), it might need to be developed through Sandbox.

Q19. What Are The Types Of Custom Settings In Salesforce? What Is The Advantage Of Using Custom Settings?

There are two forms of custom settings in Salesforce: List Custom Settings and Hierarchy Custom Settings.

List Custom Settings are a sort of custom settings that offers a reusable set of static data that may be accessed across your company no matter consumer/ profile.

Hierarchy Custom Settings are some other type of custom settings that uses integrated hierarchical common sense for “personalizing” settings for particular profiles or customers.

The advantage of the use of custom settings is that it lets in builders to create a custom set of get entry to rules for various users and profiles.

Q20. Can You Have A Roll Up Summary Field In Case Of Master-element Relationship?

Yes. You can have a roll-up precis in case of a grasp-element courting. But not in case of a lookup relationship.

A roll-up summary field is used to show a cost in a grasp document primarily based on the values of a fixed of fields in a detail report. The element record should be associated with the grasp through a master-detail courting.

There are 4 calculations that you could do the use of roll-up precis field. You can remember the range of element information associated with a master document. Or, you may calculate the sum, minimal value, or most fee of a area inside the detail statistics.

Q21. What Are The Different Types Of Object Relations In Salesforce? How Can You Create Them?

No list of Salesforce interview questions is complete with out regarding relationships among objects in Salesforce. Relationships in Salesforce may be used to establish links among two or more items.

The distinct sorts of item relationships in Salesforce are:

Master-Detail Relationship (1:n):-

It is a parent-child courting in which the grasp object controls the conduct of the established child object. It is a 1:n dating, wherein there can be best one discern, however many kids.

The fundamental concept you want to be understand is that, being the controlling item, the master subject can't be empty. If a file/ discipline in master item is deleted, the corresponding fields inside the based item also are deleted. This is called a cascade delete. Dependent fields will inherit the owner, sharing and safety settings from its master.

You can define grasp-detail relationships among two custom gadgets, or between a custom object and widespread item so long as the usual object is the master in the courting.

Lookup Relationship (1:n):-

Lookup relationships are used when you want to create a hyperlink between  gadgets, however with out the dependency on the parent object. Similar to Master-Detail dating, you can think about this as a form of determine-infant dating in which there may be only one discern, however many kids i.E. 1:n dating.

The difference right here is that despite being controlling discipline, deleting a report will not bring about automated deletion of the research field inside the child object. Thus the records inside the baby object will not be affected and there may be no cascade delete here. Neither will the kid fields inherit the owner, sharing or safety settings of its parent.

Junction Relationship (Many-To-Many):-

This type of a dating can exist when there's a need to create two grasp-detail relationships. Two grasp-element relationships may be created with the aid of linking 3 custom objects. Here, two items can be master gadgets and the third object could be dependent on each the gadgets. In simpler words, it'll be a infant item for each the master objects.

Q22. What Happens To Detail Record When A Master Record Is Deleted? What Happens To Child Record When A Parent Record Is Deleted?

In a Master-Detail relationship, when a grasp record is deleted, the detail document is deleted automatically (Cascade delete).

In a Lookup dating, even though the parent file is deleted, the child document will no longer be deleted.

Q23. What Is The Difference Between Public And Global Class In Apex?

Global elegance is obtainable across the Salesforce instance no matter namespaces.

Whereas, public classes are accessible simplest within the corresponding namespaces.

Q24. What Is The Difference Between A Role And Profile In Salesforce?

As cited in one of the previous Salesforce interview questions, a profile will in the end manage access to which facts a person has in a Salesforce org. No consumer can paintings at the Salesforce org with out being assigned a profile. The Profile is therefore obligatory for every consumer.

Role however isn't obligatory for each user. The number one function of the Role/ Role hierarchy is that it permits better stage customers in hierarchy get access to information owned by decrease level customers inside the hierarchy. An instance of this is Sales Managers gaining access to records owned via Sales Reps while their peers do no longer get get right of entry to to it.

Q25. What Are Custom Labels In Salesforce? What Is The Character Limit Of Custom Label?

Custom labels are custom textual content values that may be accessed from Apex training or Visualforce pages. The values right here may be translated into any language supported via Salesforce.

Their benefit is they enable builders to create multilingual applications which automatically affords facts in a consumer’s native language.

You can create as much as 5,000 custom labels to your employer, and that they may be up to at least one,000 characters in period.

Q26. What Are Governor Limits In Salesforce?

In Salesforce, it's miles the Governor Limits which controls how a great deal facts or how many records you could save in the shared databases. Why? Because Salesforce is based on the concept of multi-tenant structure. In easier words, Salesforce uses a single database to save the records of more than one customers/ customers. 

To make sure no single patron monopolizes the shared assets, Salesforce brought the idea of Governor Limits which is precisely enforced by the Apex run-time engine.

Governor Limits are a Salesforce developer’s biggest assignment. That is due to the fact if the Apex code ever exceeds the limit, the expected governor troubles a run-time exception that can not be dealt with. Hence as a Salesforce developer, you have to be very cautious while growing your utility.

Different Governor Limits in Salesforce are:

Per-Transaction Apex Limits

Force.Com Platform Apex Limits

Static Apex Limits

Size-Specific Apex Limits

Miscellaneous Apex Limits

Email Limits

Push Notification Limits

Q27. What Is A Bucket Field In Reports?

A bucket area lets you organization associated statistics together by way of degrees and segments, with out the use of complicated formulation and custom fields. Bucketing can for that reason be used to organization, filter out, or arrange report information. When you create a bucket area, you want to define multiple classes (buckets) which can be used to group file values.

The gain is that earlier, we needed to create custom fields to group or phase certain data.

Q28. What Is A Visual Force Component?

A Visual force Component is both a predefined issue (trendy from element library) or a custom element that determines the user interface conduct. For instance, if you want to send the text captured from the Visual pressure page to an object in Salesforce, then you want to utilize Visual pressure additives.

Example: <apex: detail>

Q29. How Many Call Outs To External Service Can Be Made In A Single Apex Transaction?

Governor limits will restriction a unmarried Apex transaction to make a maximum of one hundred callouts to an HTTP request or an API call.

Q30. Why Do We Need To Write Test Classes? How To Identify If A Class Is A Test Class?

Software builders from round the world will unanimously agree that writing code in take a look at instructions makes debugging extra green. That is because test classes help in developing strong and mistakes-unfastened code be it Apex or any other programming language. Since Unit checks are effective in their personal proper, Salesforce requires you to jot down test instructions in Apex code.

Because check training and check methods verify whether or not a specific piece of code is operating properly or now not. If that piece of code fails, then builders/ testers can correctly locate the take a look at elegance having the defective computer virus.

Test training may be determined easily due to the fact each test magnificence could be annotated with isTest key-word. In reality, if we do now not annotate a check magnificence with isTest, then it cannot be described as a check elegance. Similarly, any method within a category which has the key-word check approach is a test technique.

Q31. What Is The Difference Between A Standard Controller And A Custom Controller?

Standard controller in Apex, inherits all the same old object houses and trendy button functionality without delay. It incorporates the equal capability and good judgment which might be used for general Salesforce pages.

Custom controller is an Apex elegance that implements all of the logic for a page without leveraging a general controller. Custom Controllers are related to Visual pressure pages via the controller characteristic.

Q32. When Can You Use It?

You can use it whilst you want to test a newly developed Force.Com software or Visualforce page. You can broaden and check it in the Sandbox org as opposed to doing it directly in manufacturing.

This way, you can increase the utility without any trouble and then migrate the metadata and data (if relevant) to the production environment. Doing this in a non-production surroundings permits developers to freely check and test applications quit to stop.

Types of Sandboxes are:

Developer

Developer Pro

Partial Copy

Full

Q33. What Is An Object Type?

An item is any object that can be stored in the Force.Com platform database. Apex allows the usage of frequent object summary kind to represent any item.

For example, Vehicle is a customary type and Car, Motor Bike all are concrete varieties of Vehicle.

In SFDC, item is customary and Account, Opportunity, CustomObject__c are its concrete kind.

Q34. Which Fields Are Automatically Indexed In Salesforce?

Only the subsequent fields are mechanically listed in Salesforce:

Primary keys (Id, Name and Owner fields).

Foreign keys (research or grasp-detail courting fields).

Audit dates (consisting of SystemModStamp).

Custom fields marked as an External ID or a unique field.

Q35. What Are The Different Methods Of Batch Apex Class?

Database.Batchable interface incorporates 3 techniques that must be implemented:

Start technique:

worldwide (Database.QueryLocator start(Database.BatchableContext bc) .

Execute technique:

Global void execute (Database.BatchableContext BC, listing).

Finish method:

Global void finish(Database.BatchableContext BC).

Q36. How Many Records Can A Select Query Return? How Many Records Can A Sosl Query Return?

The Governor Limits enforces the following:-

Maximum number of statistics that can be retrieved by means of SOQL command: 50,00@

Maximum quantity of information that can be retrieved via SOSL command: 2,00@

Q37. What Are Getter Methods And Setter Methods?

Get (getter) method is used to skip values from the controller to the VF page.

Whereas, the set (setter) technique is used to set the price lower back to controller variable.

Q38. What Are Dynamic Dashboards? Can Dynamic Dashboards Be Scheduled?

Before we recognize dynamic dashboards, let us first apprehend static dashboards. Static dashboards are the fundamental dashboard sorts as a way to be seen to any consumer who has made a file out of his records. An example of that is what a Sales supervisor/ Marketing supervisor could be capable of see on his Salesforce org. In other words, a regular dashboard shows statistics handiest from a single user’s attitude. Now comes the idea of dynamic dashboards.

Dynamic dashboards are used to show data which is customized to a specific user. Let us bear in mind the equal example as above. In case the Sales manager desires to view the document generated unique to most effective one among his team contributors, then he can use dynamic dashboards.

You can use dynamic dashboards while you want to expose person-unique statistics of a particular user, such as their non-public quotas and income, or variety of case closures, or leads converted etc.

You can also use a regular/ static dashboard when you want to show regional or corporation-huge information to a fixed of users, along with a particular vicinity’s sales variety, or a specific guide crew’s performance on case closures.

As some distance as the second one part of the query is concerned, no we can not agenda a dynamic dashboard. That is because each time we open the dashboard, it's going to display the statistics generated in real-time.

Q39. Explain Skinny Table. What Are The Considerations For Skinny Table?

In Salesforce, thin tables are used to access often used fields and to keep away from joins. This largely stepped forward overall performance. Skinny tables are extraordinarily powerful, a lot so that even if the source tables are modified, skinny tables could be in sync with supply tables.

Considerations for skinny tables:

Skinny tables can include a maximum of a hundred columns.

Skinny tables can not contain fields from other gadgets.

For full sandboxes: Skinny tables are copied to your Full sandbox agencies, as of the Summer ’15 release.




CFG