PD1 Flashcards

1
Q

An Org has a single account named ’NoContacts’ that has no related contacts. Given the query: List accounts = [Select ID, (Select ID, Name from contacts) from Account where Name= “NoContacts’];

a) Accounts[0] is Null.
b) Accounts[0] contacts is invalid Apex.
c) accounts[0] contacts is an empty list.
d) A QueryException is thrown

A

a) Accounts[0] is Null

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

What are three ways for a developer to execute tests in an org? choose 3 answers

a) Bulk API
b) MetaData API
c) Tooling API
d) Developer console
e) Setup menu

A

a) Bulk API
b) MetaData API
d) Developer console

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

Which approach should be used to provide test data for a test class?

a) Use a test data factory class to create test data
b) Query for existing records in the database
c) Access data in @TestVisible class variables
d) Execute anonymous code blocks that create data.

A

a) Use a test data factory class to create test data

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

When should an apex Trigger be required instead of a process builder process?

a) When an action needs to be taken on a delete or undelete, or before a DML operation is executed
b) When a record needs to be created
c) When a post to chatter needs to be created
d) When multiple records related to the triggering record need to be updated

A

a) When an action needs to be taken on a delete or undelete, or before a DML operation is executed

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

Which set of roll-up types are available when creating a roll up summary field?

a) COUNT, SUM, MIN, MAX
b) AVERAGE, COUNT, SUM, MIN, MAX
c) AVERAGE, SUM, MIN, MAX
d) SUM, MIN, MAX

A

a) COUNT, SUM, MIN, MAX

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

Which three declarative fields are correctly mapped to variable types in Apex? Choose 3 answers

a) Number maps to integer
b) Textarea maps to list of type String
c) Checkbox maps to Boolean
d) Date/Time maps to Datetime
e) Number maps to Decimal

A

a) Number maps to integer
c) Checkbox maps to Boolean
d) Date/Time maps to Datetime

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

Using the schema builder, a developer tries to change the API name of a field that is referenced in an Apex Test Class. What is the end results?

a) The API name of the field is changed, and a warning is issued to update the class
b) The API name of the field and the reference in the test class is updated
c) The API name of the field and the reference in the test class is changed
d) The API name is not changed and there are no other impacts.

A

a) The API name of the field is changed, and a warning is issued to update the class

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

Why would a developer consider using a custom controller over a controller extension?

a) To increase the SOQL query governor’s limits
b) To leverage built-in functionality of a standard controller
c) To enforce user sharing settings and permissions
d) To implement all of the logic for a page and bypass default salesforce functionality

A

d) To implement all of the logic for a page and bypass default salesforce functionality

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

Which two platform features allow for the use of unsupported languages? Choose 2 answers.

a) App.json
b) Docker
c) Heroku ACM
d) Buildpacks

A

b) Docker

c) Heroku ACM

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

. A developer writes the following code:
List acc= [SELECT id FROM Account LIMIT 10];
Delete acc;
Database.emptyRecyclebin(acc);
System.Debug(Limits.getDMLStatemnets()+’,’+ Limits.getLimitDMLStatements());
What is the result of the debug statement?
a) 1,150
b) 2,200
c) 1,100
d) 2,150

A

d) 2,150

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

A developer created a visualforce page and a custom controller with methods to handle different buttons and events that can occur on the page. What should the developer do to deploy to production?

a) Create a test page that provides coverage of the custom controller
b) Create a test class that provides coverage of the visualforce page
c) Create a test class that provides coverage of the custom controller
d) Create a test page that provides coverage of the visualforce page

A

c) Create a test class that provides coverage of the custom controller

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

A developer needs to create a visualforce page that displays case data. The page will be used by both support reps and support managers. The support rep profile does not allow visibility of the customer_Satisfaction_c Field, but the support manager profile does. How can the developer create the page to enforce field level security and keep future maintenance to a minimum?

a) Create one visualforce page for use by both profiles
b) Use a new support manager permission sets
c) Create a separate visualforce page for each profile
d) Use a custom controller that has the with sharing keywords

A

d) Use a custom controller that has the with sharing keywords

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

A developer executes the following query in Apex to retrieve a list of contacts for each account:
List accounts = [ Select ID, Name, (Select ID, Name from Contacts) from Account];
Which two exceptions may occur when it executes? Choose 2 answers
a) SOQL query limit exception due to the number of queries
b) CPU limit exception due to the complexity of the query
c) SOQL query limit exception due to the number of contacts
d) SOQL query limit exception due to the number of accounts

A

c) SOQL query limit exception due to the number of contacts

d) SOQL query limit exception due to the number of accounts

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

Which three options allow a developer to use stylesheets?

a) A static resource
b) tag
c) tag
d) Inline CSS
e) tag

A

a) A static resource
b) tag
e) tag

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

A platform developer needs to write an apex method that will only perform an action if a record is assigned to a specific Record Type. Which two options allows the developer to dynamically determine the ID of the required Record Type by its name? Choose 2 answers

a) Hardcode the ID as a constant in an Apex class
b) Execute a SOQL query on the RecordType Object
c) Use the getRecordTypeInfosByName()method in the DescribeSObjectResult Class.
d) Make an outbound web service call to the SOAP API.

A

b) Execute a SOQL query on the RecordType Object

c) Use the getRecordTypeInfosByName()method in the DescribeSObjectResult Class.

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

Which SOQL query successfully returns the Accounts grouped by name?

a) Select type, Max(CreatedDate) FROM Account GROUP BY Name
b) Select Name, Max(CreatedDate) FROM Account GROUP BY Name
c) Select Id, type, Max(CreatedDate) FROM Account GROUP BY Name
d) Select type, Name Max(CreatedDate) FROM Account GROUP BY Name LIMIT 5

A

b) Select Name, Max(CreatedDate) FROM Account GROUP BY Name

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

Which approach should a developer use to add pagination to a visualforce page?

a) The extension attribute for a page
b) A standardController
c) The action attribute for a page
d) A StandardSetController

A

d) A StandardSetController

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

A Developer needs to test an invoicing system integration. After reviewing the numbers of transaction required for the test, the developer estimates that the test data will total about 2GB of data storage. Production data is not required for integration testing. Which two environments meet the requirements for testing? Choose 2 answers

a) Full sandbox
b) Developer sandbox
c) Developer Pro Sandbox
d) Developer Edition
e) Partial Sandbox

A

a) Full sandbox

e) Partial Sandbox

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

How should a developer prevent a recursive trigger?

a) Use a private Boolean variable
b) Use a “one trigger per object” pattern.
c) Use a trigger handler
d) Use a static Boolean variable

A

d) Use a static Boolean variable

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

What is a capability of the Tag that is used for loading external javascript libraries in lightning components? Choose 3 answers

a) Loading scripts in parallel
b) One-time loading from duplicate scripts
c) Loading files from documents
d) Specifying loading order
e) Loading externally hosted scripts

A

a) Loading scripts in parallel
b) One-time loading from duplicate scripts
d) Specifying loading order

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

What is a requirement for a class to be used as a custom visualforce controller?

a) Any top-level Apex class that has a constructor that returns a PageReference
b) Any top-level Apex class that implements the controller interface
c) Any top-level Apex class that has a default, no-argument constructor
d) Any top-level Apex class that extends a PageReference

A

d) Any top-level Apex class that extends a PageReference

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

The operation manager at a construction company uses a custom object called Machinery to manage the usage and maintenance of its cranes and other machinery. The manager wants to be able to assign machinery to different construction jobs, and track the dates and cost associated with each job. More than one piece of machinery can be assigned to one construction job. What should a developer do to meet these requirements?

a) Create a lookup field on the machinery object to the construction job object
b) Create a junction object with Master-Detail Relationship to both the machinery object and the construction job object.
c) Create a lookup field on the construction job object to the machinery object
d) Create a Master-Detail lookup field on the machinery object to the construction job object

A

c) Create a lookup field on the construction job object to the machinery object

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

Which three tools can deploy metadata to productions? Choose 3 answers.

a) Data Loader
b) Change set from sandbox
c) Change set from developer org
d) Force.com IDE
e) Metadata API

A

b) Change set from sandbox
d) Force.com IDE
e) Metadata API

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

How should a developer create a new custom exception class?

a) Public class CustomException extends Exception{}
b) CustomException ex = new (CustomException) Exception();
c) (Exception) CustomException ex = new Exception();
d) Public class CustomException implements Exception{}

A

a) Public class CustomException extends Exception{}

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

Which two number expression evaluate correctly? Choose 2 answers

a) Integer I = 3.14159;
b) Decimal D = 3.14159;
c) Long I = 3.14159;
d) Double D =3.14159;

A

b) Decimal D = 3.14159;

d) Double D =3.14159;

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

What are the eight officially supported languages on the Heroku Platform?

a) Lisp, PHP, Node, Ruby, Scala, Haskell, Go, Erlang
b) C#, C++, Node, Ruby, Java, PHP, Go,.Net
c) Node, Ruby, Java, PHP, Python,. Net, C++
d) Node, Ruby, Java, PHP, Python,Go, Scala, Clojure.

A

d) Node, Ruby, Java, PHP, Python,Go, Scala, Clojure.

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

A developer wrote a unit test to confirm that a custom exception works properly in a custom controller, but the test failed due to an exception being thrown. What steps should the developer take to resolve the issue and properly test the exception?

a) Use the finally block within the unit test to populate the exception
b) Use database methods with all or none set to False
c) Use try/catch within the unit test to catch the exception
d) Use Test.isRunningTest() within the custom Controller

A

c) Use try/catch within the unit test to catch the exception

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

A developer has the controller class below:
Public with sharing class myFooController {
Public integer prop { get; private set;}
}
Which code block will run successfully in an execute anonymous window?
a) myFooController m = new myFooControler ();\
System.asseert(m.prop==null);
b) myFooController m = new myFooControler ();\
System.asseert(m.prop==1);
c) myFooController m = new myFooControler ();\
System.asseert(m.prop==0);
d) myFooController m = new myFooControler ();\
System.asseert(m.prop=!null);

A

a) myFooController m = new myFooControler ();\

System.asseert(m.prop==null);

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

What is a benefit of using an after insert trigger over using a before insert trigger?

a) An after insert trigger allows a developer to bypass validation rules when updating fields on the new records
b) An after insert trigger allows a developer to make a callout to an external service.
c) An after insert trigger allows a developer to insert other objects that reference the new records
d) An after insert trigger allows a developer to modify fields in the new record without a query.

A

c) An after insert trigger allows a developer to insert other objects that reference the new records

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

While writing a test class that covers an OpportunityLineItem trigger, a Developer is unable to create a standard Pricebook since one already exist in the org. how should the developer overcome this problem?

a) Use @IsTest(SeeAllData=true) and delete the existing standard Pricebook.
b) Use @TestVisible to allow the test method to see the standard Pricebook.
c) Use Test.getStandardPricebbokId()to get the standard Pricebook ID.
d) Use Test.loaddata() and a Static Resource to load a standard Pricebook

A

c) Use Test.getStandardPricebbokId()to get the standard Pricebook ID.

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

What is the correct invocation to push code to the app sushi-prod from the command line?

a) Heroku push - - app sushi-prod
b) git push master
c) Heroku git push master
d) git push heroku master - - app sushi-prod

A

d) git push heroku master - - app sushi-prod

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

When an Account’s custom picklist field called Customer Sentiment is changed to a value of “Confused,” a new related Cases should automatically be created. Which two methods should a developer use to create this case? Choose two answers

a) Process Builder
b) Custom Button
c) Apex Trigger
d) Workflow Rule

A

a) Process Builder

c) Apex Trigger

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

How can a developer set up a debug log on a specific user?

a) Ask the user for access to their account credentials, log in as the user and debug the issue.
b) Create apex code that logs code actions into a custom object
c) It is not possible to setup debug lots for users other than yourself.
d) Set up a trace flag for the user, and define a logging level and time period for the trace

A

d) Set up a trace flag for the user, and define a logging level and time period for the trace.

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

A developer is asked to set a Picklist field to ‘Monitor’ on any new Leads owned by a subset of Users. How should the developer implement this request?

a) Create a lead Workflow Rule Field Update
b) Create an after insert Lead trigger
c) Create a Lead formula field
d) Create a before insert lead Trigger

A

a) Create a lead Workflow Rule Field Update

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

When viewing a Quote, the sales representative wants to easily see how many discounted items are included in the Quote Line Items. What should a developer do to meet this requirement?

a) Create a workflow rule on the Quote Line Item Object that updates a field on the parent Quote when the item is discounted
b) Create a roll-up summary field on the Quote Object that performs a SUM on the Quote Line Item Quantity field, filtered for only discounted Quote Line Items.
c) Create a Trigger on the Quote Object that queries the Quantity filed on discounted Quote Line Items
d) Create a formulat field on the Quote Object that performs a SUM on the Quote Line Item Quantity field, filtered for only discounted Quote Line Items.

A

b) Create a roll-up summary field on the Quote Object that performs a SUM on the Quote Line Item Quantity field, filtered for only discounted Quote Line Items.

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

A visualforce interface is created for Case Management that includes both standard and custom functionality defined in an Apex class called myControllerExtension. The visualforce page should include which attribute(s) to correctly implement controller functionality?

a) standardController = “case” and extensions =” myControllerExtension”
b) extensions=” myControllerExtension”
c) controller=” myControllerExtension”
d) controller = “case” and extensions =” myControllerExtension”

A

a) standardController = “case” and extensions =” myControllerExtension”

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

Which two strategies should a developer use to avoid hitting governor limits when developing in a multi-tenant environment? Choose two answers

a) use variables within Apex classes to store large amounts of data
b) use collections to store all fields from a related object and not just minimally required fields
c) use methods from the “LIMITS” class to monitor governor limits
d) use SOQL for loops to iterate data retrieved from queries that return a high number of rows

A

a) use variables within Apex classes to store large amounts of data
b) use collections to store all fields from a related object and not just minimally required fields

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

Which statement results in an Apex compiler error?

a) Map imap = new map ([Select ID from Lead Limit 8]);
b) List s = List { ‘a’,’b’,’c’};
c) Integer a=5, b=6,c,d=7;
d) Date D1 = Date.Today(), d2 = DATE.ValueOf(‘2018-01-01’);

A

b) List s = List { ‘a’,’b’,’c’};

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

How should a developer avoid hitting the governor limits in test methods?

a) Use Test.startTest() to reset governor limits
b) Use @TestVisible on methods that creates records
c) Use @IsTest (SeeAllData=true) to use existing data
d) Use Test.loadData() to load data from a static resource.

A

a) Use Test.startTest() to reset governor limits

40
Q

. A newly hired developer discovers that there are multiple triggers on the case object. What should the developer consider when working with triggers?

a) Trigger execution order is not guaranteed for the same sObject
b) Trigger execution order is based on creation date and time
c) Unit test must specify the trigger being tested.
d) Developers must dictated the order of the trigger execution

A

d) Developers must dictated the order of the trigger execution

41
Q

What are three characteristics of static methods? Choose 3 answers

a) Initialized only when a class is loaded
b) A static variable is available outside of the cope of an Apex transaction
c) Allowed only in outer classes
d) Allowed only in inner classes
e) Are Not transmitted as part of the view state for a Visualforce page

A

a) Initialized only when a class is loaded
c) Allowed only in outer classes
e) Are Not transmitted as part of the view state for a Visualforce page

42
Q

A developer is asked to create a PDF quote document formatted using the company’s branding guidelines, and automatically save it to the Opportunity record. Which two ways should a developer create this functionality? Choose 2 answers

a) Create a visualforce page with custom styling
b) Crate a visual flow that implements the company’s formatting
c) Install an application from the AppExchange to generate documents.
d) Create an email template and use it in Process builder.

A

a) Create a visualforce page with custom styling

c) Install an application from the AppExchange to generate documents.

43
Q
. A method is passed a list of generic sObjects as a parameter. What should the developer do to determine which object type(Account, Lead, Or Contact, for example) to cast each sObject?
A)	Use the getSObjectName method on the sObject class to get the sObject name
B)	Use a try-catch construct to cast the sObject into one of three sObject Types
C)	Use the getSObjectType method on each generic sObject to retrieve the sObject Token
D)	Use the first three characters of the sObject ID to determine the sObject Type.
A

C) Use the getSObjectType method on each generic sObject to retrieve the sObject Token

44
Q

Before putting an app into production, which step should be taken?

a) Run the production check feature via the web interface
b) Switch to a production database
c) Insure that you have installed a performance introspection add-on
d) Scale your dynos

A

a) Run the production check feature via the web interface

45
Q

What are two benefits of the lightning component framework? Choose 2 answers

a) It allows faster PDF generation with lightning components
b) It simplifies complexity when building pages, but not applications
c) It provides an event-driven architecture for better decoupling between components
d) It promotes faster development using out-of-the-box components that are suitable for desktop and mobile devices.

A

c) It provides an event-driven architecture for better decoupling between components
d) It promotes faster development using out-of-the-box components that are suitable for desktop and mobile devices.

46
Q

What should a developer use to implement an automatic Approval Process Submission for Cases?

a) A workflow rule
b) Process builder
c) Scheduled Apex
d) An Assignment rule

A

b) Process builder

47
Q

. Which tool allows a developer to send requests to the salesforce REST APIs ad view the responses?

a) Developer Console REST tab
b) REST resource Path URL
c) Workbench Rest Explorer
d) Force.com IDE REST Explorer Tab

A

c) Workbench Rest Explorer

48
Q

A developer working on a time management application wants to make total hours for each timecard available to application user. A timecard entry has a Master- Detail relationship to a timecard. Which approach should the developer use to accomplish this declaratively?

a) A roll-up Summary field on the Timecard Object that calculates the total hours from timecard entries for that timecard
b) A process builder process that updates a field on the timecard when a timecard entry is created
c) An apex trigger that sues an aggregate query to calculate the hours for a given timecard and stores it in a custom field.
d) A visualforce page that calculates the total number of hours for a timecard and displays it on the page.

A

b) A process builder process that updates a field on the timecard when a timecard entry is created

49
Q

A developer encounters APEX heap limit errors in a trigger. Which two methods should the developer use to avoid this error? Choose 2 answers.

a) Use SOQL for loops instead of assigning large queries results to a single collection and looping through the collection
b) Query and store fields from related object in a collection when updating related objects
c) Remove or set collection to null after use
d) Use the transient keyword when declaring variables.

A

a) Use SOQL for loops instead of assigning large queries results to a single collection and looping through the collection
d) Use the transient keyword when declaring variables.

50
Q

Where can a developer identify the time taken by each process in request using Developer console log inspector.

a) Save order tab under Execution Overview panel
b) Performance Tree tab under Stack Tree Panel
c) Timeline tab under Execution Overview panel
d) Execution tree tab under Stack Tree Panel

A

c) Timeline tab under Execution Overview panel

51
Q

What are two features of Heroku Connect?
Choose 2 answers
a) Real time sync between salesforce and Postgres
b) Bidirectional sync, allowing data to be written into SFDC
c) Near Real Time Sync between Heroku Postgres and Salesforce
d) Displaying data from an external data store via External Objects

A

a) Real time sync between salesforce and Postgres

b) Bidirectional sync, allowing data to be written into SFDC

52
Q

A developer needs to display all of the available fields for an object. In which two ways can the developer retrieve the available fields if the variable myObject represents the name of the object? Choose 2 answers.

a) Use getGlobalDescribe()get(myObject).getDescribe().fields.getmap () to return a map of fields
b) Use schema.describeSObjects(new String[] {myObject}[0].fields.getMap() to return a map of fields
c) Use SObjectType.myObejct.fields.getMap() to return a map of fields.
d) Use myObejct.sObjectType.getDescribe().fieldSet() to return a set of fields.

A

a) Use getGlobalDescribe()get(myObject).getDescribe().fields.getmap () to return a map of fields
b) Use schema.describeSObjects(new String[] {myObject}[0].fields.getMap() to return a map of fields

53
Q

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 set with each value as an element in the set
b) As a list with each value as an element in the list
c) As a string with each value separated by a semi colon
d) As a string with each value separated by a semi comma

A

c) As a string with each value separated by a semi colon

54
Q

Which approach should a developer take to automatically add a” Maintenance Plan” to each opportunity that includes an “Annual Subscription” when an opportunity is closed?

a) Build an OpportunityLineItem trigger that adds a PriceBookEntry Record
b) Build an Opportunity trigger that to add OpportunityLineItem Record
c) Build an Opportunity trigger that adds PriceBookEntry Record
d) Build an OpportunityLineItem trigger to add OpportunityLineItem Record

A

d) Build an OpportunityLineItem trigger to add OpportunityLineItem Record

55
Q

What are two uses of External IDS? Choose 2 answers

a) To prevent an import from creating duplicate records using Upsert
b) To identify the sObject type in Salesforce
c) To create a record in a development environment with the same salesforce ID as in another environment
d) To create relationships between records imported from an external system.

A

c) To create a record in a development environment with the same salesforce ID as in another environment
d) To create relationships between records imported from an external system.

56
Q

What are two valid options for iterating through each Account in the collection List named AccountList? Choose 2 answers.
a) for (Integer i=0; i

A

a) for (Integer i=0; i

57
Q

. Which three options can be accomplished with formula fields?

a) Generate a link using the HIPERLINK function to a specific record in a legacy system
b) Determine if a datetime field has passed using the NOW function
c) Determine which of three different images to display using IF function
d) Return and display a field value from another object using the VLOOKUP function
e) Display the previous value for a field using the PRIORVALUE function

A

a) Generate a link using the HIPERLINK function to a specific record in a legacy system
b) Determine if a datetime field has passed using the NOW function
c) Determine which of three different images to display using IF function

58
Q

Which two platform features align to the controller portion of MVC architecture

a) Standard Objects
b) Workflow Rules
c) Apex Rules
d) Field updates

A

b) Workflow Rules

c) Apex Rules

59
Q

A Developer wants to override a button using visualforce on an object. What is the requirement?

a) The object record must be instantiated in a controller or extension
b) The standardController attribute must be set to the object
c) The controller or extension must have a PagerReference Method
d) The Action attribute must be set to a controller method

A

c) The controller or extension must have a PagerReference Method

60
Q
Which two Apex data types can be used to reference a Salesforce record ID Dynamically? Choose two answers
a)	ENUM
b)	External ID
c)	sObject
d)
A

a) ENUM

61
Q

A developer created a lightning component name accountList.cmp that display a list of Accounts. Client-side logic that is executed when a user hovers over an account in the list should be stored in which bundle member?

a) accountListHelper.js
b) accountListRenderer.js
c) accountList.renderer
d) accountList.helper

A

a) accountListHelper.js

62
Q

A developer is creating a test coverage for a class and needs to insert records to validate functionality. Which method annotation should be used to create records for every method in the test class?

a) @BeforeTest
b) @isTest(SeeAllData=True)
c) @TestSetup
d) @PreTest

A

c) @TestSetup

63
Q
. Given the code block:
Integer x;
For(x=0;x<10; x+=2)
{
If(x==8) break;
If(x==10) break;
}
System.debug(x);
Which value will the system debug statement display?
A)	2
B)	10
C)	8
D)	4
A

C) 8

64
Q

A developer has a unit test that is failing. To identify the issue, the developer copies the code inside the test method and executes it via the Execute Anonymous Apex Tool. The code then executes without failing. Why did the unit test failed, but not the Execute Anonymous?

a) The test method has a syntax error in the code.
b) The test method relies on existing data in the database
c) The test method use a try/catch block
d) The test method calls an @future method.

A

b) The test method relies on existing data in the database

65
Q

What are two testing consideration when deploying code from a sandbox to production? Choose 2 answers
A) 75% of test must execute without failure
B) 100% of test must execute without failure
C) Apex code requires 75% coverage
D) Apex code requires 100% coverage

A

B) 100% of test must execute without failure

C) Apex code requires 75% coverage

66
Q

A developer tasked with creating a schema to track Movies, Actors, and contracts. A single movie can have many contracts and a single actor can have many contracts. Each contract is owned and actively managed by a single user. Which schema should be created to enable user to easily manage the contract they own; without requiring access to the movie or the actor records?

a) A master detail relationship to the movie object and a lookup relationship to the actor object
b) A lookup relationship to the movie object and a lookup relationship to the actor object
c) A lookup relationship to the movie object and a master detail relationship to the actor object
d) A master detail relationship to the movie object and a master detail relationship to the actor object

A

b) A lookup relationship to the movie object and a lookup relationship to the actor object

67
Q

When would the use of Heroku Postgres be appropriate?

a) To interconnect Microsoft SQL Servers to Heroku Applications
b) To store and retrieve data using the Structured Query Language
c) To store user generated pictures and word documents
d) To cache commonly accessed data for faster retrieval

A

b) To store and retrieve data using the Structured Query d) To cache commonly accessed data for faster retrieval

68
Q

What are two considerations for converting a lookup to a Master-detail relationship? Choose 2 answers

a) All the null values in the lookup field will be replaced by default values.
b) The organisation wide default changes to controlled by parent
c) If there are existing records with a null value in the lookup field, an error will occur.
d) The organisation wide defaults changes to pubic read/write

A

a) All the null values in the lookup field will be replaced by default values.
c) If there are existing records with a null value in the lookup field, an error will occur.

69
Q

What are two correct examples of the model in the salesforce MVC architecture? Choose 2 answers.

a) Custom field on the custom wizard_c object
b) Standard lightning component
c) Workflow rule on the contact object
d) Standard account lookup on the contract object

A

a) Custom field on the custom wizard_c object

c) Workflow rule on the contact object

70
Q

How can a custom type be identified as unique when added to a set?

a) The class must have a method with the @invocableMethod annotation
b) The class must implement the equals and hashcode methods
c) Methods in the class must be static
d) Methods in the class must be global

A

b) The class must implement the equals and hashcode methods

71
Q

A developer has created a visualforce page and apex controller that uses the with sharing keyword. The page will be used by sales managers and should only display account owned by sales representative who report to the running sales manager. The organisation wide sharing for account is set to private. Which additional set of steps should the developer take?

a) Create one profile, one permission set, and one role.
b) Create two profile, one permission set, and one role.
c) Create one profile, one permission set, and two role.
d) Create one profile, two permission set, and one role.

A

c) Create one profile, one permission set, and two role.

72
Q

What should a developer use to post a message on chatter when a picklist field called Status_c on a custom object Application_c is set to “Approved”?

a) Use a workflow rule and use the “Post to Chatter” Action when the record meets the criteria.
b) Use connectAPI from Scheduled Apex.
c) Use the streaming API to post to chatter
d) Use Process Builder to post to chatter based on meeting the required criteria.

A

d) Use Process Builder to post to chatter based on meeting the required criteria.

73
Q

A developer created a lightning component to display a short text summary for an object and wants to use it with multiple Apex Classes. How should the developer design the Apex Classes?

a) Have each class define method getTextSummary() that returns the summary.
b) Extend each class from the same base class that has a method getTextSummary() that returns the summary.
c) Have each class define method getObject() that returns the sObject that is controlled by the Apex Class.
d) Have each class implement an interface that definds method getTextSummary() that returns the summary.

A

d) Have each class implement an interface that definds method getTextSummary() that returns the summary.

74
Q

In which two org types can a developer create new Apex Classes? Choose 2 answers

a) Developer Edition
b) Sandbox
c) Enterprise Edition
d) Unlimited

A

a) Developer Edition

b) Sandbox

75
Q

Which two are true regarding a Dyno? Choose 2 answers

a) Is a light weight VM used to run code on the Heroku Platform
b) Has the ability to sleep as a standard and performance Dyno
c) Is a lightweight Linux container used in a collection to run Heroku applications
d) Has Ephemeral filesystems and is rebooted every 24 hours.

A

c) Is a lightweight Linux container used in a collection to run Heroku applications
d) Has Ephemeral filesystems and is rebooted every 24 hours.

76
Q

What can a developer use to determine if the core Apex code exceeds any governor limits in a test class during bulk execution?

a) Limits, startTest, stopTest
b) @TestSetup
c) @TestVisible
d) @Test.getDMLStatements()

A

d) @Test.getDMLStatements()

77
Q

A developer is asked to write negative test as part of the unit testing for a method that calculates a person’s age based on birth date. What should the negative test includes?

a) Assert that a null value is accepted by the method
b) Assert that future dates are rejected by the method
c) Throwing a custom exception in the unit test.
d) Assert that past dates are accepted by the method.

A

c) Throwing a custom exception in the unit test.

78
Q

Universal containers(US) has an integration with its Accounting System that creates tens of thousands of Orders inside Salesforce in a nightly batch. US wants to add automation that can attempt to match Leads and Contacts to these orders using the email address field on the insert. Us is concerned about the performance of the automation with a large data volume. Which tool should UC use to automate this process?

a) Workflow Rules
b) Apex
c) Process Builder with an Autolaunched Flow
d) Process Builder

A

c) Process Builder with an Autolaunched Flow

79
Q

A developer needs to avoid potential system problems that can arise in a multi-tenant architecture. Which requirement helps prevent poorly written applications from being deployed to a production environment?

a) All validation rules must be active before they can be deployed
b) SOQL queries must reference sObjects with their appropriate namespace
c) All Apex Code must be annotated with the with sharing keyword
d) Unit tests must cover at least 75% of the application’s Apex code.

A

d) Unit tests must cover at least 75% of the application’s Apex code.

80
Q

A visualforce page is written with the following controller and extensions:

<p></p>

The extension class myExtension has a public save()method.
Which save method or methods will be used by the visualforce page?
a) The save method from the controller extension
b) Both – the standardController first, then myExtension
c) Both – the myExtension first, the standardController
d) The save method from the standardController

A

b) Both – the standardController first, then myExtension

81
Q

Which tool can deploy destructive changes to apex classes in production?

a) Workbench
b) Salesforce setup
c) Change Sets
d) Developer Console

A

a) Workbench

82
Q

A user selects a value from a multi-select picklist. How is this selected value represented in Apex?

a) As a string ending with a comma
b) As a string
c) As a list with one element
d) As a set with one element

A

a) As a string ending with a comma

83
Q

What are two considerations for deciding to use a roll up summary field?

a) Roll-up summary fields do not cause validation rules on the parent object unless that object is edited separately
b) Roll-up cannot be performed on formula fields
c) Roll-up cannot be performed on formula fields that use cross-object reference or on-the-fly-calculation such as Now().
d) Roll up summary can be performed on formulate fields but if their formulate contains an #error results, it may affect the summary.

A

a) Roll-up summary fields do not cause validation rules on the parent object unless that object is edited separately
d) Roll up summary can be performed on formulate fields but if their formulate contains an #error results, it may affect the summary.

84
Q

. Which two queries can a developer use in a visualforce controller to protect against SOQL injection Vulnerabilities? Choose 2 answers
a) String qryName = ‘%’ + String.enforceSecurityChecks(name)+ ‘%’;
String qryString = ‘SELECT Id FROM Contact WHERE Name LIKE :qryNAme’;
List queryResults = Database.query(qryString);
b) String qryName = ‘%’ + name ‘%’;
String qryString = ‘SELECT Id FROM Contact WHERE Name LIKE :qryNAme’;
List queryResults = Database.query(qryString);
c) String qryName = ‘%’ + String.escpaeSingleQuotes(name)+ ‘%’;
String qryString = ‘SELECT Id FROM Contact WHERE Name LIKE :qryNAme’;
List queryResults = Database.query(qryString);
d) String qryString = ‘SELECT Id FROM Contact WHERE Name LIKE :qryNAme’;
List queryResults = Database.query(qryString);

A

a) String qryName = ‘%’ + String.enforceSecurityChecks(name)+ ‘%’;
String qryString = ‘SELECT Id FROM Contact WHERE Name LIKE :qryNAme’;
List queryResults = Database.query(qryString);

c) String qryName = ‘%’ + String.escpaeSingleQuotes(name)+ ‘%’;
String qryString = ‘SELECT Id FROM Contact WHERE Name LIKE :qryNAme’;
List queryResults = Database.query(qryString);

85
Q

A sales manager wants to make sure that whenever an opportunity stage is changed to “Closed Won,” a new case will be created for the support team to collect necessary information from the customers. How should a developer accomplish this?

a) Create a process builder to create the new cases.
b) Set up a validation rule on the opportunity stage
c) Create a lookup field to the case object on the opportunity object.
d) Create a workflow rule.

A

a) Create a process builder to create the new cases.

86
Q

What is the return data type when ApexPages.currentPage().getParameters() is used to retrieve URL parameters from a visualforce controller?

a) Map
b) List
c) Enum
d) String[]

A

a) Map

87
Q

A developer needs to write a method that searches for a phone number that could be on multiple object types. Which method should the developer use to accomplish this task?

a) SOQL Query that includes ALL ROWS
b) SOQL query on each object
c) SOSL Query that includes ALL ROWS
d) SOSL query on each object

A

c) SOSL Query that includes ALL ROWS

88
Q

Users report multiple intermittent errors and unexpected results when saving a record. Upon investigation, the developer finds that trigger are executing more than one. What is a potential solution to solve this situation?

a) Use a one trigger per object approach
b) Use a static variable to check if the trigger has already run.
c) Disable all triggers and use workflow rule…..
d) Use private ….

A

a) Use a one trigger per object approach

89
Q

Which type of controller should a developer use to include a list of related records for a custom object record on a visualforce page without needing additional test coverage?

a) Custom Controller
b) List Controller
c) Controller Extension
d) Standard Controller

A

c) Controller Extension

90
Q

Which two are two regarding Apache Kafka on Heroku? Choose 2 answers

a) Is a messaging backbone for building distributed applications
b) Is an add-on that creates a long term data store
c) Is a distributed commit log for communication between services
d) Is designed to move small volume of ephemeral data

A

a) Is a messaging backbone for building distributed applications
c) Is a distributed commit log for communication between services

91
Q

What does the context variable Trigger.old represent in an update operation?

a) The same values of Trigger.new
b) The current values of the records firing the trigger
c) The previous version values of the records firing the trigger
d) A map of IDs to the Old version of the records

A

d) A map of IDs to the Old version of the records

92
Q

Heroku Dynos

A

lightweight, isolated environments that provide compute, memory, an OS, and an ephemeral filesystem, Dynos are isolated, virtualized Linux containers that are designed to execute code based on a user-specified comman

93
Q

Heroku Redis

A

key-value data store, Heroku Redis lets you gain greater visibility into performance, better manage your instances with a powerful CLI and easily federate data with

94
Q

Apache Kafka

A

is a distributed commit log for fast, fault-tolerant communication between producers and consumers using message based topics. Kafka provides the messaging backbone for building a new generation of distributed applications capable of handling billions of events and millions of transactions.

95
Q

Heroku Connect

A

Using bi-directional synchronization between Salesforce and Heroku Postgres,