Sunteți pe pagina 1din 8

Apex class

62. List the ways to call the Apex class?


 Visual force page
 Web Service
 Triggers
 Email services
7. What is the architecture of the salesforce
MVC Architecutre - Model, View , Controller
View - It is the user interface (Apps, Tabs, Page Layouts, Fields and Record Types)
Controller - Business Logic (Save, Edit, New, Cancel and Delete - upon click on these button salesforce execute
some logic from controller)
Model - It is the Database, which stores Schema (Meta-Data(Data about Data) --> Apps, Tabs, sObjects, fields,
Apex Classes, Visualforce pages, etc...) and Instance (Records)

1. Nghe đến MVC chưa? Trong salesforce có theo MVC không?

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)

3. What are Governor Limits? Can you name 3 examples?


Salesforce runs on a multitenant environment which means resources (Storage, CPU, Memory) are shared
with other companies on the Salesforce platform. This means limits must be in place to ensure that all
companies using the Salesforce architecture abide by certain rules and don’t let their code or processes
monopolize shared resources. A few examples of Governor Limits are:

Total number of records retrieved by a SOQL query – 50,000


Total number of SOQL queries issued – 100 (Synchronous) 200 (Asynchronous)
Total number of DML statements issued – 150
Total number of callouts (HTTP requests or Web services calls) in a transaction – 100
Maximum CPU time on the Salesforce servers – 10,000ms (Synchronous) 60,000ms (Asynchronous)
4. Can you give an example of a Salesforce API and it’s usage?
Salesforce has a variety of API’s that let you interact with the system in different ways..
REST – The REST API lets you integrate with Force.com applications using simple HTTP methods in
either XML or JSON formats, making this an idea API for developing mobile applications or external
clients.
Bulk – The Bulk API provides a programmatic access that lets you quickly load data into your Salesforce
organisation.
Streaming – The Streaming API can be used to receive notifications for changes to Salesforce data that
match a SOQL query you define. Streaming API is useful when you want notifications to be pushed from
the server to the client based on criteria that you define.
5. What are External ID fields used for?
Certain fields can be defined as an external ID on an object. These can be used in order to match up data
from external systems with a unique reference ID. For example, if you need to match up data from an
external accounting system to the Accounts in Salesforce, you can use an external ID field to reference
the Accounting systems unique ID instead of the Salesforce ID.
6. 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.
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

◆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

What is the trigger?


Trigger is the code that is executed before or after the record is updated or inserted.
What is the Apex Trigger in Salesforce?
Trigger is a Apex Code that executes before or after.
The following types of DML Operation:

1. Insert
2. Update
3. Delete
4. Merge
5. Upsert
6. Undelete

Q14) What are The Types of Apex Triggers in Salesforce?


Triggers Are divided into 2 types

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.

Workflows and Approvals

(45). What is Workflow?


Salesforce Workflow gives you the ability to automatically:
– Create and send email alerts
– Create and assign tasks
– Update field values to either specific values, or based on formulas
– Create and send outbound API messages
– Create and execute time-dependent actions

(46). What are Workflow Components available?


Workflow consists of the following components:
– Workflow Rules – trigger criteria for performing various workflow actions
– Workflow Tasks – action that assigns a task to a targeted user
– Workflow Email Alerts – action that sends an email to targeted recipients
– Workflow Field Updates – action that updates the value of a field automatically
– Workflow Outbound Messages – action that sends a secure configurable API message (in XML
format) to a designated listener (not covered in this class)

■Workflow rule and process builders


What are the two declarative automation option you are familiar with. Also, do specify when the
need arises to use Apex over them?
The two declarative automation options I know about are workflow rule and process builders. Both these
options may sometime possess limitations in feature display. For overcoming those limitations, Apex can
be used. The best example which involves the use of Apexis pulling the desired information from the
external system. Additionally, Apex has a leading edge when it comes to handling a broad set of data.
Khi release process builders có thể từ sandbox -> sandbox, hoặc s-production thì tự chạy được
không?
-> Cần phải start lại.
Release nhiều lần thì có tạo process builders mới hay đè lên cái cũ.?
-> Tạo cái mới tăng thứ tự lên.

(56). What is Approval Processing?


An approval process is an automated Business Process that your organization can use to approve records
in Salesforce
An approval process specifies the:
– Steps necessary for a record to be approved
– Who must approve it at each step
– The actions to take when a record is approved, rejected, or first submitted for approval
Mô tả qua một quy trình approve?
1. Request approve -> Gửi mail tới người cần
2. Access link thực hiện approve.

(56). Apex Scheduler


Có bài toán thứ 2 hàng tuần cần check database thỏa mãn một số điều kiện là sản phẩm khuyến mại trong tuần để
gửi list sản phẩm đó cho khách hàng chẳng hạn thì ở bước thiết kế, em có những solution như thế nào?

Users, Profiles and Permission Sets

1. Is it possible to delete the user in salesforce?


No, once we create an user in salesforce we cannot delete the user record. We can only deactivate the user
record.
You can delete delete the Users Data using Mass Delete Record
Setup-> Administration Setup-> Data Management-> Mass Delete Record, from there select the objects
like Account, Contact, Cases, Opportunity, Product etc and in criteria select the users name and delete all
records of that user related data in the curresponding object.

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.

7. How many users are there in your project salesforce instance?


1000 (It will depends upon the number of licenses taken by the client, it will be like upto 4000 like that
based on the client)
58. List the number of ways with which we can made field is required?
The two ways are Validation rules and Page Layout level

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.

What is permission set?


Permission sets extend user’s functional access without changing user’s profile.
Ex: A user has only read access through profile on custom 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.

■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.

(93). What is Master Detail relationship and look up


relationship in Salesforce?
Master Detail relationship is the Parent child relationship. In which Master represents Parent and detail
represents Child. If Parent is deleted then Child also gets deleted. Rollup summary fields can only be
created on Master records which will calculate the SUM, AVG, MIN of the Child re cords.
Look up relationship is something like “has-a” (Containership) relationship. Where one record has
reference to other records. When one record is deleted then there is no impact on other records

45. What do you mean by "lookup Relationship"?


This kind of relationship links two objects together,
 Up to 25 allowed fir object
 Parent is definitely not a required field.
 No effect on a security and access.
 No effect on deletion
 Can be different layers profound.
 Lookup field isn't required.
46. Explain the term Master Detail Relationship?
It is the Parent child relationship. In which Master speaks to Parent and detail speaks to Child. In the event
that Parent is erased then Child likewise gets erased. Rollup outline fields must be made on Master records
which will figure the SUM, AVG, and MIN of the Child records.
 Up to 2 permitted to object.
 Parent field on child is required.
 Access to parent decides access to children.
 Deleting parent automatically deletes child.
 A child of one master detail relationship can't be the parent of another. Lookup field on page layout is
required.

9. What is Record Type?


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.

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.

21. What is search layout?


Whenever we click on a tab or we click on a lookup icon or search for a record we see only one standard
field by default, to enable remaining fields -

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.

Q87) How many ways we can made field is required?


While creation of field
Validation rules
Page Layout level

Import Wizard and Data Loader


2. What is Data Loader?
Data Loader is a stand-alone tool to process bulk records. With Dataloader we can process maximum of
5 million records. Most of the time we use only Dataloader. Default batch size of the Dataloader is 200.

3. Which operations we can perform on dataloader?


Insert (Inserting brand new records, no need of ID)
Update (Updating the existing records based on the record ID)
Upsert (To Upsert we should have one external ID field on the object, based on the external id field if
the value already exists it will update, if doesn't exist then it will insert)
Delete (Delete the records based on the id provided, to delete we need only id, deleted records can be
found in recycle bin)
Hard delete (Delete the records based on the id provided, to delete we need only id, deleted records
can't be found in recycle bin, Note: If we enable bulk API in data loader settings then only we can
perform Hard delete.)
Export (From any object we can export records based on the SOQL query, Note: We can't export deleted
records which are there in the recycle bin)
Export all (From any object we can export records based on the SOQL query, Note: Using Export all we
can export deleted records which are there in the recycle bin also)
4. Data loader or Import wizard supports which file format?
.CSV (Comma Separated Values)

■Release (Sandbox- Sandbox, Sandbox – Production)


9. Đã release product bao giờ chưa? What are your views on customizing Apex and Visualforce
directly to a production org?
As far as I know, there is no direct Apex to production Org conversion possible. It is mediated by a
change which later must be deployed through the Sandbox and finally reach the test coverage. On the
other hand, Visualforce has a direct conversion process to production Org; however, it is not put into
actual practice.
7. What is Apex test coverage? What’s the minimum test coverage required to deploy?
To ensure that your code meets certain standards, Apex Code coverage shows you how many executable
lines of code in your classes and triggers have been exercised by test methods. Code coverage percentage
is a calculation of the number of covered lines divided by the sum of the number of covered lines and
uncovered lines. The minimum test coverage required to deploy to production is 75%

8. What is Developer sandbox?


It copy only configuration changes from the production
It won’t copy real time data
We can test the configuration changes with sample data
Sample data limit is 200mb
Refresh time interval is one day
If we refresh all the sandbox contents will be replaced with production contents

9. What is developer pro sandbox?


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

10. What is partial data sandbox?


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

11. What is Full copy sandbox?


It is exact replica of the production
Copy both configuration and entire real time data from the production
Refresh time interval 29 days
8. Đã release salesforce bao giờ chưa? Khi release cần làm gì

S-ar putea să vă placă și