wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

SF D1

Total questions: 60

Worksheet time: 1hrs 28mins

Name
Class
Date
1.

There

is a requirement to validate that the country code of an account field is a

valid ISO code. There are over 200 codes. What could be used for this

validation?

a)

Before Update trigger on Account

b)

Validation Rule

c)

Formula Field

d)

After Update trigger on Account

2.

A requirement has been given to display the average value of won opportunities on the Account page layout. How can this be best achieved?

a)

Use a trigger on the opportunity object

b)

Use a trigger on the account object

c)

Use roll-up summary fields and a formula field

d)

Use a roll-up summary field with the average function

3.

How can a developer check if the current user is able to delete the current object?

a)

Use the isDeletable() method of the DescribeSObjectResult Class

b)

Use the canDelete() method of the DescribeSObjectResult Class

c)

Use the Deletable() method of the SObjectResult Class

d)

Use the canDelete() method of the SObjectResult Class

4.

An organization has enabled Multiple Currencies. A developer needs to calculate the total of the Estimated_value__c on CampaignMember object using a roll-up summary field on Campaign object named Total_estimated_value__c. What will be the currency of the Total_estimated_value__c field?

a)

The field values in Estimated_value__c from CampaignMember object are converted into the currency of the current user, and the Total_estimated_value__c is shown using the currency of the current user on the Campaign.

b)

The field values in Estimated_value__c from CampaignMember object are summed up, and the Total_estimated_value__c field is shown as a Number field on the Campaign.

c)

The field values in Estimated_value__c are converted into the currency of the majority of the CampaignMember records, and the Total_estimated_value__c is shown using that currency.

d)

The field values in Estimated_value__c from CampaignMember object are converted into the currency of the Campaign, and the Total_estimated_value__c is shown using the currency of the Campaign.

5.

String

is one of the primitive data types in Salesforce. Given the following

options, what is a valid value that a string data type variable can

contain?

a)

‘Salesforce’

b)

3.14159

c)

TRUE

d)

"Salesforce"

6.

The following code snippet fails during bulk data load. What is the root cause?

a)

No update DML over list of Contacts

b)

SOQL query is located inside the for loop code.

c)

Condition is invalid and will always be null.

d)

Variable 'con' is not declared.

7.

A developer can develop code to insert records that will allow successful inserts and will record errors for unsuccessful records. This is called partial processing. However, this method will not throw an exception. How should a developer handle the possible exceptions?

a)

Use Database.EachResult Class

b)

Use Database.SuccessResult Class

c)

Use Database.SaveResult Class

d)

Use Database.ErrorResult Class

8.

Which

of the following are valid Apex data types?

Choose 3 answers.

a)

Currency

b)

Text

c)

ID

d)

Enum

e)

Blob

9.

What is the order of execution when a record is saved?

a)

System Validation Rules, Workflow Rules, All Validation Rules, Before Triggers, After Triggers, Assignment Rules, Commit

b)

System Validation Rules, Before Triggers, All Validation Rules, Duplicate Rules, After Triggers, Assignment Rules, Workflow Rules, Commit

c)

System Validation Rules, Before Triggers, All Validation Rules, Workflow Rules, After Triggers, Assignment Rules, Commit

d)

System Validation Rules, User Defined Validation Rules, Before Triggers, Workflow Rules, After Triggers, Workflow Rules, Assignment Rules, Commit

10.

Which of these methods are valid ways to initialize a list? Choose 3 answers

a)

List<Account> accList = new Account[]{};

b)

List<Account> new = ‘accList’;

c)

Account[] accList = new Account[]{};

d)

List<Account> accList = new List<Account>();

11.

If a developer needs to skip to the next iteration of a loop, what loop control structure should be used?

a)

continue;

b)

end;

c)

break;

d)

skip;

12.

What will be the result of an unhandled exception on any DML statements?

a)

A savepoint will be generated

b)

There is no impact on DML statements

c)

DML statements will be saved up to the exception point

d)

DML statements will be rolled back

13.

Which of the following statements are true about using a SOQL for loop to process records in Apex code?

Choose 2 answers.

a)

SOQL for loop can be used to avoid the limit on heap size

b)

SOQL for loop can only be used to execute code once per sObject record

c)

Using a SOQL for loop, it is possible to perform a DML operation on a list of sObjects at a time

d)

A SOQL for loop can process records in batches of 500

14.

An assignment statement is any statement that places a value into a variable. Which one of the following expressions is a valid Apex assignment statement?

a)

String a = new String(‘sampleString’);

b)

Map<Id, Account> = [SELECT Id, Name FROM Account];

c)

Account acc = new Account();

d)

List<Contact> conList = new [SELECT Id FROM Contact];

15.

Apex and Visualforce pages are prone to data access control issues. Which approach helps address these issues?

a)

Use the [with sharing] keyword in Apex classes

b)

Use the [without sharing] keyword in Apex classes

c)

Use the [shareable] keyword in Apex classes

d)

Use the [non shareable] keyword in Apex classes

16.

How can a developer query a multi-select picklist?

Choose 2 answers.

a)

Semicolon and comma characters can be used to add filters for the multi-select picklist field to the SOQL query

b)

Picklist values can be specified with AND / OR logic

c)

Picklist values can only be specified with AND logic

d)

Picklist values can only be specified with OR logic

17.

Which of the following are true regarding custom setting data? Choose 2 answers.

a)

Custom setting data can be accessed by formula fields, validation rules, Apex and Visualforce pages

b)

Custom setting data cannot be queried using SOQL

c)

Custom setting data needs to be queried once using SOQL and then it is stored in the cache

d)

There are two types of custom setting data, hierarchy and list

18.

What are some of the limitations of changing the data type of a custom field?

Choose 3 answers.

a)

Developers cannot change the data type of a custom field if it is referenced in Apex.

b)

Developers cannot change the data type of a custom field that is referenced by a Visualforce page.

c)

The file field type in Salesforce Knowledge can be changed as long as it is not referenced in a Apex Class.

d)

The option to change the data type of a custom field is not available for all data types.

19.

A developer would like to display a Visualforce page from a custom button on the Account page layout. Which of the following is true in regards to this?

Choose 2 answers.

a)

Custom Buttons can only be used with custom objects

b)

Custom Buttons can only be added to custom page layouts

c)

Custom Buttons will work with standard or custom objects

d)

Custom Buttons can be added to standard page layouts

20.

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

a)

By accessing the content from Chatter files

b)

By uploading the content as a Static Resource

c)

By uploading the content to the documents tab

d)

By accessing the content from a third-party CDN

21.

A VisualForce page uses a custom Apex controller class. An ID parameter value was passed to the URL. How can a developer retrieve the record using this value?

a)

Use ApexPages.currentPage().getAnchor() to get the parameter value then make a query to the record using the ID in the controller's constructor.

b)

Use ApexPages.currentPage().getHeaders() to get the parameter value then make a query to the record using the ID in the controller's constructor.

c)

Use ApexPages.currentPage().getParameters() to get the parameter value then make a query to the record using the ID in the controller's constructor.

d)

Use ApexPages.currentPage().getContent() to get the parameter value then make a query to the record using the ID in the controller's constructor.

22.

Which iteration components can be used to display a table of data in a Visualforce page?

Choose 2 answers.

a)

<apex:outputTable>

b)

<apex:pageBlockTable>

c)

<apex:dataTable>

d)

<apex:table>

23.

What is true regarding the View State in a Visualforce Page?

a)

There is no limit to the size of the view state

b)

The view state is used to store the layout of a Visualforce page

c)

The view state is used to store state across multiple pages, such as in a wizard

d)

The view state is used to store state across multiple user sessions

24.

A developer is required to embed a website into a Visualforce page. What Visualforce component can the developer use?

a)

<apex:output>

b)

<apex:getsite>

c)

<apex:include>

d)

<apex:iframe>

25.

Support agents of Cosmic Service Solutions use a custom console app in Lightning Experience to manage multiple records on a single screen. A developer has created a Visualforce page that allows users to input data related to cases. Which of the following actions are supported for overriding with the Visualforce code in the console app?

Choose 2 answers.

a)

Delete

b)

View

c)

Edit

d)

Create

26.

What are the ways a developer can include Javascript in a Visualforce page?

Choose 2 answers.

a)

<script>

b)

<apex:includeScript>

c)

<javascript>

d)

<apex:js>

27.

Which of the following best describe the Lightning Component framework? Choose 2 answers.

a)

It uses ODS as its data format

b)

It has an event-driven architecture

c)

It automatically upgrades all pre-existing Visualforce pages and components

d)

It is device-aware and supports cross-browser compatibility

28.

A team of developers would like to create a commercially available Force.com app. In this case, which environments would be used?

Choose 2 answers.

a)

A Developer Edition

b)

A Partial Copy Sandbox

c)

A Developer Pro Sandbox

d)

A Partner Developer Edition

29.

Sending and receiving change sets can be done between which of the following?

Choose 2 answers.

a)

Developer Edition to Developer Edition

b)

Developer Edition to Production.

c)

Developer Sandbox to Production.

d)

Sandbox to Sandbox.

30.

Before deploying to production, what is true?

Choose 3 answers.

a)

Testing cannot be completed in a developer edition

b)

APEX Code must have sufficient code coverage

c)

Development must be done in a developer edition or sandbox

d)

It is a best practice to test in a dedicated testing environment with large sets of data

31.

When test data cannot be created programmatically, how can pre-existing data be accessed?

a)

Annotate the test class or method with [seeAllData=false]

b)

Annotate the test class or method with [seeAllData=true]

c)

Annotate the test method with [withSharing=false]

d)

Annotate the test method with [withSharing=true]

32.

A developer has found that test data creation is duplicated across test classes. How can this be eliminated?

a)

Creating common test utility classes

b)

De-annotating @isTest on methods

c)

Using one common test class

d)

Making the test methods Public

33.

What static methods are used when testing governor limits, executing test scenarios with a larger data set or if creating an additional set of governor limits during the execution of a single test class is necessary?

a)

Test.isTest() and Test.isnotTest()

b)

Test.runAs() and Test.getLimits()

c)

Test.startTest() and Test.stopTest()

d)

Test.setFixedSearchResults()

34.

Test methods don’t have access by default to pre-existing data in the organization except for which of the following?

Choose 3 answers.

a)

Custom Setting data

b)

Profiles

c)

Custom Objects

d)

Users

e)

Record Types

35.

Which of the following is a best practice when writing test classes?

a)

Use SeeAllData=true.

b)

Use System.debug() method to verify test results.

c)

Use @future annotation.

d)

Use System.assert() methods to verify test results.

36.

You need to deploy an Apex class and test class to a production org but only have limited time. You decide to run selected tests. Which of the following are true about running selected tests?

Choose 2 answers.

a)

Individual test methods can also be specified.

b)

Running selected or specified tests is only available in Metadata API.

c)

If the code coverage of an Apex component in the deployment is less than 75%, the deployment fails.

d)

Code coverage is computed for each class and trigger individually and is different than the overall coverage percentage.

37.

A developer is selecting and running the same set of test classes repeatedly. What feature can help with making this task more efficient?

a)

Defining a test suite

b)

Defining a test set

c)

Defining a master test class

d)

Reducing the number of test classes

38.

What are valid use cases for the AppExchange?

Choose 2 answers.

a)

To exchange apps with other developers

b)

To exchange ideas and tips with other developers

c)

To extend standard Salesforce functionality

d)

To add industry specific functionality to Salesforce

39.

Record types have been defined on the Account object. What does this mean?

Choose 2 answers.

a)

Different page layouts can be assigned for each record type

b)

Different picklist values can be defined for each record type

c)

Different fields can be defined for each record type

d)

Different users can be assigned to each record type

40.

Which of the following are true regarding developing in the Salesforce multi-tenant environment?

Choose 2 answers.

a)

Salesforce delivers polyglot persistence transparently

b)

It is not possible to index application data as each tenant stores different types of data in the same application table

c)

Queries need to be selective in terms of the number of records returned

d)

The custom domain feature ensures that different customers do not access each other's data

41.

What is true regarding Person Accounts?

Choose 3 answers.

a)

Person Accounts have the same fields as a business account

b)

Person Accounts do not have an account hierarchy

c)

Once Person Accounts are enabled they cannot be disabled

d)

If Person Accounts are enabled, when creating an account, the type of account to create needs to be selected

42.

How can the relationship between different accounts be recorded and viewed?

Choose 2 answers.

a)

Using the Related Account field

b)

Using the Parent Account field

c)

Using the View Hierarchy link

d)

Using the Generate Relationship function

43.

Which of the following are valid Apex variables?

Choose 3 answers.

a)

Number x;

b)

Currency abc;

c)

Boolean y;

d)

Map<ID, String> sampleMap;

e)

String a,b,c;

44.

A developer needs to get the Contact records with a last name that starts with ‘Ab’. What code in the options below will satisfy his requirements?

a)

SELECT Id, LastName FROM Contact WHERE LastName LIKE ‘Ab_’

b)

SELECT Id, LastName FROM Contact WHERE LastName := ‘Ab%’

c)

SELECT Id, LastName FROM Contact WHERE LastName IN (‘Ab’)

d)

SELECT Id, LastName FROM Contact WHERE LastName LIKE ‘Ab%’

45.

Which data type is appropriate for a numerical value of 726.234 stored in the variable totalCost?

a)

Integer totalCost;

b)

Decimal totalCost;

c)

Numeric totalCost;

d)

Long totalCost;

46.

Which of the following field types can a Roll-Up Summary field calculate?

a)

Picklist

b)

Checkbox

c)

Text

d)

Number

47.

How can a dynamic SOQL query be created at runtime using input from an end user?

a)

Use the SOQL.execute(string) with a query specified in the string

b)

Use the Database.search(string) with a query specified in the string

c)

Use the Database.execute(string) with a query specified in the string

d)

Use the Database.query(string) with a query specified in the string

48.

What method can be used to obtain metadata information about all the sObjects in an organization and their fields?

a)

describeObjects()

b)

getGlobalSObjects()

c)

getGlobalDescribe()

d)

describeSObjects()

49.

What is the discretionary clause that can be added to a SOSL query to specify the information to be returned in the text search result?

a)

ORDER by

b)

OFFSET n

c)

RETURNING

d)

LIMIT n

50.

A developer is considering writing a trigger to perform data validation before saving a record. What other options can be used for data quality checks?

Choose 3 answers.

a)

Picklists

b)

Required fields

c)

Escalation rules

d)

Validation rules

51.

Which of the following code snippets are acceptable to be included within a looping statement?

Choose 2 answers.

a)

insert accountList;

b)

System.debug(‘The following account has been updated’ + ‘acc.Id ‘);

c)

if(acc.NumberOfEmployees > 5000){

d)

Opportunity getOpp = [SELECT Id, AccountId FROM Opportunity WHERE AccountId =: acc.Id];

52.

What will be the result of running the following code?

a)

A limit exception will be caught and one account will be inserted

b)

150 accounts will be inserted

c)

No accounts will be inserted

d)

201 accounts will be inserted

53.

A developer is required to override the standard Opportunity view button using a Visualforce page. What should the developer do?

a)

Use a controller extension

b)

Use the Opportunity StandardController

c)

Use a custom controller and replicate the opportunity detail page

d)

Use the StandardListController

54.

The following code snippet fails during bulk data load. What is the root cause?

a)

No update DML over list of Contacts

b)

SOQL query is located inside the for loop code.

c)

Condition is invalid and will always be null.

d)

Variable 'con' is not declared.

55.

A developer is required to access Opportunity records on a Visualforce page without using a custom controller. How can the developer satisfy this requirement?

a)

<apex:page controller="Opportunity" recordListVar="opportunities">

b)

<apex:page controller="Opportunity" recordSetVar="opportunities">

c)

<apex:page standardController="Opportunity" recordSetVar="opportunities">

d)

<apex:page standardController="Opportunity" getAllRecordsVar="opportunities">

56.

A developer has written the following code to do a SOSL search: FIND {New York}. What will be returned?

a)

A map of sObjects that match the search term

b)

A list of Contacts that match the search term

c)

A list of lists of sObjects and their records that match the search term

d)

A map of Accounts or Contacts that match the search term

57.

What will happen if a governor limit is hit from an Apex class that was called from an Apex controller class of a VisualForce page? Choose 2 answers.

a)

An exception will be thrown.

b)

It will save all changes made from the Apex controller class.

c)

It will save all changes made from the Apex class.

d)

It will rollback all changes made up to the error.

58.

When catching exceptions, the default notification actions in uncaught exceptions will be lost, so developers are expected to formulate their own. Which of the following ways can a developer notify the user of the issue?

Choose 2 answers.

a)

Using .addError method on errors that may occur in DML on Apex Triggers.

b)

Sending an email that may add to the catch-block of a try-catch construct

c)

Adding a @future method to create a record on a custom object that could catch the error details.

d)

Using ApexPages.message class to create an error message for display on a Visualforce page.

59.

The Salesforce Administrator is building an application and needs to create a master detail relationship between the standard object Account and a custom object. What is true regarding the relationship?

Choose 2 answers.

a)

The custom object can be on the master or detail side of the relationship

b)

The standard object can be on the master or detail side of the relationship

c)

The standard object is always the master

d)

The object on the detail side will inherit the security and sharing settings of the master object

60.

Your company has a requirement to track the vehicles assigned to work orders. Vehicles can exist without Work Orders and have a record owner. What kind of relationship should be created between Work Orders and Vehicles?

a)

Hierarchy

b)

Picklist

c)

Lookup

d)

Master Detail