Deloitte Interview Questions
Deloitte Interview Questions
b) Second way is to create a permission set having those extra permission. You need to assign this permission
set to particular user by navigating to User detail page. In this way, you dont have to worry about other users,
as only specific user is getting those extra permissions.
8. If profile has read access and we create permission set with read/write access then what will happen?
Ans- Then profile will have both read and write access.
9. If profile has read/write and permission set has read access then what will happen?
Ans- Then profile will have both read and write access. We cannot decrease permission on profile but we can
increase permissions using permission set.
10. If account has related list Address and there is checkbox name primary, then record
insert in Address then each account has only one address with checkbox true if records
exist already in address with checkbox true then make them false.
12. W hy we use future method and provide scenario where you have used future method?
Ans- Follow this link-- http://www.salesforceadda.com/2017/08/future-method-and-prevent-
mixed-dml.html
19. If we have list of integer type and there is 20 items and want to display list in table on
page and I want to display 5 data then 5 and then 4 so on, how you will display?
20. If we have 10 data and inserting 10 data and 3 insert successfully and failed at 4 then
what will happen when using Database.insert() .
Ans- It will insert success records and not insert error records.
[Select Id, Name from Lead GROUP BY name] then it will through error like Field must be
grouped or aggregated: Id
[Select id, count(name) from Lead GROUP BY name ]-- then it will also through error , you
cannot use same field name used in count i.e-- select id, count(name) from Lead GROUP BY
name ^ ERROR at Row:1:Column:18 Grouped field should not be aggregated: Name
[SELECT LeadSource, count(Name) FROM Lead GROUP BY LeadSource]-- Now it will return
record With LeadSource and count total name field correspond to particular LeadSource.
Ans- List<List<SObject>>
Ans - AggregateResult[]
27. What is soft delete and hard delete?
Ans- Using Hard Delete your data will not be stored in the recycle bin. It will be permanently
deleted.
But using Soft Delete you can restore those datas lated within 15days from recycle bin.
But “without sharing” will not enforce only sharing rules of current user . does it mean it will
enforce current user object and field level permissions.
3. We have table with two rows with two columns, and data in table as-
4. How to write rollup summary for lookup and how to update roll up summary using
lookup.
11. What is OWD? If for any object OWD is private so what will happen?
Ans:- In Salesforce.com, for Activity objects (Task & Event), there are only 2 option in the Organization-Wide
Defaults sharing setting:
- Controlled by Parent
- Private
Private
Only activity owner (label as Assigned To), and users above the activity owner in the role hierarchy can edit
and delete the activity.
Users with read access to the record to which the activity is associated (Name and Related To) can view and
report on the activity.
Controlled by Parent
A user can perform an action (such as view, edit, transfer, and delete) on an activity based on whether he or
she can perform that same action on the records associated with the activity.
Example, if a task is associated with the Acme account and John Smith contact, then a user can only edit that
task if he or she can also edit the Acme account and the John Smith record.
15. What is future method? What are the restriction of the future method? Can we call
future method from batch class?
17. Assume there is user lookup in Account, if any user create account record then that
user Id should populate in lookup, how will you do this task?
Ans-
There are two types of triggers:
Before triggers are used to update or validate record values before they’re saved to the
database.
After triggers are used to access field values that are set by the system (such as a
record's Id or LastModifiedDate field).
Trigger Events:
Before Insert, Before Update, Before Delete, After Insert, After Update, After Delete
and after undelete
22. What is workflow and time dependent workflow? Write will send mail after 15 mins?
23. Create visual force page1 with 3 rows data like Here no data from database, just
you create your own field
Column: Name Checkbox
Row 1: Arun True
Row 2: B False
Row 3: C True
Now we have showData button, then on click on button data which has checkbox
True should display on another visual force page.