Professional Documents
Culture Documents
Interview Salesforce Question
Interview Salesforce Question
2. Can you customise apex trigger/ apex class & Visualforce directly in a production org?
Apex cannot be customised in a production Org, it must be changed and deployed through a sandbox and
meet test coverage. Visualforce, on the other hand, may be customised directly in production (Although
this is not best practice)
◆Trigger
Khi thực hiện update, insert new record mới, cần validate một số rule nếu thỏa
mãn mới cho insert, update thì solution của em là gì?
- Validate trên UI bằng required
- Validate trên Before triggers
1. Insert
2. Update
3. Delete
4. Merge
5. Upsert
6. Undelete
1. Before Triggers
2. After Triggers
1. Before Triggers:
Before Triggers can be used to update or validate values of a record before they are saved to the
database.
2. After Triggers:
After Triggers Before Triggers can be used to access field values of the records that are the
stored in the database and use this values to make changes in other records.
9. What is Trigger.new?
Triger.new is a command which returns the list of records that have been added recently to the sObjects.
To be more precise, those records will be returned which are yet to be saved to the database. Note that this
sObject 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 sObject records. Note
that this sObject list is only available in update and delete triggers.
4. What is Profile?
Profile deals with CRED (Create, Read, Edit and Delete) permissions over Apps, Tabs, sObjects, Fields,
Record Types, etc...
We can map only one profile for one user and without mapping the profile we cannot create the user.
Q94) Có tạo profile không? Khi tạo thì thường setting cho những cái gì?
Q94) Một bài toán: Setting ở profile user chỉ có quyền đọc(read) nhưng muốn thêm quyền edit,
create cho riêng user đấy mà ko cần thay đổi quyền profile thì cần làm thế nào?
Administrator creates the permission set having edit and creates operation on custom object and assign to
that user.
■Object
1.Salesforce có mấy loại object.
There are three kinds of Salesforce objects.
• Standard Objects − The objects already created for you by the Salesforce platform.
Có add dc các mới vào trong object này không?
• Custom Objects − These are the objects created by you based on your business processes.
• External Objects − The objects which you create map to the data stored outside your
organization.
2.We would next like to hear your views about the object relationships available in Salesforce.
When you talk about the object relationships under the Salesforce they are of three types- a lookup
relationship, a master-detail relationship and finally a many-to-many relationship. Lookup relationships
are meant for interlinking two objects together. You can say, this is the most important relationship and
resembles the child-parent relationship between two different objects. Next to go is the master-detail
relationship. The master-detail relationship creates a relatively more tight connection between the parent
and child. Here, the child inherits the parent's security. However, you need to be cautious in this case.
Whatever element you delete from the parent record, will automatically be removed from the child's
record as well. Finally, comes the many-to-many relationship. This relationship is required when a child
object has two master-detail relationships with two different parent objects.
18. What is Inline editing? Có thể edit trực tiếp trên từng field ở detail page khi ko click vào button
edit?
On the detail page without clicking on edit button we can edit particular field if it is not read-only.
To show multiple fields for the records which display under a tab, on object detail page > under Search
layouts edit tab and add required fields.
To show multiple fields for the records which display when we click on lookup of a field, on object detail
page > under Search layouts edit Lookup Dialogs and add required fields.
To show multiple fields for the records which display when we search for the records, on object detail
page > under Search layouts edit Search Results and add required fields.