salesforce Interview Questions

salesforce Interview Questions


1.          Suppose If A Record Meets Workflow Criteria For Time Based Workflow Action, The Action Goes In Queue. Later, Before The Time Based Action Is Triggered, The Same Record Gets Modified And The Criteria Previously Met Is Changed And Now It Does Not Meet The Workflow Criteria. What Happens To The Time Based Action Placed In Queue?

Simply the time based workflow action is removed from workflow queue and will not get fired.

 

2.    How To Clear The Time Based Workflow Action Queue?

We can clear time based workflow action queue in two ways they are

1.Make the criteria false.

2.Removing scheduled actions from the queue.

 

3.    We Have “time Based Workflow” And There Is Action Scheduled To Be Executed. Can We Delete That Workflow?

It is not possible to delete the workflow when the workflow is having any pending time dependent actions.

4.    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?

Even after deactivating the the workflow, its action will not be removed. It’s still active in queue.

5.    In Which Criteria Of A Workflow – “time Dependent Workflow Action” Cannot Be Created ?

Created, and every time it’s edited.

 

 

 

6.     What Is Time-dependent Workflow?

Time dependent workflows are not executed independently. Time dependent workflows remain constant in the workflow queue as long as the workflow rule criteria is valid.

 

7.    what Is A Workflow Field Update?

Field updates in workflow and approval processes specifies the field that we want updated and inserting the new value for it. Depending on the field type, we can choose the following options. They are apply a specific value, make the value blank, or calculate a value based on a formula you create.

 

8.    What Is A Workflow Alert?

Email alert is one of the action used in workflow and approval. They are used to generate email template by a workflow rule or approval process and sent to destination recipients. We can send workflow email alerts  to users, contacts having an valid email address.

 

9.    What Is A Workflow Task?

Workflow tasks in salesforce are used to assigns a task to users. Using tasks we can specify the Subject, Status, Priority, and Due Date of the task. Tasks are workflow & approval actions that are triggered by workflow rules or approval processes.

 

10. What Are The Different Workflow Actions Available In Salesforce?

1. Tasks.

2. Email alerts.

3. field updates.

4. Outbound messages

 

 

 

11. Different Workflow Components Available In Salesforce?

In salesforce.com. workflows consists of 5 components they are.

1.Workflow rules.

2.Workflow tasks.

3.Workflow Email alerts.

4.Workflow field updates.

5.Workflow Outbound messages

 

12. What Is Workflow?

Salesforce Workflow is a business logic that evaluates the records as they are created, updated in an object to apply automated process like Assigning Tasks, Emails, Field Update and outbound message sending.

 

13. What Is Analytical Snapshot In Salesforce.com ?

Analytical Snapshot in Salesforce are used to create reports on historical data.

14. How To Enable “floating Report Header”?

To enable floating report header in salesforce go to Setup=>Customize=>Reports and Dashboards=>User Interface settings=>Click on enable floating report header.

15. What Is The Use Of “floating Report Header”?

Floating report headers enables us to display the column header visible on each page when we scroll the report page.

 

16. Which Permission Is Required To Set The Running User Other Than You In Dashboard?

The user must have “View All Data” permission is required to set the running users.

 

17. Who Can Access “drag And Drop Dashboard”?

User who have permissions in managed dashboard can access drag and drop dashboard.

 

18. Explain Dynamic Dashboard.

Dynamic dashboards in Salesforce displays set of metrics that we want across all levels of your organization.

Dynamic Dashboards in salesforce are Created to provide security settings for the dashboards in salesforce.com. We may have a requirement in an organization to “view all data” by every user in an organization according to their access we have to select Run as Logged-in User. There are two setting option in Dashboards. They are

1.Run as specified User.

2.Run as Logged-in User.

 

19. Can We Schedule Dynamic Dashboards?

No, we can not schedule dynamic dashboards for refresh. It must be done manually.

 

20. What Are The Different Dashboard Components?

Salesforce dashboard components are used to represent data. Salesforce dashboards have some visual representation components like graphs, charts, gauges, tables, metrics and visualforce pages. We can use up to 20 components in single dashboard.

21. What Are Dashboards?

Salesforce Dashboards are the graphical representation and visual presentation of reports data in salesforce.

 

22. Is It Possible To Delete Reports Using Data Loader?

No, it is not possible to delete reports using data loaders.

23. What Is A Bucket Field In Reports?

In salesforce reports, bucket fields are used to categorize reports records . When we use bucket field in reports there is no need of creating formula or a custom field.

 

24. Who Can Run Reports?

In Salesforce.com, most reports run automatically when we click on the report name. If we want to run a report click on “Run Report” to run automatically.

 

25. What Are Custom Report Types?

Custom report types in salesforce allows us to build framework in the report wizard when creating custom reports. This custom reports can be created between standard and custom objects.

 

26. What Is Trend Report?

 Trend reports in salesforce are those which displays historical data. Trend reports are used to analyse which fields contains data that we want to leave out.

 

27. What Is A Matrix Report?

 Matrix reports is salesforce are those where the data is arranged in grid format having rows and columns. Data is arranged vertically and horizontally in tables like excel format.

 

28. What Are Custom Reports?

Custom reports in salesforce are those created by user with specific criteria. These type of report can be deleted, edited and stores in personal folders.

 

29. What Are Standard Reports?

 Standard reports in salesforce are those provided by salesforce.com. These type of reports can not be deleted and used primarily for creating custom reports.

 

30. What Are Different Kinds Of Reports?

 There are three types of reports in salesforce.com they are

1.Tabular reports.

2.Summary reports.

3.Matrix reports

 

31. A Custom Object Contains Some Records, Now My Requirement Is To Create Field In This Object With Master Detail Relationship.?

No. we can no create master detail relationship first create look up relationship and associate look fields for every parent record and then convert this to Master detail relationship.

32.  Can We Create Master Detail Relationship On Existing Records?

 Yes, It is possible to create Master-Detail Relationship on existing record. First we have to create Look-Up relationship to a  record then convert it to master-Detail Relationship.

 

33. Define Various Characters Of Roll-up Summary Field?

1.Roll-Up Summary field can be created only in a object which is referred as a object with a master detailed relationship field.

2.Roll-Up Summary field can only created for Master-detail Relationship.

3.Roll-Up Summary field can not be  created for Look-up Relationship.

4.It Derives the data from child Object.

5.We can’t change field type of a field that we reference in a roll-up summary field.

6.Auto numbers are not available here.

7.Roll-Up Summary fields are not available for mapping lead fields of converted fields.

 

34. What Is A “self Relationship”?

Self Relationship is nothing but creating relationship between two same objects. This Self Relationship is a Look-up Relationship to the same object.

 

35. In Partner Community, External User Is Having Appropriate Owd And Profile Settings For Opportunity Or Consider Any Other Object. However They Are Getting Insufficient Privilege Access, What Might Be Cause Of This Error ?

 

1.First check that every field used in report has Field level security for external users.

2.Check whether Standard Report Visibility settings are enabled, if it is enabled user can be able to see reports which are based on standard report types.

3.Now external user can be able to access sensitive information of internal user.

 

36. While Setting Owd (organization Wide Sharing), Can We Change/modify The Setting Of Child Record In Case Of Master-detail Relationship?

 No, we can not change the settings of child record in Master Detail relationship because child record is controlled by parent record.

 

37. How Can You Change The Setting “grant Access Using Hierarchies” For Standard Objects?

 It is not possible , by default Grant Access Using Hierarchies options are enabled for standard objects and they can not be changed.For custom objects we can change “Grant Access Using Hierarchies “settings .

 

38. Best Practices Of Creating Contact Sharing Rules?

Organization wide default settings are used to set red, write, read/write permissions

39. What Is A Role And Role Hierarchy?

Salesforce uses role hierarchy to automatically to grant access to users by default. We can not edit Grant Access using Hierarchies for standard objects and can edit Grant Access using Hierarchies check box for Standard objects.

40.  What Are Login Hours And Login Ip Ranges?

Login hours are set in an organization to restrict the user’s who tries to login before or after login hours.

To set login hours in an organization go to Setup=>Administration=>Manage users=>Profiles.

IP ranges are used to restrict any login attempt is done from unknown IP addresses. Usually organizations maintain login IP ranges.

To set Login IP ranges in salesforce go to Setup=>Administration Setup=>Manage Users=> Profiles.

41. Tell Me About Field-level Security?

 In field level security, we control the user what to see, edit, delete of a particular field in the object.

 

42. How Can You Define Field Dependency?

 In Field dependency, we have to fields controlling filed and dependent field. When a selection is made the controlling field controls dependent picklist values.

Ex- When a country is selected in dependent picklist then the states are available to that country. Here country is controlling field and State is dependent field.

 

43. Difference Between Profiles And Permission Sets?

 Permission Sets  In this Permission sets we define the access level of the user. Generally we determine what a user can do in the applications. These are used to grant additional permission to a user.

Profiles  In Object level Security, Profiles are assigned to the user by system administrator. A profile can be assigned to many users where as a user can have only one Profile.

44. What Is Permission Set?

 Permission sets in salesforce.com are the combination of different settings and permission sets given to user to access records and files.

Note - Manual sharing is available for only Organization wide default settings are private to the object.

 

45. Which Fields Are Indexed By Default In Salesforce?

 Salesforce indexed some fields by default they are Id, name, owner fields, lookup fields, master-detail relationship fields, audit dates like Last Modified dates.

46. What Are Static Resources?

 

Static resources helps to store upload images, files, zip files, documents, javascript files, Css Files which can be used in visualforce pages. Maximum data storage limit for static resource is 250mb.

 

47. How To Delete User From Salesforce?

 

In salesforce.com, deleting a user is not possible. But the user can be deactivated by freezing that user in salesforce. To deactivate user go to Setup=>Administer=>Manage users=>Users=>Click on Freeze.

 

48. What Is Page Layout And Record Types?

Page Layout - In page layout customization can be done like fields, related lists, custom links can be arranged.

Record Types - Record types in salesforce helps to implement business processes like defining picklist values for standard and custom pick lists.

 

49. How Can You Use The Term “transfer Record” In Profile?

Transfer record  is a type of permission in salesforce. If a user is is given access to transfer a record then the user will have the ability to transfer the records which have Read access.

50. Difference Between Role And Profile?

 Roles - Using we can provide record level access like organization wide defaults, Role hierarchy, sharing rules and Manual sharing. Simply roles influences record level access.

Profiles - Using  profile object level and field level access can be made like general permissions, tab level permissions, read & write permissions etc.

 

51. How Many Custom Fields Can I Created In An Object?

 In Unlimited edition we can create up to 500 fields per object. In professional edition we can create up to 100 custom fields per object.

 

52. List Examples Of Custom Field Types?

 Some of the custom field types are date field, Date/Time field, Currency field, Checkbox field, Number field, Text field, Pick list field, Email field, percent fields, phone field, Url field and many more.

 

53. What Is App In Sales Force?

App means an Application. In Salesforce an Application consists a group of tabs which are designed to work as a single function. We have number of applications in Salesforce.com some of them are sales, marketing, chatter, site.com, work.com etc.

We can create new application and also customization for the existing apps in Salesforce.com. To create new app in sfdc go to Setup=>Build=>Create=>App.

 

54. What Is Salesforce?

Salesforce is one of the best customer relationship management (CRM) tool. Salesforce is among one of the best web based flexible and powerful database provider available in the market.

55. Difference Between Public And Private Cloud?

 

Public cloud can be available to people across the world. In this Public Cloud the user has no control over the resources. Where Private Cloud Can be accessed only within the limited premises. In Private cloud Cloud Services Providers Cloud infrastructure to particular Organization or Business specially. This Cloud infrastructure is not provided to others.

 

56. What Is Hybrid Cloud?

Hybrid Cloud is the combination of number of clouds of any type but the cloud has the ability to allow data and / or applications to be moved from on cloud to another cloud. Hybrid Cloud is a combination of (Public Cloud ,Private Cloud, Community Cloud). Here API is used as an interface between public and Private Cloud.

 

57. What Is Public Cloud?

Public cloud can be available to people across the world. In this Public Cloud the user has no control over the resources.

58. What Is The Definition Of Crm?

 “Cloud Computing definition given by NIST (US National Institute of Standards and Technology)  Cloud Computing is a model for enabling ubiquitous, convenient, on-demand network access to a shared pool of configurable computing resources that can be rapidly provisioned and released with minimal management effort or service provider interaction“.

 

59. What Are The Advantages Of Cloud Computing?

 Cloud computing has made tremendous growth in processing power, reliability of the Internet and the great increase in broadband speeds.

It makes tremendous sense to make use of the centralized server of the provider of cloud computing services as not only does it reduce the costs by a great extent by making redundant the need to buy several software licenses, it also eliminates the huge costs required by an organization to maintain and upgrade existing software.

60. Expand Crm And Briefly Explain About Crm ?

 Full form for CRM or Acronym for CRM is “Customer Relationship Management “. We can understand from the full form where CRM is an application used to automate Sales and marketing functions by a using a Software called CRM Software. BY using CRM Software every Company / Organization plans to increase their revenues and profits. This strategy of increasing revenue is done mainly by attracting Customers, clients, Sales etc.

61. What Is Cloud Computing?

 “Cloud Computing is a new trend in IT development, deployment, Delivery module of business Products, Services that are provided over the internet that are been used by the real time User

62. Explain What Is Sales Force?

Salesforce is a CRM delivered as a software-as-a-service (SaaS).

63. Explain What Is A Custom Object In Sales Force?

 

Custom objects are nothing but database tables. It stores data related to your company in Salesforce.com. Once you have defined custom object you can do following things like

Create custom fields

Associate the custom object with other records

In custom related lists, it display the custom object data

For custom object, records track events and tasks

Build page layouts

For the custom object create a custom tab

To analyze custom object data create dashboards and reports

Share your custom tabs, custom apps, custom objects and any other related components

64. Explain What Is Object Relationship Overview?

 Object relationship overview in Salesforce is used to link custom object records to standard object records in a related list. In simple words, it is helpful to track product defects associated with customer cases. You can define different types of relationship by creating custom relationship fields on an object.

65. Mention Changing What May Cause Data Loss?

 Data loss may cause due to following reasons

Changing data and date-time

Altering to percent,number and currency from other data types

Changing from multi-select picklist, checkbox, auto number to other types

Altering to multi-select picklist from any type except picklist

Changing to auto-number except from text

Changing from text-area to e-mail, phone, URL and text

66. How Saas Can Be Helpful To Sales Force?

As SaaS is a subscription based, customers can always choose not to renew if they are dissatisfied

Customers can avoid a large initial investment in an IT infrastructure and day to day hustle of maintaining infrastructure

SaaS customer provides same provider infrastructure and also easy integration

SaaS applications use a simple internet interface that makes easier for customer to use.

SaaS always provide a latest platform to the customer with innovation.

67. How Sales Force Is Useful In Tracking Sales?

 

Sales force records all the basic details like the number of customers served daily, daily sales volume, sales manager detailed reports, sales numbers in each month or quarter.  Also, it keeps a track on the repeat customer, which is key to success for any sales organization.

68. Mention How Many Relationship Is Included In Sfdc And What Are They?

 There are two types of relationship

Master detail relationship

Lookup relationship

69. Mention What Is The Difference Between Isnull And Isblank?

 isNull It supports for number field

isBlank It supports for Text field

70. Explain What Is The Trigger?

 Trigger is a code that is executed before or after the record is updated or inserted.

71. Mention What Is The Use Of The Static Resource In Salesforce?

With the help of static resources, you can upload zip files, images, jar files, JavaScript and CSS files that can be referred in a visual force page. The optimum size of static resources for an organization is 250 mB.

72. Mention What Is The Difference Between Force.com And Salesforce.com?

 Force.com is PaaS (Platform as a Service) while Salesforce.com is SaaS ( Software as a Service).

73. Mention What Are The Actions Available In Workflow?

 Actions available in workflow are

Email Alert

Task

Field Update

Outbound Message

74. Explain What Is The Limit Of Data.com Records That Can Be Added To Salesforce?

 

User can see their limit form setup, by clicking data.com administration/Users.  From the data.com users section, user can see their monthly limit and how many records are exported during the month.

75. Mention What Are The Different Types Of Custom Settings In Salesforce?

 Different types of custom settings in Salesforce includes

Hierarchy type

List type

76. Mention What Are The Three Types Of Object Relations In Salesforce?

 Different types of object relations in Salesforce includes

One to many

Many to many

Master detail

77. Mention What Are The Different Types Of Reports Available In Salesforce?

 Different types of reports available in Salesforce are

Tabular report It displays the grand total in the table form

Matrix report It is a detailed report in which the grouping is done based on both rows and columns

Summary report It is a detailed form of the report in which the grouping is done based on columns

Joined report With this two or more reports can be joined in the single reports

78. Is It Possible To Schedule A Dynamic Dashboard In Salesforce?

 No, it is not possible to schedule a dynamic dashboard in Salesforce.

79. What Does It Indicate If An Error State This “list Has No Rows For Assignment”?

 The error that tells “list has no rows for assignment” indicates that the list you are trying to access has no values in it.

80. Explain What The Junction Object Is And What Is The Use?

 Junction objects are used to build many-to-many relationships between objects.  You can take a recruiting application example, where a position for a job can be linked to many candidates and in the same manner a candidate can be linked to the different positions. So, to connect this data model, you need a third party object, this object is referred as junction object.  Here “job application” is the junction object.

81. Explain What Is Audit Trail?

 Audit trail function is helpful in knowing the information or track all the recent setup changes that the administration does to the organization.  It can store last 6 months data.

82. Explain What Is Dashboard?

 Dashboard is the pictorial representation of the report, and we can add up to 20 reports in a single dashboard.

83. Explain How Many Controllers Can Be Used In A Visual Force Page?

 As Salesforce comes under SaaS, one can use only one controller and as many extension controller.

84. Mention What Is The Difference Between Soql And Sosl?

 SOQL ( Salesforce Object Query Language)

Only one object at a time can be searched

Query all type of fields

It can be used in triggers and classes

DML operation can be performed on query results

SOSL (Salesforce Object Search Language)

Many objects can be searched at a time

Query only e-mail, phone and text

It can be used in classes but not in triggers

DML operation cannot be performed on search result

85. When Do You Use A Before Vs. After Trigger?

 95% of triggers are before triggers – so if you’re unsure, go with before!

You may be wondering why so many triggers are before triggers. There’s a good reason – they’re simpler to use. If you need to make any changes to a record entering your after trigger, you have to do a DML statement. This isn’t necessary in a before trigger – changes to records entering your trigger always save!

The specific use case of an after trigger is when you need to associate any record to a record being created in your trigger. Here’s an example

// Automatically create an Opp when an Account is created

trigger AutoOpp on Account(after insert) {

  List<Opportunity> newOpps = new List<Opportunity>();

  for (Account acc  Trigger.new) {

    Opportunity opp = new Opportunity();

    opp.Name        = acc.Name + ' Opportunity';

    opp.StageName   = 'Prospecting';

    opp.CloseDate   = Date.today() + 90;

    opp.AccountId   = acc.Id; // Use the trigger record's ID

    newOpps.add(opp);

  }

  insert newOpps;

}

86. What’s The Maximum Batch Size In A Single Trigger Execution?

 Default batch size is 200 ,However maximum batch size is 2000.

87. What Are The Differences Between 15 And 18 Digit Record Ids?

 Difference Between 15 and 18 Digit Record Id. Hi Experts, I would like to know the exact difference between 15 and 18 digits record id. Most of us say, 15 digit(case sensitive) and 18 digit(case insensitive).

88. When Should You Build Solutions Declaratively Instead Of With Code?

 As a salesforce best practice, if something can be done using Configurations (Declarative) then its preferred over coding. The declarative framework is optimized for the platform and is always preffered.

89. Give An Example Of A Standard Object That’s Also Junction Object.

 OpportunityContactrole is the junction between Opportunity and Contact, and also Quote is junction between Contract and Opportunity.

90. What Are Tile Report Types?

 4 Types of report in Salesforce.

Tabular Reports We can only displays the grand total in the table

Summary Reports It is a detail form of report in which the grouping done based on Columns.

Matrix Reports It is a detail form of report in which the grouping done based on both Rows and Columns.

Joined Reports We can join the two or more reports in the single report displayed in the form of blocks.

91. How Many Field Dependencies We Can Use In Visual Force Page?

 Maximum we can use 10 field dependencies in VF page.

92. What Is Roll-up Summary?

 Roll-up displays the count of child records and calculate the sum, Min and max of fields of the child records.

93. How To Create Roll-up Summary Field On Lookup Relation?

Not possible. Roll-up summary is enabled for only Master —Detail relationship.

94. What Is Field Dependency?

 

According to the field selection on one field filter the pick list values on other field.

95. Is Check Box Performs Like Controlling Field?

 Yes possible. Controlling field should be Check box or pick list.

96. How We Can Change The Grant Access Using Role Hierarchy For Standard Objects?

Not possible.

97. What Is The Use Of “transfer Record” In Profile?

 If user have only Read access on particular record but he wants to change the owner name of that record, then in profile level Transfer Record enables he can able to change the owier.

98. What Is Permission Set?

Permission sets extend users functional access without changing users profile.

Lx A user has only read access through profile on custoni object. administrator want to give access Edit and create operations to him without changing the profile. Administrator creates the permission set having edit and creates operation on custom object and assign to that user.

99. What Is Manual Sharing?

Manual sharing is to share a record to a particular user manually.

Go to detail page of record and click on manual sharing button and assign that record to other user with Read or Read/write access.

Manual Sharing button enables only when OWD is private to that object.

100.    How To Create Master Details Relationship Between Existing Records?

 Directly we can’t create Master Detail relationship between existing records, first we have to create Lookup relationship and provide valid lookup fields and it shouldn’t null.

101.    How Many Ways We Can Call Apex Class?

Visual force page

Web service

Triggers

Email services

102.    What Is Difference Between Action Support And Action Function?

 Action function Invoke the controller method from java script using AJAX and we can use action function from different places on visual force page.

Action support Invoke the controller method using AJAX when even occurs on page like onMouseOver, onClick. ect... and we can use action support for particular single apex component.

103.    How Many Ways We Can Made Field Is Required?

While creation of field

Validation rules

Page Layout level

104.    What Is Difference Between Role And Profile?

Role is Record level access and it is not mandatory for all users.

Profile is object level and field level access and it is mandatory for all users.

105.    What Is The Maximum Size Of The Pdf Generated On ‘visualforce Attribute Renderas?

15MB

106.    What Is Wrapper Class?

A Wrapper class is a class whose instances are collection of other objects.

It is used to display different objects on a Visual Force page in same table

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

 Profiles determine the level of access a user can have in a Salesforce org.

As far as the first part of the  is concerned, Yes. One profile can be assigned to any number of users. Take the example of a Sales or Service team in a company. The entire team will be assigned the same profile. The admin can create one profile Sales Profile, which will have access to the Leads, Opportunities, Campaigns, Contacts and other objects deemed necessary by the company.

In this way, many users can be assigned the same profile. In case the team lead or manager need access to additional records/ objects then it can be done by assigning permission sets only for those users.

ing the second part of the , each user can only be assigned 1 profile.

108.    What Are Governor Limits In Salesforce?

 In Salesforce, it is the Governor Limits which controls how much data or how many records you can store in the shared databases. Why? Because Salesforce is based on the concept of multi-tenant architecture. In simpler words, Salesforce uses a single database to store the data of multiple clients customers.

To make sure no single client monopolizes the shared resources, Salesforce introduced the concept of Governor Limits which is strictly enforced by the Apex run-time engine.

Governor Limits are a Salesforce developer’s biggest challenge. That is because if the Apex code ever exceeds the limit, the expected governor issues a run-time exception that cannot be handled. Hence as a Salesforce developer, you have to be very careful while developing your application.

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

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

A sandbox is a copy of the production environment/ org, used for testing and development purposes. It’s useful because it allows development on Apex programming without disturbing the production environment.

110.    When Can You Use It?

You can use it when you want to test a newly developed Force.com application or Visualforce page. You can develop and test it in the Sandbox org instead of doing it directly in production.

This way, you can develop the application without any hassle and then migrate the metadata and data (if applicable) to the production environment. Doing this in a non-production environment allows developers to freely test and experiment applications end to end.

Types of Sandboxes are

Developer

Developer Pro

Partial Copy

Full

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

No, it is not possible to edit apex classes and triggers directly in production environment.

It needs to be done first in Developer edition or testing org or in Sandbox org. Then, to deploy it in production, a user with Author Apex permission must deploy the triggers and classes using deployment tools.

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

Only if the page has to do something unique (different values), it would have to be developed via Sandbox.

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

 A standard field record name can have data type of either auto number or text field with a limit of 80 chars.

For generating auto numbers, the format needs to be specified while defining the field and after that for every record that is added, the number will get auto generated.

For example-

Sr No-{1}

Sr No-{2}

Sr No-{3}

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

Who ID refers to people. Typically contacts or leads.

Example

Lead ID

Contact ID

What ID refers to objects.

Example

Account ID

Opportunity ID

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

Sharing rules are written to give edit access (public read and write) or public read only access to certain individuals in Salesforce org.

A classic example is when- only your managers or superiors need to be given extra credentials to your records in objects as compared to your peers.

By default, all users in your organization will have organization-wide-default sharing settings of either Public Read Only or Private.

To give access to more records, which users do not own, we write sharing rules.

Example Sharing rules are used to extend sharing access to users in public groups or roles. Hence, sharing rules are not as strict as organization-wide default settings. They allow greater access for those users.

As far as the second part of the  is concerned, the  is no. We cannot use sharing rules to restrict data access. It is only used for allowing greater access to records.

115.    What Is A Bucket Field In Reports?

A bucket field lets you group related records together by ranges and segments, without the use of complex formulas and custom fields. Bucketing can thus be used to group, filter, or arrange report data. When you create a bucket field, you need to define multiple categories (buckets) that are used to group report values.

The advantage is that earlier, we had to create custom fields to group or segment certain data.

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

Before we understand dynamic dashboards, let us first understand static dashboards. Static dashboards are the basic dashboard types that will be visible to any user who has made a report out of his data. An example of this is what a Sales manager/ Marketing manager would be able to see on his Salesforce org. In other words, a normal dashboard shows data only from a single user’s perspective. Now comes the concept of dynamic dashboards.

Dynamic dashboards are used to display information which is tailored to a specific user. Let us consider the same example as above. In case the Sales manager wants to view the report generated specific to only one of his team members, then he can use dynamic dashboards.

You can use dynamic dashboards when you want to show user-specific data of a particular user, such as their personal quotas and sales, or number of case closures, or leads converted etc.

You can also use a normal/ static dashboard when you want to show regional or organization-wide data to a set of users, such as a particular region’s sales number, or a particular support team’s performance on case closures.

As far as the second part of the  is concerned, no we cannot schedule a dynamic dashboard. That is because whenever we open the dashboard, it will show the data generated in real-time.

 

 

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

  No list of Salesforce interview s is complete without involving relationships between objects in Salesforce. Relationships in Salesforce can be used to establish links between two or more objects.

The different types of object relationships in Salesforce are

Master-Detail Relationship (1n)-

It is a parent-child relationship in which the master object controls the behavior of the dependent child object. It is a 1n relationship, in which there can be only one parent, but many children.

The main concept you need to be know is that, being the controlling object, the master field cannot be empty. If a record/ field in master object is deleted, the corresponding fields in the dependent object are also deleted. This is called a cascade delete. Dependent fields will inherit the owner, sharing and security settings from its master.

You can define master-detail relationships between two custom objects, or between a custom object and standard object as long as the standard object is the master in the relationship.

Lookup Relationship (1n)-

Lookup relationships are used when you want to create a link between two objects, but without the dependency on the parent object. Similar to Master-Detail relationship, you can think of this as a form of parent-child relationship where there is only one parent, but many children i.e. 1n relationship.

The difference here is that despite being controlling field, deleting a record will not result in automatic deletion of the lookup field in the child object. Thus the records in the child object will not be affected and there is no cascade delete here. Neither will the child fields inherit the owner, sharing or security settings of its parent.

Junction Relationship (Many-To-Many)-

This kind of a relationship can exist when there is a need to create two master-detail relationships. Two master-detail relationships can be created by linking 3 custom objects. Here, two objects will be master objects and the third object will be dependent on both the objects. In simpler words, it will be a child object for both the master objects.

 

118.    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 master record is deleted, the detail record is deleted automatically (Cascade delete).

In a Lookup relationship, even if the parent record is deleted, the child record will not be deleted.

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

Yes. You can have a roll-up summary in case of a master-detail relationship. But not in case of a lookup relationship.

A roll-up summary field is used to display a value in a master record based on the values of a set of fields in a detail record. The detail record must be related to the master through a master-detail relationship.

There are 4 calculations that you can do using roll-up summary field. You can count the number of detail records related to a master record. Or, you can calculate the sum, minimum value, or maximum value of a field in the detail records.

120.    Explain The Term “data Skew” In Salesforce?

 “Data skew” is a condition which you will encounter when working for a big client where there are over 10,000 records. When one single user owns that many records we call that condition ‘ownership data skew’.

When such users perform updates, performance issues will be encountered because of “data skew”. This happens when a single user/ members of a single role own most of the records for a particular object.

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

In Salesforce, skinny tables are used to access frequently used fields and to avoid joins. This largely improved performance. Skinny tables are highly effective, so much so that even when the source tables are modified, skinny tables will be in sync with source tables.

Considerations for skinny tables

Skinny tables can contain a maximum of 100 columns.

Skinny tables cannot contain fields from other objects.

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

122.    Which Fields Are Automatically Indexed In Salesforce?

Only the following fields are automatically indexed in Salesforce

Primary keys (Id, Name and Owner fields).

Foreign keys (lookup or master-detail relationship fields).

Audit dates (such as SystemModStamp).

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

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

In a Data Loader .CSV, if there is a comma in field content, you will have to enclose the contents within double quotation marks”.

124.    For Which Criteria In Workflow “time Dependent Workflow Action” Cannot Be Created?

Time dependent workflow action cannot be create for “created, and every time it’s edited”.

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

 There are two types of custom settings in Sales`force List Custom Settings and Hierarchy Custom Settings.

List Custom Settings are a type of custom settings that provides a reusable set of static data that can be accessed across your organization irrespective of user/ profile.

Hierarchy Custom Settings are another type of custom settings that uses built-in hierarchical logic for “personalizing” settings for specific profiles or users.

The advantage of using custom settings is that it allows developers to create a custom set of access rules for various users and profiles.

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

 Only one rule can be active at a time.

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

 Custom labels are custom text values that can be accessed from Apex classes or Visualforce pages. The values here can be translated into any language supported by Salesforce.

Their benefit is that they enable developers to create multilingual applications which automatically presents information in a user’s native language.

You can create up to 5,000 custom labels for your organization, and they can be up to 1,000 characters in length.

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

 As mentioned in one of the previous Salesforce interview s, a profile will ultimately control access to which records a user has in a Salesforce org. No user can work on the Salesforce org without being assigned a profile. The Profile is therefore mandatory for every user.

Role however is not mandatory for every user. The primary function of the Role/ Role hierarchy is that it allows higher level users in hierarchy get access to records owned by lower level users in the hierarchy. An example of that is Sales Managers getting access to records owned by Sales Reps while their peers do not get access to it.

129.    What Are The Examples Of Non-deterministic Force.com Formula Fields?

 Before I mention some of the examples, let me give you an introduction to deterministic and non-deterministic formula fields. Formula fields whose value will be static are referred to as deterministic fields. Whereas, formula fields whose value will be changed dynamically or whose values will have to be calculated on the fly, they are referred to as non-deterministic formula fields. A classic example of that is a formula returning the current date and time.

Some examples of non-deterministic fields in Force.com are

Lookup fields

Formula fields whose reference spans over other entities

Fields having dynamic date functions like- TODAY() or NOW()

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

Software developers from around the world will unanimously agree that writing code in test classes makes debugging more efficient. That is because test classes help in creating robust and error-free code be it Apex or any other programming language. Since Unit tests are powerful in their own right, Salesforce requires you to write test classes in Apex code.

Because test classes and test methods verify whether a particular piece of code is working properly or not. If that piece of code fails, then developers/ testers can accurately locate the test class having the faulty bug.

Test classes can be determined easily because every test class will be annotated with isTest keyword. In fact, if we do not annotate a test class with isTest, then it cannot be defined as a test class. Similarly, any method within a class which has the keyword test method is a test method.

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

 

In Salesforce, if you want to deploy your code to production, then you must make sure that at least 75% of your Apex code is covered by unit tests. And all these tests must complete successfully.

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

 You can deploy code in Salesforce using

Change Sets

Eclipse with Force.com IDE

Force.com Migration Tool – ANT/Java based

Salesforce Package

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

An external ID is a custom field which can be used as a unique identifier in a record. External IDs are mainly used while importing records/ data. When importing records, one among the many fields in those records need to be marked as an external ID (unique identifier).

An important point to note is that only custom fields can be used as External IDs.

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

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

Governor limits will restrict a single Apex transaction to make a maximum of 100 callouts to an HTTP request or an API call.

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

Standard controller in Apex, inherits all the standard object properties and standard button functionality directly. It contains the same functionality and logic that are used for standard Salesforce pages.

Custom controller is an Apex class that implements all of the logic for a page without leveraging a standard controller. Custom Controllers are associated with Visual force pages through the controller attribute.

136.    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 currently logged in users by using this global function UserInfo.getUserId ().

137.    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 records that can be retrieved by SOQL command 50,000.

Maximum number of records that can be retrieved by SOSL command 2,000.

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

 There are three types of bindings used in Salesforce-

Data bindings, which refer to the data set in the controller.

Action bindings, which refer to action methods in the controller.

Component bindings, which refer to other Visual force components.

Data bindings and Action bindings are the most common and they will be used in every Visual force page.

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

Collections are the type of variables which can be used to store multiple number of records (data).

It is useful because Governor Limits restrict the number of records you can retrieve per transaction. Hence, collections can be used to store multiple records in a single variable defined as type collection and by retrieving data in the form of collections, Governor Limits will be in check. Collections are similar to how arrays work.

There are 3 collection types in Salesforce

Lists

Maps

Sets

Maps are used to store data in the form of key-value pairs, where each unique key maps to a single value.

Syntax Map<String, String> country city = new Map<String, String>();

140.    What Is The Use Of “@future” Annotation?

Future annotations are used to identify and execute methods asynchronously. If the method is annotated with “@future”, then it will be executed only when Salesforce has the available resources.

For example, you can use it while making an asynchronous web service callout to an external service. Whereas without using the annotation, the web service callout is made from the same thread that is executing the Apex code, and no additional processing will occur until that callout is complete (synchronous processing).

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

Database.Batchable interface contains three methods that must be implemented

Start method

global (Database.QueryLocator | Iterable) start(Database.BatchableContext bc) {}.

Execute method

Global void execute (Database.BatchableContext BC, list){}.

Finish method

Global void finish(Database.BatchableContext BC){}.

142.    What Is A Visual Force Component?

 

A Visual force Component is either a predefined component (standard from component library) or a custom component that determines the user interface behavior. For example, if you want to send the text captured from the Visual force page to an object in Salesforce, then you need to make use of Visual force components.

Example <apex detail>

143.    What Is Trigger.new?

Trigger.New is a command which returns the list of records that have been added recently to the subjects. To be more precise, those records will be returned which are yet to be saved to the database. Note that this subject list is only available in insert and update triggers, and the records can only be modified in before triggers.

But just for your information, Trigger. old returns a list of the old versions of the subject records. Note that this subject list is only available in update and delete triggers.

144.    What All Data Types Can A Set Store?

Sets can have any of the following data types

Primitive types

Collections

Object

User-defined types

Built-in Apex types

145.    What Is An Object Type?

An object is any object that can be stored in the Force.com platform database. Apex allows the use of generic object abstract type to represent any object.

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

In SFDC, object is generic and Account, Opportunity, CustomObject__c are its concrete type.

146.    What Is An Apex Transaction?

 

An Apex transaction represents a set of operations that are executed as a single unit. The operations here include the DML operations which are responsible for querying records. All the DML operations in a transaction either complete successfully, or if an error occurs even in saving a single record, then the entire transaction is rolled back.

 

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

 

Global class is accessible across the Salesforce instance irrespective of namespaces.

Whereas, public classes are accessible only in the corresponding namespaces.

148.    What Are Getter Methods And Setter Methods?

 

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

Whereas, the set (setter) method is used to set the value back to controller variable.

149.     What Is Lightning ?

Lightning is the collection of tools and technologies behind a significant upgrade to the Salesforce platform.

Lightning includes

Experience A set of modern user interfaces optimized for speed. This includes the Lightning Experience, Salesforce1 Mobile app and template-based communities.

Lightning Component Framework A JavaScript framework and set of standard components that allow you to build reusable components to customize the Lightning Experience, Salesforce1 Mobile app and template-based communities and build your own standalone apps.

Visual Building Tools Drag-and-drop technologies for fast and easy app building & customization’s. Use the Lightning App Builder to customize the Lightning Experience and Salesforce1 Mobile app. Use the Community Builder to customize template-based communities.

Lightning Exchange A section of the AppExchange where you can find 70+ partner components to jump-start your development.

Lightning Design System Style guides and modern enterprise UX best practices to build pixel perfect apps that match the look and feel of the Lightning Experience and Salesforce1 Mobile app.

150.    How Can We Use Lightning Components With The Salesforce1 Mobile App ?

By Create a custom Lightning tab that points to our component and include that tab in our Salesforce1 Mobile navigation.

151.    Can We Make A Lightning Component That Shows Up In Both The Mobile And The Desktop User Interfaces ?

 We can use Lightning Components directly in Lightning Experience, the Salesforce1 Mobile app, template-based communities, and custom standalone apps. Additionally, we can include Lightning components in a Visualforce page, that allowing us to use them in Salesforce Classic, Console, and Visualforce-based communities.

152.    Is Lightning An Mvc Framework ?

 No, it’s a component-based framework.

153.     Which Parts Of Lightning Components Are Server-side And Which Are Client-side ?

 Lightning Components are use JavaScript on the client side and Apex on the server side.

154.    Can We Make One Component Inherit Styles/css From A Parent Component, Or Must We Always Define It In The Component ?

 Yes, we can inherit styles from parent. there is no need to always defined in the component.

155.    What Is The Use Of The Auramethod Tag In Lightning ?

 we can Use < auramethod > to define a method as part of a component’s API. This enables us to directly call a method in a component’s client-side controller instead of firing and handling a component event. Using simplifies the code needed for a parent component to call a method on a child component that it contains.

156.    Can We Include One Component To Another ?

 Yes, we can Include one lightning component to another lightning component

157.    Is There Any Limit On How Many Component To Have In One Application ?

there is no limit.

158.    Is Lightning Components Replacing Visualforce ?

 

 No.