Apex Basics & Database Flashcards

1
Q

As a language, Apex is (9 things):

A
  • Hosted—Apex is saved, compiled, and executed on the server—the Lightning Platform.
    • Object oriented—Apex supports classes, interfaces, and inheritance.
    • Strongly typed—Apex validates references to objects at compile time.
    • Multitenant aware—Because Apex runs in a multitenant platform, it guards closely against runaway code by enforcing limits, which prevent code from monopolizing shared resources.
    • Integrated with the database—It is straightforward to access and manipulate records. Apex provides direct access to records and their fields, and provides statements and query languages to manipulate those records.
    • Data focused—Apex provides transactional access to the database, allowing you to roll back operations.
    • Easy to use—Apex is based on familiar Java idioms.
    • Easy to test—Apex provides built-in support for unit test creation, execution, and code coverage. Salesforce ensures that all custom Apex code works as expected by executing all unit tests prior to any platform upgrades.
    • Versioned—Custom Apex code can be saved against different versions of the API.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Apex is like other object-oriented programming languages because it supports these language constructs:

A
  • Classes, interfaces, properties, and collections (including arrays).
    • Object and array notation.
    • Expressions, variables, and constants.
    • Conditional statements (if-then-else) and control flow statements (for loops and while loops).
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Apex is NOT like other object-oriented programming languages in that it supports:

A
  • Cloud development as Apex is stored, compiled, and executed in the cloud.
    • Triggers, which are similar to triggers in database systems.
    • Database statements that allow you to make direct database calls and query languages to query and search data.
    • Transactions and rollbacks.
    • The global access modifier, which is more permissive than the public modifier and allows access across namespaces and applications.
    • Versioning of custom code.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Is Apex case-sensitive or case-sensitive?

A

case-INsensitive

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Apex is one data type specific to Salesforce. What is it?

A

sObject

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What data types are supported by Apex?

A
  • A primitive, such as an Integer, Double, Long, Date, Datetime, String, ID, Boolean, among others.
    • An sObject, either as a generic sObject or as a specific sObject, such as an Account, Contact, or MyCustomObject__c (you’ll learn more about sObjects in a later unit.)
    • A collection, including:
      • A list (or array) of primitives, sObjects, user defined objects, objects created from Apex classes, or collections
      • A set of primitives
      • A map from a primitive to a primitive, sObject, or collection
    • A typed list of values, also known as an enum
    • User-defined Apex classes
    • System-supplied Apex classes
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Why is creating a List easier than creating an Array?

A

Lists don’t require you to determine ahead of time how many elements you need to allocate.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Name a benefit of using Apex classes.

A

Code reuse. Class methods can be called by triggers and other classes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Why is Anonymous Apex a handy tool?

A

Allow you to run lines of code on the fly and is a handy way to invoke Apex, especially to test out functionality. Debug logs are generated as with any other Apex execution.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Before you can insert a Salesforce record, you must …

A

…create it in memory first as an sObject.

Ex: Account acct = new Account();

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How many ways can you add fields to an sObject, and what does the syntax look like?

A
1. through a constructor
Account acct = new Account(Name='Acme', Phone='(415)555-1212', NumberOfEmployees=100);
2. using dot notation 
Account acct = new Account();
acct.Name = 'Acme';
acct.Phone = '(415)555-1212';
acct.NumberOfEmployees = 100;
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Is dot notation available when working with a generic sObject?

A

No, because a generic sObject doesn’t know what it is, so there are no properties accessible.

But, you can cast the generic sObject as a specific sObject to access its properties, e.g.:
// Cast a generic sObject to an Account
Account acct = (Account)myGenericSObject;
// Now, you can use the dot notation to access fields on Account
String name = acct.Name;
String phone = acct.Phone;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Describe how creating generic sObjects is different from creating specific sObjects.

A

Generic sObjects can only be created through the newSObject() method. Also, the fields can only be accessed through the put() and get() methods.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

To retrieve a record, you have to use what?

A

SOQL - Salesforce Object Query Language

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

To insert an sObject as a record, you have to use what?

A

DML - Data Manipulation Language

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What does DML provide?

A

Straightforward way to manage records by providing simple statements to insert, update, merge, delete and restore (undelete) records.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

How is Apex DML different from other programming languages?

A

Other programming languages require additional setup to connect to data sources, but Apex DML allows quick access to perform operations on SF records because Apex is data focused.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What does the “merge” DML statement do?

A

Merges up to 3 records of the same sObject into one record, Deletes the others, and re-parents any related records.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

How would you retrieve the ID of a newly created record in Salesforce?

A

On insert, the ID is automatically returned to the sObject variable used for insert, so it’s immediately accessible.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

What is the max number of DML statements per Apex transaction?

A

150

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

If you don’t specify a field when doing an “upsert” statement, what field is used by default?

A

The sObject’s Id.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

What fields can be used during an “upsert” statement to identify records?

A

For custom objects, the Id field or any other field marked as an external ID.
For standard objects, the Id field and any field that has idLookup property set to True. For example, Email on both Contact and User objects has this property set.

upsert sObjectList Account.Fields.MyExternalId;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

What happens if multiple matching records are found during an “upsert” statement?

A

An error is generated and the object record is neither inserted or updated.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

How many days does a deleted record live in the Recycle Bin?

A

15 days

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

What is returned when a DML operation fails?

A

An exception of type DMLException.
You can catch exceptions in your code to handle error conditions.

try {
    // This causes an exception because
    //   the required Name field is not provided.
    Account acct = new Account();
    // Insert the account
    insert acct;
} catch (DmlException e) {
    System.debug('A DML exception has occurred: ' +
                e.getMessage());
}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

What are the available built-in Database class methods?

A
  • Database.insert()
  • Database.update()
  • Database.upsert()
  • Database.delete()
  • Database.undelete()
  • Database.merge()
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

How are the Database methods different from their DML counterparts?

A

Database methods have an optional allOrNone parameter that allows you to specify whether the operation should partially succeed.
Also, the Database class contains methods that aren’t provided as DML statements.
- Transaction control and rollback
- Emptying the Recycle Bin
- and methods related to SOQL queries

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

What happens if the allOrNone parameter is set to False in a Database method?

A

If errors occur on a partial set of records, the successful records will be committed and errors will be returned for the failed records. Also, no exceptions will be thrown with the partial success option.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
29
Q

What happens if the allOrNone parameter is set to True in a Database method?

A

An exception will be thrown if a failure is encountered and none of the records will be successfully saved.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
30
Q

What is the default value of the allOrNone parameter on Database methods?

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
31
Q

What is returned when using each of the Database methods?

A

For create and update, Database.SaveResult.
For upsert, Database.UpsertResult.
For delete, Database,DeleteResult.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
32
Q

What is the syntax for saving something to the Debug log?

A

System.debug(‘Text to enter into log’ + variable);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
33
Q

Why would you use DML over a Database method?

A

If you want any error that occurs during bulk DML processing to be thrown as an Apex exception that immediately interrupts control by using try…catch blocks. This behavior is similar to the way exceptions are handled in most database procedural languages.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
34
Q

Why would you use Database methods over DML?

A

If you want to allow partial success of a bulk DML operation. If you want to inspect the rejected records and possibly retry the operation. If you want to avoid thrown exceptions and instead take action on successes and failures differently and intentionally.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
35
Q

Can you insert records related to existing records?

A

Yes, if a relationship has already been defined between the two objects, such as lookup or master-detail lookup relationship.

Account acct = new Account(Name='SFDC Account');
insert acct;
// Once the account is inserted, the sObject will be
// populated with an ID.
// Get this ID.
ID acctID = acct.ID;
// Add a contact to this account.
Contact mario = new Contact(
    FirstName='Mario',
    LastName='Ruiz',
    Phone='415.555.1212',
    AccountId=acctID);
insert mario
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
36
Q

Can you delete a parent object and its children (cascading deletes) automatically in one DML statement operation?

A

Yes, as long as each child record can be deleted.

Account[] queriedAccounts = [SELECT Id FROM Account WHERE Name=’SFDC Account’];
delete queriedAccounts;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
37
Q

DML operations execute within a ____.

A

transaction

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
38
Q

What happens when a DML operation fails?

A

DML operations execute within a transaction, so if an error occurs during one operation, the entire transaction is rolled back and no data is committed to the database.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
39
Q

What are the boundaries of a transaction?

A

A trigger, a class method, an anonymous block of code, an Apex page, or a custom Web service method.

For example, if a trigger or class creates two accounts and updates one contact, and the contact update fails because of a validation rule failure, the entire transaction rolls back and none of the accounts are persisted in Salesforce.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
40
Q

When SOQL is embedded in Apex, it is referred to as ____.

A

inline SOQL

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
41
Q

Can you do a “SELECT *” in SOQL?

A

No, which is dumb.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
42
Q

Do you have to specify the Id field in a SOQL query?

A

No, if more fields are being retrieved. If Id is the only field you’re trying to retrieve, then Yes, you have to specify it.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
43
Q

What is the syntax for using a variable within a SOQL statement?

A

Field=:variable

e.g.
String targetDepartment = ‘Wingo’;
Contact[] techContacts = [SELECT FirstName,LastName
FROM Contact WHERE Department=:targetDepartment];

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
44
Q

How can you retrieve child records related to a parent record in a SOQL query?

A

Use an inner query for the child records. The FROM clause of the inner query runs against the relationship name, rather than a Salesforce object name.
e.g.
SELECT Name, (SELECT LastName FROM Contacts) FROM Account WHERE Name = ‘SFDC Computing’

e.g. accessing the related records in Apex:
Account[] acctsWithContacts = [SELECT Name, (SELECT FirstName,LastName FROM Contacts)
FROM Account
WHERE Name = ‘SFDC Computing’];
// Get child records
Contact[] cts = acctsWithContacts[0].Contacts;
System.debug(‘Name of first associated contact: ‘
+ cts[0].FirstName + ‘, ‘ + cts[0].LastName);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
45
Q

What happens when using SOQL in a “for” loop?

A

Records are retrieved using efficient chunking with calls to the query and queryMore methods of the SOAP API. By using SOQL for loops, you can avoid hitting the heap size limit. SOQL for loops iterate overall of the sObject records returned by a SOQL query.

e.g. The syntax is either:
for (variable : [soql_query]) {
code_block
}

OR

for (variable_list : [soql_query]) {
code_block
}

Both variable and variable_list must be of the same type as the sObjects that are returned by the soql_query.

It is preferable to use the sObject list format of the SOQL for loop as the loop executes once for each batch of 200 sObjects. Doing so enables you to work on batches of records and perform DML operations in batch, which helps avoid reaching governor limits.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
46
Q

What is an unordered collection of elements that does not contain duplicates and is therefore often used to store ID values since they are always unique?

A

Set

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
47
Q

What is an ordered collection of elements that work similar to a traditional array?

A

List

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
48
Q

What is a collection of key-value pairs?

A

Map

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
49
Q

Visualforce is…

A

…a framework for rendering HTML pages using an MVC platform.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
50
Q

How much test coverage must you have to deploy your code to a production org?

A

75%

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
51
Q

For ASP.NET applications, code is executed in the context of an application domain. In the Lightning Platform world, code executes within an…

A

…execution context.
Defined as the time when the code starts to execute to the time it finishes. The Apex code you write is not always the only code that is executing.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
52
Q

What are the 6 ways that Apex can be invoked?

A
  1. Database Trigger
  2. Anonymous Apex
  3. Asynchronous Apex
  4. Web Services
  5. Email Services
  6. Visualforce or Lightning Pages
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
53
Q

Describe how Database Triggers are invoked.

A

Invoked for a specific event on a custom or standard object.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
54
Q

Describe how Anonymous Apex is invoked.

A

Code snippets executed on the fly in Dev Console or other tools.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
55
Q

Describe how Asynchronous Apex is invoked.

A

Occurs when executing a future or queueable Apex, running a batch job, or scheduling Apex to run at a specified interval.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
56
Q

Describe how Web Services are invoked.

A

Code that is exposed via SOAP or REST web services.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
57
Q

Describe how Email Services are invoked.

A

Code that is setup to process inbound email.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
58
Q

Describe how Visualforce or Lightning Pages are invoked.

A

Visualforce controllers and Lightning components can execute Apex code automatically or when a user initiates an action, such as clicking a button. Lightning components can also be executed by Lightning processes and flows.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
59
Q

When do Triggers execute?

A

Before or after database actions:

  • before insert, update or delete
  • after insert, update, delete or undelete
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
60
Q

What are the two limits you will probably be most concerned with?

A

Number of SOQL queries and DML statements.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
61
Q

What should always be at the top of test classes?

A

@isTest

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
62
Q

What are three reasons to use Asynchronous programming?

A
  1. Processing a very large number of records
  2. Making callouts to external web services
  3. Creating a better and faster user experience
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
63
Q

How must future methods be declared?

A

As static void. They cannot return anything.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
64
Q

True or False: You cannot pass objects as arguments into future methods.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
65
Q

What are three drawbacks to using future methods?

A
  1. You can’t track execution because no Apex job ID is returned.
  2. Parameters must be primitive data types, arrays of primitive data types, or collections of primitive data types. Future methods can’t take objects as arguments.
  3. You can’t chain future methods and have one call another.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
66
Q

What are the different types of Asynchronous Apex?

A
  1. Future Methods
  2. Batch or Scheduled Apex
  3. Queueable Apex
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
67
Q

What are three drawbacks to using batch or scheduled apex/the batchable interface?

A
  1. Troubleshooting can be troublesome.
  2. Jobs are queued and subject to server availability, which can sometimes take longer than anticipated.
  3. Have we talked about limits yet?
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
68
Q

Queuable Apex provides what benefits to future methods?

A
  1. Non-primitive types. Classes can accept parameter variables of non-primitive data types, such as sObjects or custom Apex types.
  2. Monitoring - When you submit your job, a jobId is returned that you can use to identify the job and monitor its progress.
  3. Chaining jobs - You can chain one job to another job by starting a second job from a running job. Chaining jobs is useful for sequential processing.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
69
Q

What is the Apex Flex Queue?

A

Eliminated limitation of five concurrent batches in 2015 and allows developers to monitor and manage the order of queued jobs.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
70
Q

What are all of the debug logging levels?

A
NONE
ERROR
WARN
INFO
DEBUG
FINE
FINER
FINEST
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
71
Q

Debug logs cannot be larger than ____.

A

2 MB

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
72
Q

Each org can retain up to ____ in debug logs.

A

50 MB

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
73
Q

What are the ways you can add VisualForce to your org?

A
  1. Open a VF page from the App Launcher
  2. Add a VF page to the Navigation bar
  3. Display a VF page within a Standard Page Layout
  4. Add a VF page as a Component in the Lightning App Builder
  5. Launch a VF page as a Quick Action
  6. Display a VF page by overriding Standard Buttons or Links
  7. Display a VF page using Custom Buttons or Links
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
74
Q

To make a VF page available in the Lightning App Builder, you must enable…

A

“Available for Lightning Experience, Lightning Communities, and the mobile app”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
75
Q

What are VisualForce Expressions?

A

Global variables, calculations and properties made available by the page’s controller. Use them for dynamic output or passing values into components by assigning them to attributes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
76
Q

A VisualForce expression is …

A

…any set of literal values, variables, sub-expressions, or operators that can be resolved to a single value.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
77
Q

True or False: Method calls are allowed in VF expressions.

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
78
Q

What is VF Expression syntax?

A

{! expression}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
79
Q

VF Expressions are case sensitive or insensitive?

A

Case IN-sensitive

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
80
Q

How many built-in components are available in VisualForce?

A

nearly 150

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
81
Q

What do coarse-grained components allow you to do?

A

Quickly add lots of functionality to a page

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
82
Q

What do fine-grained components allow you to do?

A

Give you more control over specific details of a page.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
83
Q

What does a Standard List Controller do?

A

Allows you to create VisualForce pages that can display or act on a set of records.
Provides many powerful, automatic behaviors such as querying for records of a specific object and making the records available in a collection variable, as well as filtering and pagination through the results.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
84
Q

What are static resources?

A

Static resources allow you to upload content that you can reference in a Visualforce page. Resources can be archives (such as .zip and .jar files), images, stylesheets, JavaScript, and other files.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
85
Q

What does CDN stand for?

A

Content Distribution Network

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
86
Q

What are custom controllers?

A

Contain custom logic and data manipulation that can be used by a VF page. For example, a custom controller can retrieve a list of items to be displayed, make a callout to an external web service, validate and insert data, and more—and all of these operations will be available to the Visualforce page that uses it as a controller.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
87
Q

When would you choose to use a custom controller instead of a standard controller?

A

When you want to override existing functionality, customize the navigation through an application, use callouts or Web services, or if you need finer control for how information is accessed for your page, Visualforce lets you take the reigns

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
88
Q

Can you use a custom controller and a standard controller together at the same time?

A

No

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
89
Q

An alternative to getters and setters is to use ____.

A

Apex properties

public MyObject__c myVariable { get; set; }

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
90
Q

What are packages?

A

Containers for apps, tabs, and objects installed into your org from the AppExchange

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
91
Q

What flavors do packages come in?

A

Managed and Unmanaged

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
92
Q

Describe the differences between Managed and Unmanaged packages.

A
  1. You can’t view or change the offering’s code or metadata in a Managed package, but you can in an Unmanaged package.
  2. The provider automatically upgrades Managed packages, but with Unmanaged packages, you have to download and reinstall the latest version manually.
  3. The contents of the package DO count against your app, tab, and object limits if Unmanaged but don’t count against them with a Managed package.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
93
Q

What is the AppExchange product lifecycle?

A

roadmap to everything from ensuring that you’re building the right product to supporting the product after it’s launched. Stages are: Plan, Build, Distribute, Market, Sell, and Support.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
94
Q

What is the Lightning Component Framework

A

A UI development framework similar to Angular JS and React

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
95
Q

What is Apex?

A

Salesforce’s proprietary programming language with Java-like syntax

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
96
Q

What is VisualForce?

A

A markup language that lets you create custom Salesforce pages with code that looks a lot like HTML, and optionally can use a powerful combination of JavaScript and Apex.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
97
Q

What types of elements do you see in the XML markup for Lightning components?

A

Static HTML tags and Lightning component tags

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
98
Q

What’s one situation where it’s better to use Lightning Components instead of Visualforce?

A

Mobile apps

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
99
Q

What is multitenancy?

A

All customers share the same infrastructure and run on the same platform.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
100
Q

What is returned when doing an aggregate SOQL query? (Most aggregate functions)

A

List

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
101
Q

Are JOINs supported in SOQL queries?

A

No

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
102
Q

What does a SOSL nickname search apply to?

A

English-based searches on Account, Contact, Lead, and User

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
103
Q

What does the Query Optimizer do?

A

Evaluates SOQL queries and SOSL searches. It routes queries to the appropriate indexes. Looks at every incoming query and assigns it a cost value for each potential query path that it identifies. Then uses costs to determine which execution plan to use.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
104
Q

Fields that are automatically indexed include:

A

Id, Name, OwnerId, CreatedDate, SystemModStamp, Record Type, Master-Detail Fields, Lookup Fields, Unique Fields, and Exernal Id fields

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
105
Q

Avoid these types of queries:

A

Querying for null rows
Negative filter operators
Leading wildcards
Text fields with comparison operators

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
106
Q

Query Plan tool - can you use it with SOSL?

A

No, just SOQL

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
107
Q

Included in Lightning Flow are two point-and-click automation tools: Process Builder, which lets you build processes, and Cloud Flow Designer, which lets you build flows.

To sum up the differences:

A

Lightning Flow is the name of the product.
Process Builder and Cloud Flow Designer are the names of the tools.
Use Process Builder to make processes; use Cloud Flow Designer to make flows.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
108
Q

Use Process Builder when you need to start a behind-the-scenes business process automatically. Processes can start when:

A

A record is created
A record is updated
A platform event occurs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
109
Q

Use Cloud Flow Designer to:

A

Automate a guided visual experience.
Add more functionality for a behind-the-scenes process than is available in Process Builder. Build the more complex functionality in the Cloud Flow Designer. Then call the resulting flow from the process.
Start a behind-the-scenes business process when a user clicks something, like a button.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
110
Q

Use Apex when

A

you need more functionality than is available in Process Builder or Cloud Flow Designer. Build the more complex functionality as invocable Apex methods. Then call the resulting Apex as an Apex action in the process or as an Apex element in the flow.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
111
Q

Every process consists of

A

a trigger, at least one criteria node, and at least one action

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
112
Q

Process Builder is

A

a point-and-click tool that lets you easily automate if/then business processes and see a graphical representation of your process as you build.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
113
Q

A PB can be triggered by one of 2 events:

A

Only when a record is created

Anytime a record is created or edited

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
114
Q

In PB, how many criteria can you set up?

A

As many as your heart desires

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
115
Q

In PB, in each criteria node, you can:

A

Set filter conditions.
Enter a custom formula. Like in validation rules, the formula must resolve to true or false.
Opt out of criteria and always execute the associated actions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
116
Q

In PB, with scheduled actions, you can schedule actions based on either:

A

A specific date/time field on the record that started the process.
For example, a month before an account’s service contract expires.

The time that the process ran.
For example, 3 days from now.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
117
Q

In a scheduled action, at the specified time, Salesforce does what?

A

makes sure that the associated criteria node still evaluates to True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
118
Q

In PB, these are actions you can configure:

A

Create records.
Update the record that started the process or any related record.
Submit that record for approval.
Update one or more related records.
Send emails using a specified email template.
Post to a Chatter feed.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
119
Q

Process Builder can automate a few kinds of business processes. The main difference is the trigger: when the process starts.

A

Type Process Starts When
Record Change A record is created or edited
Invocable It’s called by another process
Platform Event A platform event message is received

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
120
Q

Process Builder can’t:

A
Post to a community feed
Submit a related record for approval
Delete records
Create a bunch of records and associate them with each other
Perform complex logic
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
121
Q

Flow variables come in 4 types:

A

Variable A single value “Hello World”, true, 6
sObject Variable A set of field values for a single record Rating, ID, and Name for an account
Collection Variable Multiple values of the same data type [1, 2, 3, 5, 8, 13]
sObject Collection Variable A set of field values for multiple records that have the same object Rating, ID, and Name for multiple accounts

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
122
Q

Triggers are active by default when created.

A

True

123
Q

To prevent saving records in a trigger,

A

call the addError() method on the sObject in question.

124
Q

When users enter a term in the search field

A

(1), the search engine breaks up the search term into tokens (2). It matches those tokens to the record information stored in the search index (3), ranks the associated records by relevance (4), and returns the results that users have access to (5).

125
Q

The search index also provides the opportunity to introduce relevance ranking into the mix. This is our secret sauce to find and rank the records users are looking for. What are the special ingredients?

A

A dash of search term frequency, order, and uniqueness; a sprinkle of record activity; a spoonful of access permissions; and a handful of other factors.

126
Q

three things about helpers:

A

A component’s helper is the appropriate place to put code to be shared between several different action handlers.
A component’s helper is a great place to put complex processing details, so that the logic of your action handlers remains clear and streamlined.
Helper functions can have any function signature. That is, they’re not constrained the way that action handlers in the controller are. (Why is this? Because you are calling the helper function directly from your code. By contrast, the framework calls action handlers via the framework runtime.) It’s a convention and recommended practice to always provide the component as the first parameter to helper functions.

127
Q

What is $A?

A

It’s a framework global variable that provides a number of important functions and services.

128
Q

What is $A?

A

It’s a framework global variable that provides a number of important functions and services.

129
Q

There are two types of events,

A

component and application

130
Q

What is LDS?

A

Lightning Data Service

131
Q

What is LDS?

A

Lightning Data Service

132
Q

The Checkpoint Inspector has two tabs: Heap and Symbols.

A

Heap—Displays all objects present in memory at the line of code where your checkpoint was executed.
Symbols—Displays all symbols in memory in tree view.

133
Q

Test methods…

A

You can save up to 6 MB of Apex code in each org. Test classes annotated with @isTest don’t count toward this limit.
Even though test data rolls back, no separate database is used for testing. As a result, for some sObjects that have fields with unique constraints, inserting duplicate sObject records results in an error.
Test methods don’t send emails.
Test methods can’t make callouts to external services. You can use mock callouts in tests.
SOSL searches performed in a test return empty results. To ensure predictable results, use Test.setFixedSearchResults() to define the records to be returned by the search.

134
Q

You’ll typically use Asynchronous Apex for

A

callouts to external systems, operations that require higher limits, and code that needs to run at a certain time

135
Q

The key benefits of asynchronous processing include:

A

User efficiency
Scalability
Higher limits

136
Q

Asynchronous Apex flavors, description and common scenarios, GO:

A

Future Methods:
Run in their own thread, and do not start until resources are available.
Web service callout.

Batch Apex:
Run large jobs that would exceed normal processing limits.
Data cleansing or archiving of records.

Queueable Apex:
Similar to future methods, but provide additional job chaining and allow more complex data types to be used.
Performing sequential processing operations with external Web services.

Scheduled Apex:
Schedule Apex to run at a specified time.
Daily or weekly tasks.

137
Q

How are Asynchronous Apex governor limits different?

A

Number of SOQL queries doubles from 100 to 200

Total heap size and CPU time are similarly larger

138
Q

To make a Web service callout to an external service or API, you create an Apex class with a future method that is marked with

A

(callout=true)

public class SMSUtils {
    // Call async from triggers, etc, where callouts are not permitted.
    @future(callout=true)
    public static void sendSMSAsync(String fromNbr, String toNbr, String m) {
        String results = sendSMS(fromNbr, toNbr, m);
        System.debug(results);
    }
139
Q

Testing future methods is a little different than typical Apex testing. To test future methods,

A

enclose your test code between the startTest and stopTest test methods. The system collects all asynchronous calls made after the startTest. When stopTest is executed, all these collected asynchronous processes are then run synchronously. You can then assert that the asynchronous call operated properly.

140
Q

Test code cannot actually send callouts to external systems, so you’ll have to ‘mock’ the callout for test coverage

A

@isTest
global class SMSCalloutMock implements HttpCalloutMock {
global HttpResponse respond(HttpRequest req) {
// Create a fake response
HttpResponse res = new HttpResponse();
res.setHeader(‘Content-Type’, ‘application/json’);
res.setBody(‘{“status”:”success”}’);
res.setStatusCode(200);
return res;
}
}

141
Q

True or False: Future methods can’t be used in Visualforce controllers in getMethodName(), setMethodName(), nor in the constructor.

A

True

142
Q

True or False: You can call a future method from another future method.

A

False

143
Q

How many future calls can you make per Apex invocation?

A

50

144
Q

1 Why would a developer use Test. startTest( ) and Test.stopTest( )?

A. To avoid Apex code coverage requirements for the code between these lines
B. To start and stop anonymous block execution when executing anonymous
Apex code
C. To indicate test code so that it does not Impact Apex line count governor limits.
D. To create an additional set of governor limits during the execution of a single test class.
A

D. To create an additional set of governor limits during the execution of a single test class.

145
Q

The Limits methods returns what?

A

the specific limit for the particular governor, such as the number of calls of a method or the amount of heap size remaining.

For example, getCallouts returns the number of callouts to an external service that have already been processed in the current context, while getLimitCallouts returns the total number of callouts available in the given context.

146
Q

How many times can startTest() and stopTest() be called per method?

A

Each test method is allowed to call this method only once.

147
Q

2 What must the Controller for a Visualforce page utilize to override the Standard Opportunity view button?

A. The StandardSetController to support related lists for pagination.
B. the Opportunity StandardController for pre -built functionality.
C. A callback constructor to reference the StandardController.
D.A constructor that intrializes a private Opportunity variable.
A

B. the Opportunity StandardController for pre -built functionality.

148
Q

3 A developer uses a before insert trigger on the Lead object to fetch the Territory__c object, where the Territory__c.PostalCode__c matches the Lead.PostalCode. The code fails when the developer uses the Apex Data Loader to insert 10,000 Lead records. The developer has the following code block:

Line-01: for (Lead l : Trigger.new){
Line-02: if (l.PostalCode != null) {
Line-03: List terrList = [SELECT Id FROM Territory\_\_c WHERE PostalCode\_\_c = :l.PostalCode];
Line-04: if(terrList.size() > 0)
Line-05: l.Territory\_\_c = terrList[0].Id;
Line-06: }
Line-07: }

Which line of code is causing the code block to fail?

A. Line-03: A SOQL query is located inside of the for loop code.
B. Line-01: Trigger:new is not valid in a before insert Trigger.
C. Line-02: A NullPointer exception is thrown if PostalCode is null.
D. Line-05: The Lead in a before insert trigger cannot be updated.
A

A. Line-03: A SOQL query is located inside of the for loop code.

149
Q

4 What would a developer do to update a picklist field on related Opportunity records when a modification to the associated Account record is detected?

A. Create a process with Process Builder.
B. Create a workflow rule with a field update.
C. Create a Lightning Component.
D. Create a Visualforce page.
A

A. Create a process with Process Builder.

150
Q

5 Which requirement needs to be implemented by using standard workflow instead of Process Builder?
Choose 2 answers

A. Create activities at multiple intervals.
B. Send an outbound message without Apex code.
C. Copy an account address to its contacts.
D. Submit a contract for approval.
A

A. Create activities at multiple intervals.

B. Send an outbound message without Apex code.

151
Q

6 An org has different Apex Classes that provide Account -related functionality.
After a new validation rule is added to the object, many of the test methods fail.
What can be done to resolve the failures and reduce the number of code changes needed for future validation rules?

Choose 2 answers:

A. Create a method that creates valid Account records, and call this method from within test methods.
B. Create a method that loads valid Account records from a Static Resource, and call this method within test methods.
C. Create a method that performs a callout for a valid Account record, and call this method from within test methods.
D Create a method that queries for valid Account records, and call this method from within test methods.
A

A. Create a method that creates valid Account records, and call this method from within test methods.

B. Create a method that loads valid Account records from a Static Resource, and call this method within test methods.

152
Q

7 Which component is available to deploy using Metadata API?

Choose 2 answers

A. Case Layout
B. Account Layout
C. Case Feed Layout
D. ConsoleLayout
A

A. Case Layout

B. Account Layout

153
Q

What is the Metadata API used for?

A

Use Metadata API to retrieve, deploy, create, update or delete customization information, such as custom object definitions and page layouts, for your organization. This API is intended for managing customizations and for building tools that can manage the metadata model, not the data itself. To create, retrieve, update or delete records, such as accounts or leads, use data SOAP API or REST API.

154
Q

What tools are used to access the functionality of the Metadata API?

A

Force.com IDE (Eclipse) and the Ant Migration Tool (Ant tools)

155
Q

What permissions are needed to access the Metadata API?

A

Users with the Modify Metadata permission can update metadata (including Apex) through Metadata API even if they don’t also have the Modify All Data permission. Metadata API is used for deployments using change sets, the Ant Migration Tool, or the Salesforce CLI. Users must have the permission that enables use of the feature supported by the metadata they’re trying to modify. They must also have the permission that enables their deployment tool.
The Modify Metadata permission doesn’t impact direct customization of metadata using Setup UI pages, because those pages don’t use Metadata API for updates.

156
Q

The deploy() and retrieve() calls are used primarily for the following development scenarios:

A

Development of a custom application (or customization) in a sandbox organization. After development and testing is completed, the application or customization is then deployed into a production organization using Metadata API.

Team development of an application in a Developer Edition organization. After development and testing is completed, you can then distribute the application via Lightning Platform AppExchange.

157
Q

8 In the code below, what type does Boolean inherit from?
Boolean b= true;

A. Enum
B. Object
C. String
D. Class
A

B. Object

158
Q

9 What is the preferred way to reference web content such as images, style sheets, JavaScript, and other libraries that is used in Visualforce pages?

A. By accessing the content from Chatter Files.
B. By uploading the content in the Documents tab.
C. By accessing the content from a third -party CON.
D. By uploading the content as a Static Resource.
A

D. By uploading the content as a Static Resource.

159
Q

10 A company has a custom object named Warehouse. Each Warehouse record has a distinct record owner, and is related to a parent Account in Salesforce.
Which kind of relationship would a developer use to relate the Account to the Warehouse?

A. One -to -Many
B. Lookup
C. Master -Detail
D. Parent -Child
A

B. Lookup

160
Q

11 A developer creates a Workflow Rule declaratively that updates a field on an object. An Apex update trigger exists for that object.
What happens when a user updates a record?

A. No changes are made to the data.
B. Both the Apex Trigger and Workflow Rule are fired only once.
C. The Workflow Rule is fired more than once.
D. The Apex Trigger is fired more than once.
A

D. The Apex Trigger is fired more than once.

161
Q

12 What is true for a partial sandbox that is not true for a full sandbox?

Choose 2 answers:

A. More frequent refreshes.
B. Only Includes necessary metadata.
C. Use of change sets.
D. Limited to 5 GB of data.
A

A. More frequent refreshes.

D. Limited to 5 GB of data.

162
Q

13 What can a lightning component contain in its resource bundle? Choose 2 answers.

A CSS styles scoped to the component.
B Custom Client-side rendering behavior.
C Build scripts for minification.
D Properties files with global settings.
A

A CSS styles scoped to the component.

B Custom Client-side rendering behavior.

163
Q

14 In which order does SalesForce execute events upon saving a record?

A. Before Triggers; Validation Rules; After Triggers; Assignment Rules; Workflow Rules; Commit
B. Validation Rules; Before Triggers; After Triggers; Workflow Rules; Assignment Rules; Commit
C. Before Triggers; Validation Rules; ilter Triggers; Workflow Rules; Assignment Rules; Commit
D. Validation Rules; Before Triggers; After Triggers; Assignment Rules; Workflow Rules; Commit
A

A. Before Triggers; Validation Rules; After Triggers; Assignment Rules; Workflow Rules; Commit

164
Q

15 When loading data into an organization, what can a developer do to match records to update existing records?

Choose 2 answers

A. Match an external Id Text field to a column in the imported file.
B. Match the Id field to a column in the Imported file.
C. Match the Name field to a column in the imported file.
D. Match an auto -generated Number field to a column in the imported file.
A

A. Match an external Id Text field to a column in the imported file.
B. Match the Id field to a column in the Imported file.

165
Q

16 In an organization that has enabled multiple currencies, a developer needs to aggregate the sum of the Estimated_value__c currency field from the CampaignMember object using a roll-up summary field called Total_estimated_value__c on Campaign.

How is the currency of the Total_estimated_value\_\_c roll-up summary field determined?

A. The values in Campaignmember.Estimated_value\_\_c are converted into the currency of the Campaign record and the sum is displayed using the currency on the Campaign record.
B. The values in CampaignMember.Estimated_value\_\_c are converted into the currency on the majority of the CampaignMember records and the sum is displayed using that currency.
C. The values in CampaignMember.Estimated_value\_\_c are summed up and the resulting Total_estimated_value\_\_c field is displayed as a numeric field on the Campaign record.
D. The values In CampaignMember.Estimated_value\_\_c are converted into the currency of the current user, and the sum is displayed using the currency on the Campaign record.
A

A. The values in CampaignMember.Estimated_value__c are converted into the currency of the Campaign record and the sum is displayed using the currency on the Campaign record.

166
Q

17 A candidate may apply to multiple jobs at the company Universal Containers by submitting a single application per job posting, that application cannot be modified to be resubmitted to a different job posting.

What can the administrator do to associate an application with each job posting in the schema for the organization?

A. Create a lookup relationship on both objects to a junction object called Job Posting Applications.
B. Create a master-detail relationship in the Job Postings custom object to the Applications custom object.
C. Create a master-detail relationship in the Application custom object to the Job Postings custom object.
D. Create a lookup relationship in the Applications custom object to the Job Postings custom object.
A

C. Create a master-detail relationship in the Application custom object to the Job Postings custom object.

167
Q

18 What is a characteristic of the Lightning Component Framework?
Choose 2 answers:

A. It has an event-driven architecture.
B. It works with existing Visualforce pages.
C. It includes responsive components.
D. It uses XML as its data format.
A

A. It has an event-driven architecture.

C. It includes responsive components.

168
Q

19 What is a capability of cross-object formula fields?
Choose 3 answers

A. Formula fields can reference fields from master-detail or lookup parent relationships.
B. Formula fields can expose data the user does not have access to in a record.
C. Formula fields can be used in three roll-up summaries per object.
D. Formula fields can reference fields in a collect of records from a child relationship.
E. Formula fields can reference fields from objects that are up to 10 relationships away.
A

A. Formula fields can reference fields from master-detail or lookup parent relationships.
B. Formula fields can expose data the user does not have access to in a record.
E. Formula fields can reference fields from objects that are up to 10 relationships away.

169
Q

20 A developer has a block of code that omits any statements that indicate whether the code block should execute with or without sharing.
What will automatically obey the organization-wide defaults and sharing settings for the user who executes the code in the Salesforce organization?
Choose 2 answers

A. Apex Triggers
B. HTTP Callouts
C. Apex Controllers
D. Anonymous Blocks
A

A. Apex Triggers

D. Anonymous Blocks

170
Q

21 A developer created an Apex trigger using the Developer Console and now wants to debug code
How can the developer accomplish this in the Developer Console?

A. Select the Override Log Triggers checkbox for the trigger
B. Add the user name in the Log Inspector.
C. Open the Progress tab in the Developer Console.
D. Open the logs tab in the Developer Console.
A

D. Open the logs tab in the Developer Console.

171
Q

22 Which data structure is returned to a developer when performing a SOSL search?

A. A list of lists of sObjects.
B. A map of sObject types to a list of sObjects
C. A map of sObject types to a list oflists of sobjects
D. a list of sObjects.
A

A. A list of lists of sObjects.

172
Q

23 How can a developer avoid exceeding governor limits when using an Apex Trigger?
choose 2 answers

A. By using a helper class that can be invoked from multiple triggers.
B. By using the Database class to handle DML transactions.
C. By using Maps to hold data from query results.
D. By performing DML transactions on lists of SObjects.
A

C. By using Maps to hold data from query results.

D. By performing DML transactions on lists of SObjects.

173
Q

24 What is a correct pattern to follow when programming in Apex on a Multi-tenant platform?

A. Apex code is created in a separate environment from schema to reduce deployment errors.
B. DML is performed on one record at a time to avoid possible data concurrency issues.
C. Queries select the fewest fields and records possible to avoid exceeding governor limits.
D. Apex classes use the ''with sharing" keyword to prevent access from other server tenants.
A

C. Queries select the fewest fields and records possible to avoid exceeding governor limits.

174
Q

25 What should a developer working in a sandbox use to exercise a new test Class before the developer deploys that test production?
Choose 2 answers

A. The REST API and ApexTestRun method
B. The Apex Test Execution page in Salesforce Setup.
C. The Test menu in the Developer Console.
D. The Run Tests page in Salesforce Setup.
A

B. The Apex Test Execution page in Salesforce Setup.

C. The Test menu in the Developer Console.

175
Q

26 A company that uses a Custom object to track candidates would like to send candidate information automatically to a third -party human resource system when a candidate is hired.
What can a developer do to accomplish this task?

A. Create an escalation rule to the hiring manager.
B. Create an auto response rule to the candidate.
C. Create a Process Builder with an outbound message action.
D. Create a workflow rule with an outbound message action.
A

D. Create a workflow rule with an outbound message action.

176
Q

27 A developer is creating an application to track engines and their parts. An individual part can be used in different types of engines.
What data model should be used to track the data and to prevent orphan records.

A. Create a junction object to relate many engines to many parts though a master -detail relationship.
B. Create a master -detail relationship to represent the one -to -many model of engines to parts
C. Create a lookup relationship to represent how each part relates to the parent engine object.
D. Create a junction object to relate many engines to many parts through a lookup relationship.
A

A. Create a junction object to relate many engines to many parts though a master -detail relationship.

177
Q

28 What is the accurate statement about with sharing keyword?
choose 2 answers

	A) Inner class donot inherit the sharing setting from the container class
	B) Both inner and outer class can be declared as with sharing
	C) Either inner class or outer classes can be declared as with sharing but not both
	D) Inner class inherit the sharing setting from the conatiner class
A
A) Inner class donot inherit the sharing setting from the container class
B) Both inner and outer class can be declared as with sharing
178
Q

29 How can a developer refer to, or instantiate a PageReference in Apex?
Choose 2 answers

A. By using a PageReference with a partial or full URL.
B. By using the Page object and a Visualforce page name.
C. By using the ApexPages.Page() method with a Visualforce page name.
D. By using the PageReference.Page() method with a partial or full URL.
A

A. By using a PageReference with a partial or full URL.

B. By using the Page object and a Visualforce page name.

179
Q

30 Which standard field needs to be populated when a developer inserts new Contact records programmatically?

A. Accountld
B. Name
C. LastName
D. FirstName
A

C. LastName

180
Q

31 A developer creates a new Visualforce page and Apex extension, and writes test classes that exercise 95% coverage of the new Apex extension.
Change set deployment to production fails with the test coverage warning: “Average test coverage across all Apex classes and triggers is 74%, at least 75% test coverage is required.”

What can the developer do to successfully deploy the new Visualforce page and extension?

A. Create test classes to exercise the Visualforce page markup.
B. Select "Disable Parallel Apex Testing" to run all the tests.
C. Add test methods to existing test classes from previous deployments.
D. Select "Fast Deployment'' to bypass running all the tests.
A

C. Add test methods to existing test classes from previous deployments.

181
Q

32 What is the minimum log level needed to see user generated debug statements?

A. DEBUG
B. FINE
C. INFO
D. WARN
A

A. DEBUG

182
Q

33 Developer needs to automatically populate the ReportsTo field in a Contact record based on the values of the related Account and Department fields in the Contact record.
Which type of trigger would the developer create?

Choose 2 answers

A. before update
B. after insert
C. before insert
D. after update
A

A. before update

C. before insert

183
Q

34 To which primitive data type in Apex is a currency field atomically assigned?

A. Integer
B. Decimal
C. Double
D. Currency
A

B. Decimal

184
Q

35 Which resource can be included in a Lightning Component bundle?
Choose 2 answers

A. Apex class
B. Adobe Flash
C. JavaScript
D. Documentation
A

C. JavaScript

D. Documentation

185
Q

36 A custom exception “RecordNotFoundException” is defined by the following code of block.
public class RecordNotFoundException extends Exception()
which statement can a developer use to throw a custom exception?
choose 2 answers
A. throw new RecordNotFoundException(“problem occured”);
B. throw new RecordNotFoundException();
C. throw RecordNotFoundException(“problem occured”);
D. throw RecordNotFoundException();

A
A. throw new RecordNotFoundException("problem occured");
B. throw new RecordNotFoundException();
186
Q

37 When creating unit tests in Apex, which statement is accurate?

A. Unit tests with multiple methods result in all methods failing every time one method fails.
B. Increased test coverage requires large test classes with many lines of code in one method.
C. Triggers do not require any unit tests in order to deploy them from sandbox to production.
D. System Assert statements that do not Increase code coverage contribute important feedback in unit tests
A

D. System Assert statements that do not Increase code coverage contribute important feedback in unit tests

187
Q
38	public class customController {
	public string cString { get; set;}
public string getStringMethod1(){
return cString;
}
	public string getStringMethod2(){
	if(cString == null)
	cString = 'Method2';
	return cString;
	}
	}
{!cString}, {!StringMethod1}, {!StringMethod2}, {!cString}

38 (cont) What does the user see when accessing the custom page?

A. getMyString,
B. , , Method2,
C.Method2, getMyString
D. getMyString„ Method2, getMyString
A

B. , , Method2,

188
Q

39 What is a valid Apex statement?

	A. Map conMap = (SELECT Name FROM Contact);
	B. Account[] acctList = new List{new Account()}
	C. Integer w, x, y = 123, z = 'abc',
	D private static constant Double rate = 775;
A

B. Account[] acctList = new List{new Account()}

189
Q

40 A developer has a single custom controller class that works with a Visualforce Wizard to support creating and editing multiple sObjects. The wizard accepts data from user inputs across multiple Visualforce pages and from a parameter on the initial URL
Which statement is unnecessary inside the unit test for the custom controller?
Choose 2 answers

A. public ExtendedController (ApexPages.StandardController cntrl) { }
B. ApexPages.currentPage().getParameters().put('input', 'TestValue')
C. Test.setCurrentPage(pageRef),
D. String nextPage = controller.save().getUrl();
A

A. public ExtendedController (ApexPages.StandardController cntrl) { }

190
Q

41 A developer wants to display all of the available record types for a Case object. The developer also wants to display the picklist values for the Case.Status field. The Case object and the Case Status field are on a custom visualforce page.
Which action can the developer perform to get the record types and picklist values in the controller?
Choose 2 answers
A. Use Schema.PIcklistEntry returned by Case Status getDescribe().getPicklistValues().
B. Use Schema.RecordTypeinfo returned by Case.SObjectType getDescribe().getRecordTypelnfos()
C. Use SOQL to query Case records in the org to get all the RecordType values available for Case.
D. Use SOQL to query Case records in the org to get all value for the Status picklist field.

A

A. Use Schema.PIcklistEntry returned by Case Status getDescribe().getPicklistValues().
B. Use Schema.RecordTypeinfo returned by Case.SObjectType getDescribe().getRecordTypelnfos()

191
Q

42 An sObject named Application_c has a lookup relationship to another sObject named Position_c. Both Application _c and Position_c have a picklist field named Status_c.
When the Status_c field on Position_c is updated, the Status_c field on Application_c needs to be populated automatically with the same value, and execute a workflow rule on Application_c.
How can a developer accomplish this?

A. By changing Application_c.Status_c into a roll -up summary field.
B. By changing Application_c.Status_c into a formula field.
C. By using an Apex trigger with a DML operation.
D. By configuring a cross-object field update with a workflow.
A

C. By using an Apex trigger with a DML operation.

cross object updates for master/detail only

formula field can be used on lookup relationship, but workflow cannot fire on them

192
Q

43 A developer wrote a workflow email alert on case creation so that an email is sent to the case owner manager when a case is created?

When will the email be sent?

A. Before Trigger execution
B. After Committing to database.
C. Before Committing to database
D. After Trigger execution.
A

B. After Committing to database.

193
Q

44 Which code represents the Controller in MVC architecture on the Force.com platform.
Choose 2 answers

A. JavaScript that is used to make a menu item display itself.
B. StandardController system methods that are referenced by Visualforce.
C. Custom Apex and JavaScript code that is used to manipulate data.
D. A static resource that contains CSS and Images.
A

B. StandardController system methods that are referenced by Visualforce.
C. Custom Apex and JavaScript code that is used to manipulate data.

194
Q

45 A developer needs to provide a Visualforce page that lets users enter Product specific details during a Sales cycle.
How can this be accomplished?
Choose 2 answers
provide Product data entry.

A. Download a Managed Package from the AppExchange that provides a custom Visualforce page to modify.
B. Create a new Visualforce page and an Apex controller to provide Product data entry.
C. Copy the standard page and then make a Visualforce page for product data entry.
D. Download an Unmanaged Package from the AppExchange that provides a custom Visualforce page to modify.
A

B. Create a new Visualforce page and an Apex controller to provide Product data entry.

D. Download an Unmanaged Package from the AppExchange that provides a custom Visualforce page to modify.

195
Q

46 A developer writes a before insert trigger.
How can the developer access the incoming records in the trigger body?

A. By accessing the Trigger.new context variable.
B. By accessing the Trigger.newRecords context variable.
C. By accessing the Trigger.newMap context variable.
D. By accessing the Tripper.newList context variable.
A

A. By accessing the Trigger.new context variable.

196
Q

47 A developer in a Salesforce org with 100 Accounts executes the following code using the Developer console:

	Account myAccount = new Account(Name = 'MyAccount');
	Insert myAccount;
	For (Integer x = 0; x < 250; x++)
	Account newAccount = new Account (Name='MyAccount' + x);
	try {
	Insert newAccount;
	}
	catch (Exception ex) {
	System.debug (ex) ;
	}
	insert new Account (Name='myAccount');
	How many accounts are in the org after this code is run?
	A. 101
	B. 100
	C. 102
	D. 252
A

B. 100

197
Q

48 The Review_c object have a lookup relationship to the job_Application_c object. The job_Application_c object has a master detail relationship up to the position_c object. The relationship is based on the auto populated defaults?

What is the recommended way to display field data from the related Review _C records a Visualforce page for a single Position_c record?

Select one of the following:

A. Utilize the Standard Controller for Position_c and cross-object Formula Fields on the Job_Application_c object to display Review_c data.

B. Utilize the Standard Controller for Position_c and a Controller Extension to query for Review_c data.

C. Utilize the Standard Controller for Position_c and expression syntax in the Page to display related Review_c through the Job_Applicacion_c inject.

D. Utilize the Standard Controller for Position_c and cross-object Formula Fields on the Review_c object to display Review_c data.
A

B. Utilize the Standard Controller for Position_c and a Controller Extension to query for Review_c data.

198
Q

49 What is a capability of the Force.com IDE?
Choose 2 answers

A. Roll back deployments.
B. Run Apex tests.
C. Download debug logs.
D. Edit metadata components.
A

B. Run Apex tests.

D. Edit metadata components.

199
Q

dowork();
Which code segment can be used to control when the dowork() method is called?

A. for (Trigger.isRunning t: Trigger.new)
{
dowork();
}
B. if(Trigger.isRunning)
dowork();
C. for (Trigger.isInsert t: Trigger.new)
{
dowork();
}
D. if(Trigger.isInsert)
dowork();
A

D. if(Trigger.isInsert)

dowork();

200
Q

51 When would a developer use a custom controller instead of a controller extension?
Choose 2 answers:

A. When a Visualforce page needs to replace the functionality of a standard controller.
B. When a Visualforce page does not reference a single primary object.
C. When a Visualforce page should not enforce permissions or field-level security.
D. When a Visualforce page needs to add new actions to a standard controller.
A

A. When a Visualforce page needs to replace the functionality of a standard controller.
C. When a Visualforce page should not enforce permissions or field-level security.

201
Q

What is a custom controller?

A

A custom controller is an Apex class that implements all of the logic for a page without leveraging a standard controller. Use custom controllers when you want your Visualforce page to run entirely in system mode, which does not enforce the permissions and field-level security of the current user.

202
Q

What is a controller extension?

A
A controller extension is an Apex class that extends the functionality of a standard or custom controller. Use controller extensions when:
You want to leverage the built-in functionality of a standard controller but override one or more actions, such as edit, view, save, or delete.
You want to add new actions.
You want to build a Visualforce page that respects user permissions. Although a controller extension class executes in system mode, if a controller extension extends a standard controller, the logic from the standard controller does not execute in system mode. Instead, it executes in user mode, in which permissions, field-level security, and sharing rules of the current user apply.
203
Q

52 What is a valid statement about Apex classes and interfaces?
Choose 2 answers:

	A. The default modifier for a class is private.
	B. Exception classes must end with the word exception.
	C. A class can have multiple levels of inner classes.
	D. The default modifier for an interface is private.
A
A. The default modifier for a class is private.
B. Exception classes must end with the word exception.
204
Q

53 A developer has the following trigger that fires after insert and creates a child Case whenever a new Case is created.

	List childCases = new List();
	for (Case parent : Trigger.new){
	Case child = new Case(ParentId = parent.Id, Subject = parent.Subject);
	childCases.add(child);
	}
	insert childCases;
What happens after the code block executes?

A. Multiple child cases are created for each parent case in Trigger.new.
B. child case is created for each parent case in Trigger.new.
C. The trigger enters an infinite loop and eventually fails.
D. The trigger fails if the Subject field on the parent is blank.
A

C. The trigger enters an infinite loop and eventually fails.

205
Q

54 A Developer wants to create a custom object to track Customer Invoices.

How should Invoices and Accounts be related to ensure that all Invoices are visible to everyone with access to Account?

A. The Account should have a Lookup relationship to the Invoice.
B. The Invoice should have a Master -Detail relationship to the Account.
C. The Account should have a Master -Detail relationship to the Invoice.
D. The Invoice should have a Lookup relationship to the Account.
A

B. The Invoice should have a Master -Detail relationship to the Account.

206
Q

55 What is a valid source and destination pair that can send or receive change sets?
Choose 2 answers:

A. Sandbox to production.
B. Developer edition to sandbox.
C. Developer edition to production.
D. Sandbox to sandbox.
A

A. Sandbox to production.
D. Sandbox to sandbox.

(Production to sandbox is also a valid answer…)

207
Q

56 A developer needs to create records for the object Property__c .The developer creates the following code block:

	01 List propertiesToCreate =helperClass.CreateProperties();
	02 try {
	3
	04 } catch (Exception exp) {
	05 //Exception handling
	06 }
Which line of code would the developer insert at line 03 to ensure that at least some records are created, even if a record have errors and fails to be created?

A. Database.insert(propertiesToCreate, System.ALLOW_PARTIAL);
B. insert propertiesToCreate,
C. Database.insert(propertiesToCreate, false);
D. Database.insert(propertiesToCreate)
A

C. Database.insert(propertiesToCreate, false);

208
Q

57 When the number of record in a recordset is unknown, which control statement should a developer use to implement a set of code that executes for every record in the recordset, without performing a .size() or .length() method call?

A. For (init_stmt, exit_condition; increment_stmt) { }
B. Do { } While (Condition)
C. For (variable : list_or_set) { }
D. While (Condition) { ... }
A

C. For (variable : list_or_set) { }

209
Q

58 What is the result when a Visualforce page calls an Apex controller, which calls another Apex class, which then results in hitting a governor limit?

A. Any changes up to the error are saved.
B. Any changes up to the error are rolled back.
C. All changes before a savepoint are saved.
D. All changes are saved in the first Apex class.
A

B. Any changes up to the error are rolled back.

210
Q

59 A developer has the following code block:

	public class PaymentTax {
	public static decimal SalesTax = 0.0875;
	}
	trigger OpportunityLineItemTrigger on OpportunityLineItem (before insert, before update) {
	PaymentTax PayTax = new PaymentTax();
	decimal ProductTax = ProductCost * XXXXXXXXXXX;
	}
To calculate the productTax, which code segment would a developer insert at the XXXXXXXXXXX to make the value the class variable SalesTax accessible within the trigger?

A. SalesTax
B. PayTax.SalesTax
C. PaymentTax.SalesTax
D. OpportunityLineItemTngger.SalesTax
A

C. PaymentTax.SalesTax

211
Q

60 On a Visualforce page with a custom controller, how should a developer retrieve a record by using an ID that is passed on the URL?

A. Use the constructor method for the controller.
B. Use the $Action.View method in the Visualforce page.
C. Create a new PageReference object with the Id.
D. Use the  tag in the Visualforce page.
A

A. Use the constructor method for the controller.

212
Q

61 A developer wrote a workflow email alert on case creation so that an email is sent to the case owner manager when a case is created.

When will the email be sent?

A. After Committing to database.
B. Before Committing to database. Calculator
C. Before Trigger execution.
D. After Trigger execution.
A

A. After Committing to database.

213
Q
62	A developer creates an Apex helper class to handle complex trigger logic.
	How can the helper class warn users when the trigger exceeds DML governor limits?
A. By using ApexMessage.Message() to display an error message after the number of DML statements is exce€
B. By using Messaging.SendEmail() to continue the transaction and send an alert to the user after the number umL statements is exceed
C. By using PageReference.setRedirect() to redirect the user to a custom Visualforce page before the number DML statements is exceeded.
D. By using Limits.getDMLRows() and then displaying an error message before the number of DML statements exceeded.
A

D. By using Limits.getDMLRows() and then displaying an error message before the number of DML statements exceeded.

myDMLLimit = Limits.getDMLRows();

214
Q

63 Which user can edit a record after it has been locked for approval?

Choose 2 answers

A An administrator.
B. Any user who approved the record previously.
C. A user who is assigned as the current approver.
D. Any user- with a higher role in the hierarchy.
A

A An administrator.

C. A user who is assigned as the current approver.

215
Q

64 Which type of information is provided by the Checkpoints tab in the Developer Console?

Choose 2 answers

A. Exception
B. Debug Statement
C. Namespace
D. Time
A

C. Namespace

D. Time

216
Q

What does the Checkpoints tab display in the Developer Console?

A

This list displays the checkpoints currently available for review. Select Debug | My Current Checkpoints Only to only display checkpoints you’ve created since opening the Developer Console. Deselect this option to display all checkpoints currently saved for your organization, including newly-generated ones created by other users.

Each checkpoint in the list displays this information:

COLUMN	DESCRIPTION
Namespace	The namespace of the package containing the checkpoint.
Class	The Apex class containing the checkpoint.
Line	The line number marked with the checkpoint.
Time	The time the checkpoint was reached.
217
Q

65 What is the proper process for an Apex Unit Test?

A. Query for test datapsing SeeAllData=true. Call the method being tested. Verify that the results are correct
B. Create data for testing. Execute runAllTests(). Verify that the results are correct.
C. Create data for testing. Call the method being tested. Verify that the results are correct.
D. Query for test data using SeeAllData=true. Execute runAllTests(). Verify that the results are correct.
A

C. Create data for testing. Call the method being tested. Verify that the results are correct.

218
Q

66 Which declarative method helps ensure quality data?
Choose 3 answers

	A. Exception handling
	B. Workflow alerts
	C. Validation rules
	D. Lookup filters
	E. Page layouts
A

C. Validation rules
D. Lookup filters
E. Page layouts

219
Q

67 What is an accurate constructor for a custom controller named “MyController”?

	A. public MyController() {
	account = new Account();
	}
	B. public MyController(SObject obj) {
	account = (Account) obj;
	}
	C. public MyController(List objects) {
	accounts = (List)objects;
	}
	D. public MyController(ApexPages.StandardController stdController) {
	account = (Account)stdController.getRecord();
	}
A
A. public MyController() {
account = new Account();
}
220
Q

68 A company wants a recruiting app that models candidates and interviews; displays the total number of interviews each candidate record; and defines security on interview records that is independent from the security on candidate records.
What would a developer do to accomplish this task?
Choose 2 answers

A. Create a roll -up summary field on the Candidate object that counts Interview records.
B. Create a master -detail relationship between the Candidate and Interview objects.
C. Create a lookup relationship between the Candidate and Interview objects.
D. Create a trigger on the Interview object that updates a field on the Candidate object.
A

C. Create a lookup relationship between the Candidate and Interview objects.
D. Create a trigger on the Interview object that updates a field on the Candidate object.

221
Q

69 What is a good practice for a developer to follow when writing a trigger?
Choose 2 answers

A. using the Map data structure to hold query results by ID.
B. Using @future methods to perform DML operations.
C. Using the set data structure to ensure distinct records.
D. Using synchronous callouts to call external systems
A

A. using the Map data structure to hold query results by ID.

C. Using the set data structure to ensure distinct records.

222
Q

Best practices for writing triggers include:

A
  1. Don’t assume just one record. Write it to handle bulk.
  2. Don’t assume quantity of records that will be processed.

Trigger MileageTrigger on Mileage__c (before insert, before update) {
Set ids = Trigger.newMap.keySet();
List c = [SELECT Id FROM user WHERE mileageid__c in :ids];

Minimize the number of data manipulation language (DML) operations by adding records to collections and performing DML operations against these collections.
Minimize the number of SOQL statements by preprocessing records and generating sets, which can be placed in single SOQL statement used with the IN clause.
}

223
Q

70 Which code block returns the ListView of an Account object using the following debug statement?
system. debug (controller. getListViewOptions ( ) ) ;

	A. ApexPages.StandardSetController controller = new
	ApexPages.StandardSetController([SELECT Id FROM Account LIMIT 1]);
	B. ApexPages.StandardController controller = new
	ApexPages.StandardController(Database.getQueryLocator('select Id from Account Limit 1');
	C. ApexPages.StandardController controller = new
	ApexPages StandardController ( [SELECT Id FROM Account LIMIT 1));
	D.ApexPages.StandardSetController controller = new
	ApexPages.StandardSetController(Database.getQueryLocator('select Id from Account Limit 1');
A

D.ApexPages.StandardSetController controller = new

ApexPages.StandardSetController(Database.getQueryLocator(‘select Id from Account Limit 1’);

224
Q

You can instantiate a StandardSetController in either of the following ways:

A

From a list of sObjects:
List accountList = [SELECT Name FROM Account LIMIT 20];
ApexPages.StandardSetController ssc = new ApexPages.StandardSetController(accountList);

From a query locator:
ApexPages.StandardSetController ssc =

new ApexPages.StandardSetController(Database.getQueryLocator([SELECT Name,CloseDate FROM Opportunity]));

225
Q

71 Which data type or collection of data types can SOQL statements populate or evaluate to?
Choose 3 answers

	A. A Boolean
	B. An integer
	C. A list of sObjects
	D. A single sObject
	E. A string
A

B. An integer (for a count…)
C. A list of sObjects
D. A single sObject

226
Q

72 Which action can a developer perform in a before update trigger?
Choose 2 answers

A. Update the original object using an update DML operation.
B. Delete the original object using a delete DML operation.
C. Change field values using the Trigger.new context variable.
D. Display a custom error message in the application interface.
A

C. Change field values using the Trigger.new context variable.
D. Display a custom error message in the application interface.

227
Q

73 Where can debug log filter settings be set?
Choose 2 answers

A. The Filters link by the monitored user's name within the web UI.
B. The Show More link on the debug log's record.
C. On the monitored user's name.
D. The Log Filters tab on a class or trigger detail page.
A

A. The Filters link by the monitored user’s name within the web UI.
B. The Show More link on the debug log’s record.
C. On the monitored user’s name.
D. The Log Filters tab on a class or trigger detail page.

228
Q
74	What is the value of x after the code segment executes?
	String x = 'A';
	Integer i = 10;
	if(i< 15 ){
	i = 15;
	x = 'B';
	else if (i < 20 ){
	x = 'C';
	}
	else {
	x = 'D';
	}
A. B
B. C
C. D
D. A
A

A. B

229
Q

75 When can a developer use a custom Visualforce page in a Force.com application?
Choose 2 answers

A. To create components for dashboards and layouts.
B. To deploy components between two organizations.
C. To generate a PDF document with application data.
D. To modify the page layout settings for a custom object.
A

A. To create components for dashboards and layouts.

C. To generate a PDF document with application data.

230
Q

76 Which statement about the Lookup Relationship between a Custom Object and a Standard Object is correct?

A. The Lookup Relationship on the Custom Object can prevent the deletion of the Standard Object.
B. The Lookup Relationship cannot be marked as required on the page layout for the Custom Object.
C. The Custom Object will be deleted when the referenced Standard Object is deleted.
D. The Custom Object inherits security from the referenced Standard Objects
A

A. The Lookup Relationship on the Custom Object can prevent the deletion of the Standard Object.

231
Q

77 A reviewer is required to enter a reason in the comments field only when a candidate is recommended to be hired.
Which action can a developer take to enforce this requirement?

A. Create a required comments field.
B. Create a formula field.
C. Create a validation rule.
D. Create a required Visualforce component.
A

C. Create a validation rule.

232
Q

78 The Sales Management team hires a new intern. The intern is not allowed to view Opportunities, but needs to see the Most Recent Closed Date of all child Opportunities when viewing an Account record.
What would a developer do to meet this requirement?

A. Create a Workflow Rule on the Opportunity object that updates a field on the parent Account.
B. Create a formula field on the Account object that performs a MAX on the Opportunity Close Date field.
C. Create a roll-up summary field on the Account object that performs a MAX on the Opportunity Close Date field
D. Create a trigger on the Account object that queries the Close Date of the most recent Opportunities.
A

C. Create a roll-up summary field on the Account object that performs a MAX on the Opportunity Close Date field

233
Q

79 On which object can an administrator create a roll-up summary field?

A. Any object that is on the master side of a master-detail relationship.
B. Any object that is on the parent side of a lookup relationship.
C. Any object that is on the detail side of a master-detail relationship.
D. Any object that is on the child side of a lookup relationship.
A

A. Any object that is on the master side of a master-detail relationship.

234
Q

80 A Visualforce page has a standard controller for an object that has a lookup relationship to a parent object.
How can a developer display data from the parent record on the page?

A. By using SOQL on the Visualforce page to query for data from the parent record.
B. By using merge field syntax to retrieve data from the parent record.
C. By adding a second standard controller to the page for the parent record.
D. By using a roll-up formula field on the child record to include data from the parent record.
A

B. By using merge field syntax to retrieve data from the parent record.

235
Q

81 A developer needs to create a Visualforce page that will override standard Account edit button. The page will be used to validate the account’s address using a SOQL query. The page will also allow the user to make edits to the address.
Where would the developer write the Account address verification logic?

A. In a Controller Extension.
B. In a Custom Controller.
C. In a Standard Controller.
D. In a Standard Extension.
A

A. In a Controller Extension.

236
Q

82 A developer wants to list all of the Tasks for each Account on the Account detail page. When a Task is created for a Contact what does the developer need to do to display the Task on the related Account record?

A. Create an Account formula field that displays the Task information.
B. Nothing. The Task is automatically displayed on the Account page.
C. Create a Workflow Rule to relate the Task to the Contact's Account.
D. Nothing. The Task cannot be related to an Account and a Contact.
A

B. Nothing. The Task is automatically displayed on the Account page.

237
Q

83 What is a capability of a StandardSetController?
Choose 2 answers

A. It extends the functionality of a standard or custom controller
B. It allows pages to perform mass updates of records.
C. It allows pages to perform pagination with large record sets.
D. It enforces field -level security when reading large record sets.
A

B. It allows pages to perform mass updates of records.

C. It allows pages to perform pagination with large record sets.

238
Q

84 A developer has the following code.

	try
	{
	List nameList;
	Account a;
	String s = a.Name;
	nameList.add(s);
	}
	catch (ListException le)
	{
	System.debug('List Exception');
	}
	catch (NullPointerException npe)
	{
	System.debug('NullPointer Exception');
	}
	catch (Exception e)
	{
	System.debug('Generic Exception');
	}
	What message would be logged?
	A. No message is logged
	B. Generic Exception
	C. List Exception
	D. NullPointer Exception
A

D. NullPointer Exception

239
Q

85 Which statement about change set deployments is accurate?
Choose 3 answers

A. They can be used only between related organizations.
B. They require a deployment connection.
C. They use an all or none deployment model.
D They can be used to transfer Contact records.
E. They can be used to deploy custom settings data.
A

A. They can be used only between related organizations.
B. They require a deployment connection.
C. They use an all or none deployment model.
D They can be used to transfer Contact records.

240
Q

What happens if a change set is unable to complete?

A

A change set is deployed in a single transaction. If the deployment is unable to complete for any reason, the entire transaction is rolled back. After a deployment completes successfully, all changes are committed to your org and the deployment can’t be rolled back.

241
Q

What happens if a change set is unable to complete?

A

A change set is deployed in a single transaction. If the deployment is unable to complete for any reason, the entire transaction is rolled back. After a deployment completes successfully, all changes are committed to your org and the deployment can’t be rolled back.

242
Q

86 How would a developer use Schema Builder to delete a custom field from the Account object that was required for prototyping but is no longer needed?

A. Remove all the references In the code and then the field will be removed from Schema Builder.
B. Remove all references from the code and then delete the custom field from Schema Builder.
C. Mark the field for deletion in Schema Builder and then delete it from the declarative UI.
D. Delete the field from Schema Builder and then all references in the code will be removed.
A

B. Remove all references from the code and then delete the custom field from Schema Builder.

243
Q

87 What is an accurate statement about variable scope?
Choose 3 answers

A. Sub -blocks cannot reuse a parent block's variable name.
B. A variable can be defined at any point in a block.
C. Parallel blocks can use the same variable name.
D. Sub -blocks can reuse a parent block's variable name if its value is null.
E. A static variable can restrict the scope to the current block if its value is null.
A

A. Sub -blocks cannot reuse a parent block’s variable name.
B. A variable can be defined at any point in a block.
C. Parallel blocks can use the same variable name.

244
Q

88 When the value of a field in an account record is updated, which method will update the value of custom field in related opportunities?
Choose 2 answers

A. An Apex trigger on the Account object.
B. A Process Builder on the Account object.
C. A cross-object formula field on the Account object.
D. A Workflow Rule on the Account object.
A

A. An Apex trigger on the Account object.

B. A Process Builder on the Account object.

245
Q
89	A developer creates an Apex class that includes private methods.
	What can the developer do to ensure that the private methods can be accessed by the test class?
A. Add the TestVisible attribute to the Apex class.
B. Add the SeeAllData attribute to the test methods.
C. Add the SeeAllData attribute to the test class.
D. Add the TestVisible attribute to the Apex methods.
A

D. Add the TestVisible attribute to the Apex methods.

public class TestVisibleExample {
    // Private member variable
    @TestVisible private static Integer recordNumber = 1;
    // Private method
    @TestVisible private static void updateRecord(String name) {
        // Do something
    }
}
246
Q

90 Which scenario is invalid for execution by unit tests.

A. Executing methods for negative test scenario.
B. Executing methods as different users.
C. Loading test data in place of user input for Flows.
D. Load the standard Pricebook ID using a system method.
A

C. Loading test data in place of user input for Flows.

247
Q

91 A developer runs the following anonymous code block:
List acc = [SELECT Id FROM Account LIMIT 10];
Delete acc;
Database.emptyRecycleBin(acc);
system.debug(Limits.getDMLStatements()+ 1, 1 +Limits.getLimitDMLStatements());
What is the result?

A. 11, 150
B. 150, 2
C. 150, 11
D. 2, 150
A

D. 2, 150

248
Q

92 Where can custom roll-up summary fields be created using Standard Object relationships?
Choose 3 answers

A. On Account using Case records.
B. On Account using Opportunity records.
C. On Opportunity using Opportunity Product records.
D. On Quote using Order records.
E. On Campaign using Campaign Member records.
A

B. On Account using Opportunity records.
C. On Opportunity using Opportunity Product records.
E. On Campaign using Campaign Member records.

249
Q

93 A developer has following query
Contact c = [SELECT Id, FirstName, LastName, Email FROM Contact WHERE LastName = ‘Smith’];
What does the query return if there is no Contact with the last name “Smith”?

A. A Contact with empty values.
B. A Contact initialized to null.
C. An empty List of Contacts.
D. An error that no rows are found.
A

D. An error that no rows are found.

250
Q

94 What is an important consideration when in a multi-tenant environment?

A. Polyglot persistance provides support for a global, multilingual user base in multiple orgs on multiple instances
B. Governor limits prevent tenants from impacting performance in multiple orgs on the same instance
C. Unique domain names takes the place of namespace for code developed for multiple orgs for multiple instances
D.Org-wide data security determines whether other tenants can see data in multiple orgs on the same inst
A

B. Governor limits prevent tenants from impacting performance in multiple orgs on the same instance

251
Q

95 In the Lightning Component framework, which resource can be used to fire events?
Choose 2 answers

A. Visualforce controller options
B. Third-party web service code
C. Third-party Javascript code
D. Javascript controller actions
A

B. Third-party web service code

252
Q

96 What is the capability of formula fields?
Choose 3 answers

A. Display the previous value for the field using the PRIORVALUE function.
B. Return and display a field value from another object using a VLOOKUP function.
C. Determine which of three different images to display using IF function.
D. Generate the link using the HYPERLINK function using a specific record in a legacy system.
E. Determine if a datetime field has passed using the NOW function.
A

C. Determine which of three different images to display using IF function.
D. Generate the link using the HYPERLINK function using a specific record in a legacy system.
E. Determine if a datetime field has passed using the NOW function.

253
Q

97 In a single record, a user selects multiple values from a multi-select picklist.
How are the selected values represented in Apex?

A. As a String with each value separated by a comma.
B. As a List with each value as a element in the list.
C. As a String with each value separated by semi colon.
D. As a Set with each value as a element in the set.
A

C. As a String with each value separated by semi colon.

254
Q

98 What is the capability of Force.com IDE?
Choose 2 answers

A. Edit metadata components
B. Run Apex tests
C. Run debug logs
D. Roll back deployments
A

A. Edit metadata components

B. Run Apex tests

255
Q

99 A Hierarchy Custom Setting stores a specific URL for each profile in Salesforce.
Which statement can a developer use to retrieve the correct URL for the current user’s profile and display this Visualforce Page?

A. {$Setup.Url_Settings_c.Instance[Profile.Id].URL\_\_c}
B. {!$Setup.Url_Settings_c.URL\_\_c}
C. {!$Setup.Url_Settings_c[Profile.Id,URL\_\_c}
D. {!$Setup.Url_Settings_c[$Profile.Id,URL\_\_c}
A

B. {!$Setup.Url_Settings_c.URL__c}

256
Q

100 A developer writes a SOQL query to find child records for a specific parent
How many specific levels can be returned in a single query?

A.3
B.5
C.1
D.7
A

C.1

257
Q

101 A developer needs to know if all tests currently pass in salesforce environment
Which feature can the developer use?
Choose 2 answers

A. Developer Console.
B. ANT Migration Tool
C. Salesforce UI Apex Test Execution
D. Workbench Metadata Retrieval
A

A. Developer Console.

C. Salesforce UI Apex Test Execution

258
Q

102 Which statement should a developer avoid using inside procedural loops?
Choose 2 answers

A. System.debug('Amount of CPU time (in ms) used so far: ' + Limits.getCpuTime());
B. update contactList;
C. List contacts = [select id, salutation, firstname, lastname, email from Contact where account =a.id;
D. if(o.accountid== aid)
A

B. update contactList;

C. List contacts = [select id, salutation, firstname, lastname, email from Contact where account =a.id;

259
Q

103 which statement would a developer use when creating test data for products and pricebooks?

	A.List objList = Test.loadData(Account.sObjectType,'myResource');
	B.Pricebook pb= new Pricebook();
	C.Id pricebookId=Test.getStandardPricebookId();
	D.IsTest(SeeAllData=false);
A

C.Id pricebookId=Test.getStandardPricebookId();

260
Q

104 How can a developer determine from the DescribeSObjectResult if the current user will be able to create record an object in apex?

A By using the hasAccess() Method.
B. By using the isCreatable() method.
c. By using the isInsertable() method.
D. By using the canCreate() method.
A

B. By using the isCreatable() method.

261
Q

105 What is a valid statement about Apex classes and interfaces?
Choose 2 answers

	A. Exception classes must end with the word exception.
	B. A class can have multiple levels of inner classes.
	C. The default modifier for a class is private.
	D. The default modifier for an interface is private.
A
A. Exception classes must end with the word exception.
C. The default modifier for a class is private.
262
Q

106 The sales management team requires that the Lead Source field of the Lead record be populated when a Lead is converted.
What would a developer use to ensure that a user populates the Lead Source field prior to converting a Lead?

A. Process builder
B. Validation rule
C. Formula field
D. Workflow rule
A

B. Validation rule

263
Q

107 A developer created an Apex trigger using the Developer Console and now wants to debug code.
How can the developer accomplish this in the Developer Console?

A. Open the Logs tab in the Developer Console.
B. Select the Override Log Triggers checkbox for the trigger.
C. Add the user name in the Log Inspector.
D. Open the Progress tab in the Developer Console.
A

A. Open the Logs tab in the Developer Console.

264
Q

108 What are the supported content sources for custom buttons and links?
(Choose 2 Answers)

	A. VisualForce Page.
	B. Static Resource.
	C. URL.
	D. Chatter File.
	E. Lightning Page.
A

A. VisualForce Page.

C. URL.

265
Q

109 What actions types should be configured to display a custom success message?

A. Update a record.
B. Post a feed item.
C. Delete a record.
D. Close a case.
A

A. Update a record.

266
Q

110 When creating a record with a Quick Action, what is the easiest way to post a feed item?

A. By selecting create case feed on the quick action.
B. By adding a trigger on the new record.
C. By adding a workflow rule on the new record.
D. By selecting create case feed on the new record.
A

A. By selecting create case feed on the quick action.

267
Q

111 What is the easiest way to verify a user before showing them sensitive content?

A. Sending the user a SMS message with a passcode.
B. Calling the generateVerificationUrl method in apex.
C. Sending the user an Email message with a passcode.
D. Calling the Session.forcedLoginUrl method in apex.
A

B. Calling the generateVerificationUrl method in apex.

268
Q

112 What features are available when writing apex test classes?
(Choose 2 Answers)

A. The ability to select error types to ignore in the developer console.
B. The ability to write assertions to test after a @future method.
C. The ability to set and modify the CreatedDate field in apex tests.
D. The ability to set breakpoints to freeze the execution at a given point.
E. The ability to select testing data using csv files stored in the system.
A

B. The ability to write assertions to test after a @future method.
C. The ability to set and modify the CreatedDate field in apex tests.

269
Q

113 What does the user see when accessing the custom page?

public class myController {
public string myString;

public string getMyString(){
return ‘getMyString’;
}

public string getStringMethod1(){
return myString;
}

public string getStringMethod2(){
if(myString == null)
myString = 'Method2';
return myString;
}
}

{!MyString}, {!StringMethod1}, {!StringMethod2}, {!MyString}

A

D. getMyString„ Method2, getMyString

270
Q

114 Which is a valid way of loading external Javascript files into a VisualForce page?
Choose 2 answers

A Using a  tag
B Using an <apex:includeScript> tag
C Using a <link> tag
D Using an <apex:define> tag
A

A Using a tag

<apex:includeScript></apex:includeScript>

271
Q

115 A developer needs to ensure there is sufficient test coverage for an Apex method that interacts with Accounts. The developer needs to create test data.

What is the preffered way to load this test data into Salesforce?

A By using documents
B By using WebServicesTesting
C By using static resources
D By using HttpCalloutMocks
A

C By using static resources

272
Q

116 How would a developer determine if a CustomObject__c record has been manually shared with the current user in Apex?

A By calling isShared() method for the record
B By calling the profile settings of the current user
C By querying CustomObject\_\_share
D By querying the role hierarchy
A

C By querying CustomObject__share

273
Q

117 What is the benefit of the Lightining Component Framework?

A Better performance for custom Salesforce Mobile apps
B More pre-builts components to replicate the salesforce look and feel
C More centralized control via server-side logic
D Better integration with Force.com sites
A

B More pre-builts components to replicate the salesforce look and feel

274
Q

118 What is a capability of the Developer Console?

A Execute Anonymous apex code, Create/Edit code, view Debug logs.
B Execute Anonymous apex code, Run REST API, create/Edit code.
C Execute Anonymous apex code, Run REST API, deploy code changes.
D Execute Anonymous apex code, Create/Edit code, deploy code changes.
A

A Execute Anonymous apex code, Create/Edit code, view Debug logs.

275
Q

119 Where would a developer build a managed package?

A Unlimited Edition
B Developer Edition
C Developer Sandbox
D Partial Copy Sandbox
A

B Developer Edition

276
Q

120 The Review_c object has a lookup relationship up to the Job_Application_c object. The job_Application_c object has a master-detail relationship up to the Position_ object. The relationship field names are based on the auto-populated defaults What is the recommended way to display field data from the related Review_c records on a Visualforce for a single Position_c record?

A Utilize the Standard Controller for Position_c and cross-object Formula Fields on the Job_Application c object to display Review_c data.
B Utilize the Standard Controller for Position_c and a Controller Extension to query for Review _C data.
C Utilize the Standard Controller for Position_c and expression syntax in the Page to display related Review c data through the Job_Application_c object.
D Utilize the Standard Controller for Position_c and cross-object Formula Fields on the Review_c object to display Review_c data.
A

B Utilize the Standard Controller for Position_c and a Controller Extension to query for Review _C data.

277
Q
7. Visualforce components are similar to which type of tag library containing tag namespace prefixes?
 ASP tag library
 JSP tag library
 ASP log file
 DL JSP log file
A

JSP tag library

Visualforce tags are similar to the JSP tag library that carry the metadata information.

278
Q
  1. Which of these statements are true about the “view state” inspector? Select all that apply.

Shows components contributing to view state
Must be enabled on a user profile
Is displayed only when using
Is controlled by the Role Hierarchy

A

Shows components contributing to view state
Must be enabled on a user profile
Is displayed only when using

Explanation:
The “view state” inspector displays components contributing to it only when the tag is used. It must be enabled on a user profile.

279
Q
  1. What type of a programming language is Apex? Select all that apply.

Object-oriented
On-Demand
Water-Fall
Declarative-Specific

A

Object-oriented
On-Demand

Explanation:
Just like Java, Apex is also an object oriented programming language. With its Cloud compatibility, it has now become an on-demand programming language.

280
Q
  1. What must the controller for a Visualforce page utilize to override the standard Opportunity view button?
    The Opportunity StandardController for pre-built functionality
    The StandardSetController to support related lists for pagination
    A constructor that initializes a private Opportunity variable
    A callback constructor to reference the StandardController
A

A constructor that initializes a private Opportunity variable

Explanation:
We can override the standard functionality of the standard buttons through Visualforce pages which use the same object’s standard controller.

281
Q
  1. A person who does not have “View Encrypted Data” permission will see the field with masked characters. Assuming the field is in the page layout, what happens if he tries to edit the value by clicking on the Edit button?
    The field will not appear in the edit layout.
    The user will see only masked characters, but can enter a new value and save it.
    It will throw an error on changing that field and saving it.
    He can see the original value and he can save the record.
A

The user will see only masked characters, but can enter a new value and save it.

282
Q
  1. A custom object has an organization-wide default setting of “Private” with Grant Access Using Hierarchies turned off. Which users can select the Sharing button on records for that object?

Only the record owner and a user with the System Administrator profile
The record owner, a user with the System Administrator profile, and a user shared to the record
The record owner, a user shared to the record, any user above the record owner in the role hierarchy, and a user with the System Administrator profile
The record owner, a user above the record owner in the role hierarchy, and a user with the System

A

The record owner, a user with the System Administrator profile, and a user shared to the record

Explanation:
Since the Grant Access using Hierarchies is un-checked, no user above the owner of the record in role hierarchy will be able to see the record.x000D__x000D Users below the owner of the record in the role hierarchy are not allowed to see it anyway.x000D__x000D OWD is private, hence only owners have the access to see the record.

283
Q
  1. Which of these statements is true for encrypted custom fields? Select all that apply.

Encrypted fields can be included in Search results.
Encrypted fields can be included in report results.
Encrypted fields are not available in filters for list views, reports, and Roll-up summary fields.
Encrypted fields are not available for validation rules or Apex scripts.

A

Encrypted fields can be included in Search results.
Encrypted fields can be included in report results.
Encrypted fields are not available in filters for list views, reports, and Roll-up summary fields.

Explanation:
For security purposes, Salesforce provides encryption fields to store information. These fields have their own features. For more detail, refer the Salesforce reference documents: _x000D_https://help.salesforce.com/HTViewHelpDoc?id=fields_about_encrypted_fields.htm&language=en_US

284
Q
  1. Which one of the following is not possible to view in the Debug Logs?
Workflow formula evaluation results
Assignment rules
Formula field calculations
Validation rules
Resources used by Apex Script
A

Workflow formula evaluation results
Formula field calculations
Resources used by Apex Script

Explanation:
Debug Logs record details for Apex, Visualforce pages, Callouts, and other entities but do not capture certain items such as JavaScript and formula fields.

285
Q
  1. Dashboard refresh can be monitored using:

Apex jobs
Scheduled jobs
Dashboard jobs
Report jobs

A

Scheduled jobs

Explanation:
Users with the View Setup and Configuration permission can view all the dashboards scheduled to refresh for your organization on the All Scheduled Jobs page. To view the All Scheduled Jobs page, go to Setup, enter Scheduled Jobs in the Quick Find box, and select Scheduled Jobs.

286
Q
  1. Each setSavepoint() and rollback statement counts against the total number of DML statements.

True/False?

A

True

Explanation:
These actions add up to the Governor Limits. So you should be careful while using them.

287
Q
  1. Where would you find identical Force.com IDs?

Production and Full Copy Sandbox only
Production and Dev Sandbox only
Two developer orgs
Two Sandbox orgs

A

Production and Full Copy Sandbox only

288
Q
  1. When would a developer use a custom controller instead of a controller extension? Select all that apply.

When a Visualforce page needs to replace the functionality of a standard controller
When a Visualforce page needs to add new actions to a standard controller
When a Visualforce page does not reference a single primary object
When a Visualforce page should not enforce permissions or field-level security

A

When a Visualforce page needs to replace the functionality of a standard controller
When a Visualforce page does not reference a single primary object

Explanation:
Use custom controllers when you don’t require the standard functionalities of the object or if the page references more than one primary object.

289
Q
  1. Universal Containers tracks reviews as a custom object in a recruiting application. The interview score is tracked on each review record and should have a numerical value, so that hiring managers can calculate scores. The scores should be restricted to integer values 1 through 5 and displayed as a set of radio buttons. How can a developer meet this requirement?

Create the Interview score field as a picklist, displayed as a radio button on page layout
Create a formula field that displays the interview score as a set of radio buttons
Create the interview score field with a data type of radio button
Create a Visualforce page to display the interview score as a set of radio buttons

A

Create a Visualforce page to display the interview score as a set of radio buttons

Explanation:
Radio buttons cannot be created in Salesforce using standard functionality. A Visualforce page is needed to show radio buttons on the page.

290
Q
  1. Universal Containers wants to create a custom order management application that allows users to enter order details such as the Product Name and Product Code. The application should be able to check if these values are consistent with the valid Product Name and Product Code combinations set up in a custom object. Which feature would a developer use to accomplish this?

A validation rule with the REGEX function
A formula field with the VALIDATE function
A validation rule with the VLOOKUP function
A formula field with the IF function

A

A validation rule with the VLOOKUP function

Explanation:
VLOOKUP can be used to validate data with the records in a custom object.

291
Q
  1. Where can custom roll-up summary fields be created using Standard Object relationships? Select all that apply.

On Opportunity using Opportunity Product records
On Account using Case records
On Campaign using Campaign Member records
On Account using Opportunity records

A

On Opportunity using Opportunity Product records
On Campaign using Campaign Member records
On Account using Opportunity records

Explanation:
Custom roll-up summary fields can be created using Standard Object relationships on Opportunity using Opportunity Product records, on Campaign using Campaign Member records, and on Account using Opportunity records.

292
Q
  1. A developer is creating an application to track engines and their components. An individual component can be used in different types of engines. What data model should be used to track the data and to prevent orphan records?

Create a junction object to relate many engines to many parts through a master-detail relationship
Create a lookup relationship to represent how each part relates to the parent engine object
Create a master-detail relationship to represent the one-to-many model of engines to parts
Create a junction object to relate many engines to many parts through a lookup relationship
Explanation:
Since an engine can have multiple parts and a component can be a part of multiple engines, a Junction object needs to be created.

A

Create a junction object to relate many engines to many parts through a master-detail relationship

Explanation:
Since an engine can have multiple parts and a component can be a part of multiple engines, a Junction object needs to be created.

293
Q
  1. A developer created an Apex Trigger using the Developer Console and now wants to debug the code. How can the developer accomplish this in the Developer Console?
    Select the Override Log Triggers checkbox for the Trigger
    Open the Progress tab in the Developer Console
    Open the Logs tab in the Developer Console
    Add the user name in the Log Inspector
A

Select the Override Log Triggers checkbox for the Trigger

Explanation:
Select the Override Log Triggers checkbox for the Trigger to get the Debug Logs out.

294
Q
  1. Which of the following can be done using the Force.com platform? Select all that apply.

Data-warehousing
Applications with clicks and not code
Applications can be upgraded without loss of customization
Code version control system

A

Applications can be upgraded without loss of customization
Code version control system

Explanation:
The Force.com platform provides a code version control system. It also allows you to upgrade applications without losing customizations.

295
Q
  1. A developer created an Apex Trigger using the Developer Console and now wants to debug the code. How can the developer accomplish this in the Developer Console?
    Select the Override Log Triggers checkbox for the Trigger
    Open the Progress tab in the Developer Console
    Open the Logs tab in the Developer Console
    Add the user name in the Log Inspector
A

Open the Logs tab in the Developer Console

296
Q
  1. Which of the following will you use for browsing objects and fields in the Force.com IDE? Select all that apply.

Force.com Projects
Schema Explorer
Development Work Area
Debug View

A

Force.com Projects
Schema Explorer

Explanation:
When using the Force.com IDE, we have to create a project, import the database, and build schema in the IDE itself.x000D__x000D Schema Explorer can also be used to check the schema of the object.

297
Q
  1. A developer creates an Apex class that includes private methods. What can the developer do to ensure that the private methods can be accessed by the test class?
    Add the TestVisible attribute to the Apex class
    Add the SeeAllData attribute to the test methods
    Add the @TestVisible attribute to the Apex methods
    Add the SeeAllData attribute to the test class
A

Add the @TestVisible attribute to the Apex methods

298
Q
  1. A developer creates an Apex class that includes private methods. What can the developer do to ensure that the private methods can be accessed by the test class?
    Add the TestVisible attribute to the Apex class
    Add the SeeAllData attribute to the test methods
    Add the @TestVisible attribute to the Apex methods
    Add the SeeAllData attribute to the test class
A

Add the @TestVisible attribute to the Apex methods

299
Q

escapeSingleQuotes(stringToEscape)

A

Returns a String with the escape character () added before any single quotation marks in the String s.

300
Q

escapeSingleQuotes(stringToEscape)

A

Returns a String with the escape character () added before any single quotation marks in the String s.

301
Q

Are tests automatically run in non-production orgs?

A

By default, no tests are run in a deployment to a non-production organization, such as a sandbox or a Developer Edition organization. To specify tests to run in your development environment, set a testLevel deployment option. For example, to run local tests in a deployment and to exclude managed package tests, set testLevel on the DeployOptions object to TestLevel.RunLocalTests. Next, pass this object as an argument to the deploy() call as follows.

The RunLocalTests test level is enforced regardless of the contents of the deployment package. In contrast, tests are executed by default in production only if your deployment package contains Apex classes or triggers. You can use RunLocalTests for sandbox and production deployments.

302
Q

What can you use to run unit test methods?

A

To verify the functionality of your Apex code, execute unit tests. You can run Apex test methods in the Developer Console, in Setup, in the Force.com IDE, or using the API.

303
Q

Testing Best Practices:

A

Unit tests must cover at least 75% of your Apex code, and all of those tests must complete successfully.
Note the following.
When deploying Apex to a production organization, each unit test in your organization namespace is executed by default.
Calls to System.debug are not counted as part of Apex code coverage.
Test methods and test classes are not counted as part of Apex code coverage.
While only 75% of your Apex code must be covered by tests, don’t focus on the percentage of code that is covered. Instead, make sure that every use case of your application is covered, including positive and negative cases, as well as bulk and single records. This approach ensures that 75% or more of your code is covered by unit tests.
Every trigger must have some test coverage.
All classes and triggers must compile successfully.
If you are running many tests, consider the following:
In the Force.com IDE, increase the Read timeout value for your Apex project. See https://developer.salesforce.com/page/Apex_Toolkit_for_Eclipse for details.
In the Salesforce user interface, test the classes in your organization individually, instead of using the Run All Tests button to run them all together.