Skip to main content

Salesforce Interview Questions

Salesforce Interview Question


1. how you can install package from personal org to company sandbox deployment process

3. why do we prefer custom object over custom settings

4. can I call a future method from batch class

5. write a test class for batch class

6. pass data from vf page to controller

7. Actionparams in the action function

8. oops concept in salesforce

9. polymorphism in apex

10. overloading a constructor

11. method overriding

12. assert statement in the test class

13. how can we maintain the chain of batch classes

14. want to change the value of field(max 100 allowed using validation rule) from 50 to 200 using workflow, will it change, 2. want to update to 200 using before insert, then will it change

15. how many batch classes we can run at the same time

16. how can I restrict access of RECORDS from higher hierarchy level

17. how can I stop the execution of trigger, workflow and validation rules while data uploader

18.  running time-dependent workflow at less than minimum time

19. different criteria of workflow

20. workflow actions

21. pagination implementation, standard set controller

22. changeset

23. validation rule to skip picklist values

24. inline VF pages display the same object data

25. difference between Enterprise WSDL and partner WSDL

26. permission set and profile

27. can we write DML and SOQL in the constructor

28. profile is same, no record type change, how can I control the visibility of fields

29. role hierarchy custom top-level visibility

30. execution order

31. workflow trigger

32. vf pages

33. ways u can call the controller method

34. email service

35. show account and contacts on vf page, optimization

36. search account from vf page.. input.. ways u can achieve

37. undelete

38. does after trigger work on delete

39. hierarchy level custom setting

40. how to take the backup of your org or metadata

41. how can I deploy my components

42. challenges you have faced in your project

43. how to fetch data of custom settings

44. custom label

45. how can I show the picklist value as the US if user login from US, picklist value cannot be changed

46. what is an extension, how to create an extension

47. how to override the functionality of standard buttons

48. email to case

49. test class consideration

50. how to display the count of total execution of executing method in batch class

51. diff between database.update and update

52. what parameters does start method of batch class takes

53. assign apex class in vf email template

54. bucket list in report

55. view state of visual force page

56. visualforce sites

57. difference between sales and service cloud

58. difference between process builder and workflow

59. how can i use ajax in visualforce (with or without vf tags)

60.  why do we use one test class per controller

61. dynamic apex

62. apex class syntax

62.1. Enforce Field-Level Security Permissions for SOQL Queries (Beta)

63. display records on page load

64. display account, opportunity and contacts on single vf page

65. calling callouts in trigger

66. can we use dml statement in constructor

67. sendredirect method and pagereference

68. commandbutton's action rerender child panel and oncomplete event rerender parent panel, how many time rerendring happen

69. event in undelete ( before or after)

70. map<sObject,string>

71. can i skip any method of batch class

72. can i deploy so many validation rules at once in production

73. roll up summary average

74. workflow1- a->b.... wf2- b->a.... chain

75. can i restore deleted items, deleted from recycle bin, hard delete

76. object level security controlled by

77. formula field in before trigger

78. salesforce security model

79. transient and static keyword

80. account object owd

81. can we call a batch class from future method

82. diff bw inputfield and inputtext

83. diff bw actionfunction and remoteaction

84. apex:detail

85. if two extension have same method than which will run

86. what parameters does future method accept

87. why future method does not accept sobjects

88. freeze and activate button on user profile, can we delete a user in salesforce

89. diff bw rest and soap

90. return type start method batch class

91. iterator in batch class

92. visualforce components

93. two parameter that are used for integration

94. deploy custom settings

95. diff betweem soql and sosl

96. can we update child record field from parent object in worlflow- no

97.  what is viewstate and how to reduce size of viewstate

98. savepoint and rollback

99. iterate through map or set in Visualforce

100. options available in owd

101. what is scontrol

102. mergefields in Visualforce

103. Salesforce architecture

104. flex queue, apex jobs difference

105. rollup summary for lookup

106. who gets the ownership in two master detail field

107. with sharing and without sharing

108. external id use in Salesforce

109. apex governor limits

110. restriction of permission sets

111. validation error in apex class

112. can test method be private

113. why data loader uses csv format

114. difference between actionfunction and JavaScript remoting

115. hide custom settings from user

116. can we make batch classes synchronous

117. visualforce page, apex class, test method, future method, apex trigger, batch apex consideration/best practices

118. can we pick user name from visualforce page in approval process

119. what should we use, remoteaction or actionfunction, which is best

120. can static variable be transient

121. how to use assert statement for batch apex test method

122. standard junction object in salescloud

123. find count of active contacts for each account in given set

124. default page load time to throw timeout exception

125. pagination in Salesforce standardrecordset or offset

126. actionstatus and actionsupport difference

127. what happens if batch is terminated in between

128. can we have multiple active approval request on the  same object

129. how to redirect to different vf page when clicked on edit page based on user profile

Trigger.newmap in before insert

If scheduled job user leaves company, how you can reschedule it

How to avoid Bulk API upload’s row lock error for same parent records. Or how process them serially

How

Can a trigger call a batch class? - Yes

new

newMap

old

oldMap

Before Insert

Yes(without id)

After Insert

Yes (record can be modified)

Yes

Before Update

Yes

Yes

Yes

Yes

After Update

Yes (record can be modified)

Yes

Yes

Yes

Before Delete

Yes

Yes

After Delete

Yes

Yes

After Undelete

Yes (record can be modified)

Yes

==============new=============

what is cross site scripting

why do we need my domain enabled for lightning

limitations of lightning out

different lightning interfaces

difference between application event and component event

use case of both events

why do we prefer component event over application event

different use case of helper and controller

why do we prefer lightning namespace component over SLDS

default namespace in lightning, how to create your namespace

request and response mechanism in lightning framework

can we write data from lightning app

does lightning app supports component event, why does it not support many standard events

-----------------------------------------------------------------------------------------------------------------------------
Reference from more websites:

Explain the various Standard Profiles in Salesforce?
Answer:

  • System Administrator – Customization and administration of the application.
  • Standard User – Can edit, view, update or delete one’s own record.
  • Read Only – Able to just view the records.
  • Solution Manager – Comes with standard user permission but also can manage categories and published solutions.
  • Marketing User – Is able to import leads into the organization along with standard user permissions.

What is Object Relationship Overview?
Answer: In Salesforce, the object relationship overview links custom object records to standard object records in a related list. This is helpful to track product defects in related customer cases. Salesforce allows users to define different types of relationships by creating custom relationship fields on an object.

What does it indicate if an error state this “list has no rows for assignment”?
Answer: The error that tells “list has no rows for assignment” indicates that the list you are trying to access has no values in it.

What is a Visualforce Page?
Answer: Visualforce is the new markup language from salesforce, by using which, We can render the standard styles of the salesforce. We can still use HTML here in Visualforce. Each visualforce tag always begins with “apex” namespace. All the design part can be accomplished by using Visualforce Markup Language and the business logic can be written in custom controllers associated with the Page.

What is a Wrapper Class?
Answer: A Wrapper Class is a class whose instances are a collection of other objects and is used to display different objects on a Visual force page in the same table. 

What is Production?
Answer: We should not make coding changes in production since end-users are using the application from the production environment.

What is the difference between SOQL and SOSL?
Answer: SOQL is Salesforce Object Query Language and SOSL is Salesforce Object Search Language. If you are sensing that Salesforce is a culture unto itself, you are correct!

What is sandbox?
Answer: To make any changes for the exiting application we should copy all contents of the product into the sandbox and make all changes after that test thoroughly and move those changes into production.

To create the sandbox, in production we can find one link called sandboxes. By clicking on that link we can create the sandbox by choosing the type of the sandbox.

What is the sharing rule?
Answer: The sharing rules are applied when a user wishes to allow access to other users.

These 23 most common questions and answers will help you prepare effectively and perform well in Salesforce interviews. Study them thoroughly to make a good impression on your prospective employers. Learn  From Real-Time Experts.

What are the types of Sandboxes?
Answer:

  • Developer Sandbox
  • Developer pro sandbox
  • Partial data sandbox
  • Full copy sandbox

Explain the Salesforce dashboard?
Answer: In Salesforce, the dashboard is a pictorial representation of the report.

20 reports can be added to a single dashboard.

What is Developer sandbox?
Answer:

  • It copies only configuration changes from the production
  • It won’t copy real-time data
  • We can test the configuration changes with sample data
  • The refresh time interval is one day
  • If we refresh all the sandbox contents will be replaced with production
  • Contents

What is an Audit Trail?
Answer: The Audit Trail function in Salesforce is useful for gaining information or for tracking all the recent setup changes that the administration has done in the organization. The audit trail can preserve data for up to six months.

What is developer pro sandbox?
Answer:

    • Copy configuration changes
    • No real-time data
    • Sample data limit is 1GB
    • Refresh time interval one day

What is the junction object and what purpose does it serve?
Answer: Junction objects are used to build many-to-many relationships between objects. For example, the user can take a recruiting application where a position for a job can be linked to many candidates or can take a candidate and link the candidate to many other jobs. In order to connect the data model, a third party object is referred to as a junction object. In the given example, the junction object is “job application.” 

What is partial data sandbox?
Answer:

      • Copy configuration changes
      • Copy a certain amount of real-time data
      • Real-time data limit is 5GB
      • For each table, it can copy a maximum of 10k records
      • Refresh interval of 5 days

Is it possible to schedule a dynamic dashboard in Salesforce?
Answer: It is not possible to schedule a dynamic dashboard in Salesforce.

What is Full copy sandbox?
Answer:

      • It is exact replica of the production
      • Copy both configuration and entire real-time data from the production
      • Refresh time interval 29 days Salesforce Online Training

What are the different types of reports available in Salesforce?
Answer:

      • The different types of reports in Salesforce are:
      • Tabular report that displays the grand total in table form.
      • Matrix report where grouping is based upon both rows and columns.
      • Summary reports that are detailed reports in which the grouping is based on columns.
      • Joined report which allows two or more reports to be joined in a single report.

What is Track Field History?
Answer:

      • While creating the object, we can enable ‘Track Field History’.
      • If, we enable ‘Track Field History’ user can see ‘Set History Tracking’ button under ‘Custom Fields & Relationships’ section which is available on the object detail page.
      • By clicking on ‘Set History Tracking’ button, we can enable tracking for the fields whichever we want.
      • To see the object history, go to object’s record layout and add Object Name History related list to the layout.
      • Whenever the user changes field value from one value to another value, it will show the history of the field in ‘Object History’ related list.

What are the three types of object relations in Salesforce?
Answer:

The three types of object relations in Salesforce are:

      • One-to-many
      • Many-to-many
      • Master-detail

The relation types are quite logical once the user becomes familiar with the software program.

What are the Activities in Salesforce?
Answer: To create the Activities while creating the object, we should check for ‘Allow Activities’ checkbox then the user can add open Activities and Activity History related lists on the Object layout.

There are two types of activities
Task: Task is nothing but work assigned to a particular person, it doesn’t have a certain time limit.

Event: It has a certain time limit in that time only all persons should assemble after the time limit over, the event will get complete.

Once the event or task status changed to ‘Completed’ this we can see those records under Activity History Related List.

What is a static resource in Salesforce?
Answer: With Salesforce’s static resource, subscribers 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 in Salesforce is 250 MB.

How to rename the tab?
Answer: Tab name will be decided based on the Plural Label of the custom object, to rename go to a corresponding object detail page and rename the plural label.

What is the difference between Trigger and Workflow?
Answer: Workflow is an automated process that fire an action based on evaluation criteria and rule criteria. As described above, Trigger is the code that is executed on or after the record is updated or inserted.

How to display multiple columns after clicking on the tab?
Answer:

      • ISNULL (): It works only for number data type fields, if we don’t populate with value for number fields it will return true.
      • ISNULL (): It won’t support TEXT data type fields because text fields never become null.
      • ISBLANK (): It supports both numbers as well as text data types.

What is the trigger?
Answer: A trigger is a lever which, when pulled by the finger, releases the hammer on a firearm. In a database, a trigger is a set of Structured Query Language statements that automatically “fires off” action when a specific operation, such as changing data in a table, occurs. A trigger consists of an event and an action. Triggers are used to preserve data integrity by checking on or changing data in a consistent manner.

What is a dependent picklist?
Answer: In some scenario’s, we should be able to control one of the fields from another field. Example, if we select Country Controlling field as the US then City should display only US cities.

      • We can use checkbox data type fields also while creating dependent picklist.
      • We can use multi-select data type fields also while creating dependent picklist.

How does Salesforce track sales?
Answer: Salesforce is a tracking program that records a number of helpful basic details, such as:

      • Number of customers served daily
      • Daily sales volume
      • Detailed reports from Sales Manager
      • Sales figures by month or quarter
      • Most importantly, Salesforce tracks and reports repeat customer activity, which is the key to any sales organization.

What is the architecture of the Salesforce?
Answer:

      • MVC Architecture – Model, View, Controller
      • View – It is the user interface
      • Controller – Business Logic
      • Model – It is the Database, which stores Schema

What can cause data loss in Salesforce?
Answer: Data loss in Salesforce can be caused by a number of reasons, including:

      • Changing data and date-time
      • Migrating to percent, number, and currency from other data types
      • Changing from the multi-select picklist, checkbox, the auto number to other types
      • Altering to multi-select picklist from any type except picklist
      • Changing to auto-number except for the text
      • Changing from text-area to e-mail, phone, URL, and text.

What is the difference between 15 digit and 18 digit id in Salesforce?
Answer:

      • In Salesforce, whenever a user creates any component or record then sales force will generate a unique id with which user can identify the record or component.
      • After creating the record, in the URL user can see the id of the record which is of 15 digits length.
      • Through user interface user always see 15 digit ids which are Cases-Sensitive.
      • If the user queries the existing records from the database through API, it will always return 18 digit ids which are Case-Insensitive.
      • Last 3 digits of the 18 digit represent checksum of the capitalization of 15 digit id.
      • Based on the first 3 digits user can identify the object of the record.
      • All the record belongs to the same object will contain the same first 3 digits.

What is Self-Relationship?
Answer: A Self-Relationship is a lookup relationship to the same object. It is this premise that allows users to take the object “Merchandise” and create relationships with another object.

What is Record Type?
Answer:

      • For an object based on the Record Type, we can show different fields and different picklist values by assigning different page layouts for the record types and profiles.
      • After creating the record type, on the record type detail page user can see all the picklist data type fields, user can edit the picklist and decide which values should display for this particular record type.

What are the different data types that a standard field record name can have?
Answer: A standard field record name can have a 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}

What is the difference between detail page and edit page?
Answer:

      • Whenever a user tries to create a new record or edit an existing record user can input the values for the fields, this page is nothing but edit page.
      • After creating a new record or editing an existing record, the user can see the information of the record; this page is nothing but detail page.

What are who Id and What Id in activities?
Answer:
Who ID refers to people. Typically: contacts or leads. Example: Lead ID, Contact ID

What ID refers to objects. Example: Account ID, Opportunity ID

What are the types of tabs?
Answer:

      • Custom tabs: Its create for objects
      • Web tabs: Its create to display a website
      • Visual force tabs: It creates to display the visual force page

What is the use of writing sharing rules? Can you use sharing rules to restrict data access?
Answer:
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 question is concerned, the answer is no. We cannot use sharing rules to restrict data access. It is only used for allowing greater access to records

What is the validation rule

Answer: While creating or modifying the record based on the certain conditions we can display error messages on top of the page or below to the field.

There are two fields if the user populates two field values if we combine those values uniqueness should be maintained, how to achieve this without coding?
Answer: Create a unique text field and update the field from workflow rule after the update again all the system validations will be performed so the error will be displayed.

What is a bucket field in reports?
Answer: 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.

What are Governor Limits?
Answer:
Since we are working in a multitenant environment Sales force is enforcing the limits for all the functionalities.

      • How many no of fields for an object: 500
      • No of master-detail relationships for an object: 2
      • No of lookup relationship for an object: 25
      • No of rollup summary fields: 25
      • How many external ids we can enable for an object: 7

Can you have a roll-up summary field in case of Master-Detail relationship?
Answer:
Yes, you can have a roll-up summary in case of a master-detail relationship. But not in case of a lookup relationship.


Comments