Set 2 Flashcards

1
Q

Given the following trigger implementation:

trigger leadTrigger on Lead (before update){
final ID BUSINESS_RECORDTYPEID = ‘012500000009Qad’;
for(Lead thisLead : Trigger.new){
if(thisLead.Company != null && thisLead.RecordTypeId != BUSINESS_RECORDTYPEID){
thisLead.RecordTypeId = BUSINESS_RECORDTYPEID;
}
}
}

The developer receives deployment errors every time a deployment is attempted from Sandbox to Production.
What should the developer do to ensure a successful deployment?
A. Ensure the deployment is validated by a System Admin user on Production.

B. Ensure BUSINESS_RECORDTYPEID is retrieved using Schema.Describe calls.

C. Ensure a record type with an ID of BUSINESS_RECORDTYPEID exists on Production prior to deployment.

D. Ensure BUSINESS_RECORDTYPEID is pushed as part of the deployment components.

A

C

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q
Which three statements are true regarding custom exceptions in Apex? (Choose three.)
A. A custom exception class name must end with "Exception".

B. A custom exception class cannot contain member variables or methods.

C. A custom exception class must extend the system Exception class.

D. A custom exception class can implement one or many interfaces.

E. A custom exception class can extend other classes besides the Exception class.

A

A, C, D

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

What is the order of operations when a record is saved in Salesforce?
A. Workflow, process flows, triggers, commit

B. Workflow, triggers, process flows, commit

C. Triggers, workflow, process flows, commit

D. Process flows, triggers, workflow, commit

A

C

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

In the following example, which sharing context will myMethod execute when it is invoked?
A. Sharing rules will not be enforced for the running user.

B. Sharing rules Ml be enforced for the running user.

C. Sharing rules will be inherited from the calling context.

D. Sharing rules Ail be enforced by the instantiating class

A

C

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

What are two ways for a developer to execute tests in an org?
A. Tooling API

B. Bulk API

C. Developer console

D. Matadata API

A

A, C

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

Universal Containers wants to back up all of the data and attachments in its Salesforce org once month. Which approach should a developer use to meet this requirement?
A. Use the Data Loader command line.

B. Define a Data Export scheduled job.

C. Create a Schedulable Apex class.

D. Schedule a report.

A

B

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

A team of many developers work in their own individual orgs that have the same configuration at the production org. Which type of org is best suited for this scenario?
A. Developer Sandbox

B. Developer Edition

C. Full Sandbox

D. Partner Developer Edition

A

A

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

What is the value of the Trigger.old context variable in a Before Insert trigger?
A. An empty list of sObjects

B. null

C. A list of newly created sObjects without IDS

D. Undefined

A

B

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

A developer of Universal Containers is tasked with implementing a new Salesforce application that must be able to by their company’s Salesforce administrator.
Which three should be considered for building out the business logic layer of the application? Choose 3 answers
A. Scheduled Jobs

B. Invocable Actions

C. Process Builder

D. Workflows

E. validation Rules

A

C, D, E

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

A developer needs to join data received from an integration with an external system with parent records in Salesforce. The data set does not contain the Salesforce IDs of the parent records, but it does have a foreign key attribute that can be used to identify the parent.
Which action will allow the developer to relate records in the data model without knowing the Salesforce ID?
A. Create and populate a custom field on the parent object marked as an External ID.

B. Create a custom field on the child object of type Foreign Key

C. Create a custom field on the child object of type External Relationship.

D. Create and populate a custom field on the parent object marked as Unique

A

A

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

Refer to the following code that runs in an Execute Anonymous block:

for (List theseLeads : [SELECT LastName, Company, Email FROM Lead LIMIT 20000]) {
    for (Lead thisLead : theseLeads) {
        if (thisLead.Email == null) {
            thisLead.Email = assignGenericEmail(thisLead.LastName, thisLead.Company);
        }
    }
    Database.Update(theseLeads, false);
}

A. The total number of records processed as a result of DML statements will be exceeded

B. The total number of DML statements will be exceeded.

C. The total number of records processed as a result of DML statements will be exceeded.

D. In an environment where the full result set is returned, what is a possible outcome of this code?

E. The transaction will succeed and the first ten thousand records will be committed to the database.

A

A

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

what are the three languages used in the visualforce page?
A. Javascript, CSS, HTML

B. C++, CSS, query

C. Apex, Json, SQL

A

A

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

Which aspect of Apex programming is limited due to multitenancy?
A. The number of records returned from database queries

B. The number of active Apex classes

C. The number of methods in an Apex Class

D. The number of records processed in a loop

A

A

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q
How many accounts will be inserted by the following block ofcode? for(Integer i = 0 ; i <
500; i++) { Account a = new Account(Name='New Account ' + i); insert a; }
0
87. Boolean odk;
Integer x;
if(abok=false;integer=x;){
X=1;
}elseif(abok=true;integer=x;){
X=2;
}elseif(abok!=null;integer=x;){
X=3;
)elseif{
X=4;}
A. X=10

B. X=4

C. X=8

D. X=9

A

B

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q
//Example 1:
AggregateResult[] groupedResults = [SELECT CampaignId, AVG(Amount) FROM Opportunity GROUP BY CampaignId];

for (AggregateResult ar : groupedResults) {
System.debug(‘Campaign ID’ + ar.get(‘CampaignId’));
System.debug(‘Average Amount’ + ar.get(‘expr0’));
}

//Example 2:
AggregateResult[] groupedResults = [SELECT CampaignId, AVG(Amount) FROM Opportunity GROUP BY CampaignId];

for (AggregateResult ar : groupedResults) {
System.debug(‘Campaign ID’ + ar.get(‘CampaignId’));
System.debug(‘Average Amount’ + ar.get(‘theAverage’));
}

//Example 3:
AggregateResult[] groupedResults = [SELECT CampaignId, AVG(Amount) FROM Opportunity GROUP BY CampaignId];

for (AggregateResult ar : groupedResults) {
System.debug(‘Campaign ID’ + ar.get(‘CampaignId’));
System.debug(‘Average Amount’ + ar.get.AVG());
}

//Example 4:
AggregateResult[] groupedResults = [SELECT CampaignId, AVG(Amount) FROM Opportunity GROUP BY CampaignId];

for (AggregateResult ar : groupedResults) {
System.debug(‘Campaign ID’ + ar.get(‘CampaignId’));
System.debug(‘Average Amount’ + ar.theAverage);
}

Which two examples above use the system. debug statements to correctly display the results from the SOQL aggregate queries? Choose 2 answers
A. Example 1

B. Example 2

C. Example 3

D. Example 4

A

A, B

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

A developer created a Visualforce page and custom controller to display the account type field as shown below. Custom controller code:

public class customCtrlr{ 
private Account theAccount;
public String actType; 
public customCtrlr() { 
theAccount = [SELECT Id, Type FROM Account WHERE Id =
\:apexPages.currentPage().getParameters().get('id')]; actType = theAccount.Type; 
}
} 

Visualforce page snippet:
The Account Type is {!actType} The value of the account type field is not being displayed correctly on the page. Assuming the custom controller is property referenced on the Visualforce page, what should the developer do to correct the problem?
A. Add a getter method for the actType attribute.

B. Change theAccount attribute to public.

C. Convert theAccount.Type to a String.

D. Add with sharing to the custom controller.

A

A

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q
A developer must create a CreditcardPayment class that provides an implementation of an existing Payment class. Public virtual class Payment { public virtual void makePayment(Decimal amount) { /*implementation*/
} } Which is the correct implementation?
A. Public class CreditCardPayment implements Payment {
public virtual void makePayment(Decimal amount) { /*implementation*/ }
}
B. Public class CreditcardPayment extends Payment {
public override void makePayment(Decimal amount) { /*implementation*/ }
}
C. Public class CreditCardPayment implements Payment {
public override void makePayment(Decimal amount) { /*Implementation*/ }
}
D. Public class CreditCardPayment extends Payment {
public virtual void makePayment(Decimal amount) { /*implementation*/ }
}
A

B

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q
Universal Containers (UC) decided it will not to send emails to support personnel directly from Salesforce in the event that an unhandled exception occurs. Instead, UC wants an external system be notified of the error.
What is the appropriate publish/subscribe logic to meet these requirements?
A. Publish the error event using the Eventbus.publish() method and have the external system subscribe to the event using CometD.

B. Publish the error event using the addError() method and have the external system subscribe to the event using CometD.

C. Have the external system subscribe to the BatchApexError event, no publishing is necessary.

D. Publish the error event using the addError() method and write a trigger to subscribe to the event and notify the external system.

A

A

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

A Licensed_Professional__c custom object exist in the system with two Master-Detail fields for the following objects: Certification__c and Contact. Users with the “Certification Representative” role can access the Certification records they own and view the related Licensed Professionals records, however users with the
“Salesforce representative” role report they cannot view any Licensed professional records even though they own the associated Contact record. What are two likely causes of users in the “Sales Representative” role not being able to access the Licensed Professional records? Choose 2 answers
A. The organization’s sharing rules for Licensed_Professional__c have not finished their recalculation process.

B. The organization has a private sharing model for Certification__c, and Certification__c is the primary relationship in the Licensed_Professional__c object.

C. The organization has a private sharing model for Certification__c, and Contact is the primary relationship in the Licensed_Professional__c object

D. The organization recently modified the Sales representative role to restrict Read/Write access to Licensed_Professional__c

A

B, C

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

Which exception type cannot be caught?
A. NoAccessException

B. CalloutException

C. Custom Exception

D. LimitException

A

D

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

Which two characteristics are true for Aura component events?
A. Only parent components that create subcomponents (either in their markup or programmatically) can handle events.

B. Calling event, stopPropagation ( ) may or may not stop the event propagation based of the current propagation phase.

C. The event propagates to every owner In the containment hierarchy.

D. If a container component needs to handle a component event, add a handleFacets=’’ attribute to Its handler.

A

B, C

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q
Universal Containers (UC) uses a custom object called Vendor. The Vendor custom object has a Master-Detail relationship with the standard Account object. Based on some internal discussion, the UC administrator tried to change the Master-Detail relationship to a Lookup relationship but was not able to do so. What is a possible reason that this change was not permitted?
A. The Account object is included on a workflow on the Vendor object.

B. The Vendor object must use a Master-Detail field for reporting.

C. The Vendor records have existing values in the Account object.

D. The Account records contain Vendor roll-up summary fields.

A

D

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

A custom object Trainer_c has a lookup field to another custom object Gym___c.
Which SOQL query will get the record for the Viridian City gym and it’s trainers?
A. SELECT ID FROM Trainer_c WHERE Gym__r.Name - Viridian City Gym’

B. SELECT Id, (SELECT Id FROM Trainers__r) FROM Gym_C WHERE Name . Viridian City Gym’

C. SELECT Id, (SELECT Id FROM Trainers) FROM Gym_C WHERE Name - Viridian City Gym’

D. SELECT Id, (SELECT Id FROM Trainer_c) FROM Gym_c WHERE Name - Viridian City Gym’

A

B

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q
A developer is tasked to perform a security review of the ContactSearch Apex class that exists in the system.
Whithin the class, the developer identifies the following method as a security threat: 
List performSearch(String lastName){ 
return Database.query('Select Id, FirstName, LastName FROM Contact WHERE LastName Like %'+lastName+'%); 
} 

What are two ways the developer can update the method to prevent a SOQL injection attack? Choose 2 answers
A. Use the @Readonly annotation and the with sharing keyword on the class.

B. Use variable binding and replace the dynamic query with a static SOQL.

C. Use the escapeSingleQuote method to sanitize the parameter before its use.

D. Use a regular expression on the parameter to remove special characters.

A

B, C

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q
Which Apex class contains methods to return the amount of resources that have been used for a particular governor, such as the number of DML statements?
A. Limits

B. Exception

C. OrgLimits

D. Messaging

A

A

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

A custom picklist field, Food_Preference__c, exist on a custom object. The picklist contains the following options: ‘Vegan’,’Kosher’,’No Preference’. The developer must ensure a value is populated every time a record is created or updated. What is the most efficient way to ensure a value is selected every time a record is saved?
A. Set a validation rule to enforce a value is selected.

B. Mark the field as Required on the field definition.

C. Set “Use the first value in the list as the default value” as True.

D. Mark the field as Required on the object’s page layout.

A

B

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

What is the maximum number of SOQL queries used by the following code?
List aList = [SELECT Id FROM Account LIMIT 5]; for (Account a : aList){
List cList = [SELECT Id FROM Contact WHERE AccountId = :a.Id);
}
A. 6

B. 5

C. 1

D. 2

A

A

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

Application Events follow the traditional publish-subscribe model. Which method is used to fire an event?
A. Emit()

B. FireEvent()

C. RegisterEvent()

D. Fire()

A

D

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

A developer needs to have records with specific field values in order to test a new Apex class.
What should the developer do to ensure the data is available to the test?
A. Use Test.Loaddata () and reference a static resource.

B. Use SOQL to query the org for the required data.

C. Use Anonymous Apex to create the required data.

D. Use Test.Loaddata () and reference a CSV file

A

A

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

Which three resources in an Aura Component can contain Javascript functions? Choose 3 answers
A. Helper

B. Renderer

C. Controller

A

A, B, C

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

A workflow updates the value of a custom field for an existing Account.
How can a developer access the updated custom field value from a trigger?
A. By writing an After Update trigger and accessing the field value from Trigger.old

B. By writing an After Insert trigger and accessing the field value from Trigger.old

C. By writing, a Before Update trigger and accessing the field value from Trigger.new

D. By writing a Before Insert trigger and accessing the field value from Trigger.new

A

C

32
Q

When using SalesforceDX, what does a developer need to enable to create and manage scratch orgs?
A. Production

B. Dev Hub

C. Environment Hub

D. Sandbox

A

B

33
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. @isTest(SeeAllData=True)

B. @PreTest

C. @BeforeTest

D. @TestSetup

A

D

34
Q

What will be the output in the debug log in the event of a QueryExeption during a call to the @query method in the following Example?

class myClass {
class CustomException extends QueryException {}
public static Account aQuery() {
Account theAccount;
try {
System.debug(‘Querying Accounts’);
theAccount = [SELECT Id FROM Account WHERE CreatedDate > TODAY];
} catch (CustomException eX) {
System.debug(‘Custom Exception’);
} catch (QueryException eX) {
System.debug(‘Query Exception’);
} finally {
System.debug(‘done’);
}
return theAccount;
}
}

A. Querying Accounts. Query Exception. Done

B. Querying Accounts. Custom Exception.

C. Querying Accounts. Query Exception.

D. Querying Accounts. Custom Exception Done.

A

A

35
Q

What are three considerations when using the @InvocableMethod annotation in Apex?
Choose 3 answers
A. A method using the @InvocableMethod annotation can have multiple input parameters.

B. Only one method using the @InvocableMethod annotqation can be defined per Apex class.

C. A method using the @InvocableMethod annotation can be declared as Public or Global.

D. A method using the @InvocableMethod annotation must define a return value.

E. A method using the @InvocableMethod annotation must be declared as static

A

B, C, E

36
Q

How many accounts will be inserted by the following block ofcode?
for(Integer i = 0 ; i < 500; i++) { Account a = new Account(Name=’New Account ‘ + i); insert a; }
A. 100

B. 0

C. 500

D. 150

A

B

37
Q

A custom Visualforce controller calls the ApexPages,addMessage () method, but no messages are rendering on the page.
Which component should be added to the Visualforce page to display the message?

A.

A

A

38
Q

Which code displays the contents of a Visualforce page as a PDF?
A.

B.

C.

D.

A

D

39
Q

A developer has a requirement to create an Order When an Opportunity reaches a “Closed-Won” status.
Which tool should be used to implement this requirement?
A. Process Builder

B. Lightning Component

C. Lightning

D. Apex trigger

A

A

40
Q

Universal Containers has an order system that uses an Order Number to identify an order for customers and service agents. Order will be imported into Salesforce.
A. Number with External ID

B. Indirect Lookup

C. Lookup

D. Direct Lookup

A

A

41
Q

Which action causes a before trigger to fire by default for Accounts?
A. Updating addresses using the Mass Address update tool

B. Importing data using the Data Loader and the Bulk API

C. Renaming or replacing picklist

D. Converting Leads to Contact accounts

A

D

42
Q

A developer needs an Apex method that can process Account or Contact records. Which method signature should the developer use?
A. Public void doWork(sObject theRecord)

B. Public void doWork(Account Contact)

C. Public void doWork(Record theRecord)

D. Public void doWork(Account || Contatc)

A

A

43
Q

Which Salesforce feature allows a developer to see when a user last logged in to Salesforce if real-time notification is not required?
A. Event Monitoring Log

B. Developer Log

C. Calendar Events

D. Asynchronous Data Capture Events

A

A

44
Q
The following Apex method is part of the ContactService class that is called from a trigger: public static void setBusinessUnitToEMEA(Contact thisContact){ thisContact.Business_Unit\_\_c = "EMEA" ; update thisContact; } How should the developer modify the code to ensure best practice are met?
A. Public static void setBusinessUnitToEMEA(List contacts){
for(Contact thisContact : contacts) {
thisContact.Business_Unit\_\_c = 'EMEA' ;
}
update contacts;
}

B. Public void setBusinessUnitToEMEA(List contatcs){
contacts[0].Business_Unit__c = ‘EMEA’ ;
update contacts[0];
}

C. Public static void setBusinessUnitToEMEA(Contact thisContact){
List contacts = new List();
contacts.add(thisContact.Business_Unit\_\_c = 'EMEA');
update contacts;
}
D. Public static void setBusinessUnitToEMEA(List contacts){
for(Contact thisContact : contacts){
thisContact.Business_Unit\_\_c = 'EMEA' ;
update contacts[0];
}
}
A

A

45
Q

Which Lightning code segment should be written to declare dependencies on a Lightning component, c:accountList, that is used in a Visualforce page?

A

Option A

46
Q

What are two ways a developer can get the status of an enquered job for a class that queueable interface?
Choose 2 answers
A. Query the AsyncApexJobe object

B. View the apex flex Queue

C. View the apex Jobs page

D. View the apex status Page

A

A, C

47
Q

A developer identifies the following triggers on the Expense_c object:
* DeleteExpense,
* applyDefaultstoexpense
* validateexpenseupdate;
The triggers process before delete, before insert, and before update events respectively.
Which two techniques should the developer implement to ensure trigger best practice are followed?
A. Unify the before insert and before update triggers and use Process Builder for the delete action.

B. Unify all three triggers in a single trigger on the Expense__c object that includes all events.

C. Create helper classes to execute the appropriate logic when a record is saved.

D. Maintain all three triggers on the Expense__c object, but move the Apex logic out for the trigger definition.

A

B, C

48
Q

Universal container wants a list button to display a visualforce page that allows users to edit multiple records which visualforce feature supports this requirement.

A

Recordsetvar page attribute

49
Q

Universal Containers recently transitioned from Classic to Lighting Experience. One of its business processes requires certain value from the opportunity object to be sent via HTTP REST callout to its external order management system based on a user-initiated action on the opportunity page. Example values are as follow
* Name
* Amount
* Account
Which two methods should the developer implement to fulfill the business requirement? (Choose 2 answers)
A. Create an after update trigger on the Opportunity object that calls a helper method using
@Future(Callout=true) to perform the HTTP REST callout.

B. Create a Lightning component that performs the HTTP REST callout, and use a Lightning Action to expose the component on the Opportunity detail page.

C. Create a Process Builder on the Opportunity object that executes an Apex immediate action to perform the HTTP REST callout whenever the Opportunity is updated.

D. Create a Visualforce page that performs the HTTP REST callout, and use a Visualforce quick action to expose the component on the Opportunity detail page.

A

B, D

50
Q
A developer must create a ShippingCalculator class that cannot be instantiated and must include a working default implementation of a calculate method, that sub-classes can override. What is the correct implementation of the ShippingCalculator class?
A. Public abstract class ShippingCalculator {
public override calculate() { /*implementation*/ }
}
B. Public abstract class ShippingCalculator {
public virtual void calculate() { /*implementation*/ }
}
C. Public abstract class ShippingCalculator {
public abstract calculate() { /*implementation*/ }
}
D. Public abstract class ShippingCalculator {
public void calculate() { /*implementation*/ }
}
A

B

51
Q
developer created this Apex trigger that calls MyClass .myStaticMethod:
trigger myTrigger on Contact(before insert) ( MyClass.myStaticMethod(trigger.new, trigger.oldMap); } The developer creates a test class with a test method that calls MyClass.mystaticMethod, resulting in 81% overall code coverage. What happens when the developer tries to deploy the trigger and two classes to production, assuming no other code exist?
A. The deployment fails because no assertions were made in the test method.

B. The deployment passes because both classes and the trigger were included in the deployment.

C. The deployment fails because the Apex trigger has no code coverage.

D. The deployment passes because the Apex code has required (>75%) code coverage.

A

D

52
Q

Which code displays the content of Visualforce page as PDF?
A.

B.

D.

A

D

53
Q

A development team wants to use a deployment script lo automatically deploy lo a sandbox during their development cycles.
Which two tools can they use to run a script that deploys to a sandbox?
Choose 2 answers
A. SFDX CLI

B. Developer Console

C. Change Sets

D. Ant Migration Tool

A

A, D

54
Q
Which annotation exposes an Apex class as a RESTful web service?
A. @Remote Action

B. @RestResource

C. @Httplnvocable

D. @AuraEnabled

A

B

55
Q

An Apex method, getAccounts, that returns a List of Accounts given a searchTerm, is available for Lightning Web components to use.
What is the correct definition of a Lightning Web component property that uses the getAccounts method?

// Option A
@wire(getAccounts, { searchTerm: '$searchTerm' })
accountList;

// Option B
@AuraEnabled(getAccounts, ‘$searchTerm’ )
accountList;

// Option C
@AuraEnabled(getAccounts, { searchTerm: '$searchTerm' })
accountList;

// Option D
@wire(getAccounts, ‘$searchTerm’)
accountList;

A

Option A

56
Q

When a user edits the Postal Code on an Account, a custom Account text field named ‘‘Timezone’’ must be updated based on the values in a postalCodeToTimezone_c custom object.
What should be built to implement this feature?
A. Account assignment rule

B. Account workflow rule

C. Account approval process

D. Account custom trigger

A

D

57
Q

The Job_Application__c custom object has a field that is a Master-Detail relationship to the Contact object, where the Contact object is the Master. As part of a feature implementation, a developer needs to retrieve a list containing all Contact records where the related Account Industry is ‘Technology’ while also retrieving the contact’s Job_Application__c records.
Based on the object’s relationships, what is the most efficient statement to retrieve the list of contacts?
A. [SELECT Id, (SELECT Id FROM Job_Application_c) FROM Contact WHERE
Account.Industry = ‘Technology’];

B. [SELECT Id, (SELECT Id FROM Job_Applications_r) FROM Contact WHERE
Account.Industry = ‘Technology’];

C. [SELECT Id, (SELECT Id FROM Job_Applications_c) FROM Contact WHERE
Accounts.Industry = ‘Technology’];

D. [SELECT Id, (SELECT Id FROM Job_Applications_r) FROM Contact WHERE
Accounts.Industry = ‘Technology’];

A

B

58
Q

Which two characteristics are true for Aura component events? Choose 2 answers
A. If a container component needs to handle a component event, add a includeFacets” true” attribute to its handler.

B. Depending on the current propagation phase, calling event. Stoppropagation () may not stop the event propagation.

C. The event propagates to every owner in the containment hierarchy.

D. By default, containers can handle events thrown by components they contain.

A

B, C

59
Q
A developer must create a DrawList class that provides capabilities defined in the Sortable and Drawable interfaces. public interface Sortable { void sort(); } public interface Drawable { void draw(); } Which is the correct implementation?
A. Public class DrawList implements Sortable, Implements Drawable {
public void sort() { /*implementation*/}
public void draw() { /*implementation*/}
]
B. Public class DrawList extends Sortable, Drawable {
public void sort() { /*implementation*/}
public void draw() { /*implementation*/}
}

C. Public class DrawList extends Sortable, extends Sortable, extends Drawable { public void sort() { /implementation/ } public void draw() { /* implementation */}

D. Public class DrawList implements Sortable, Drawable {
public void sort() { /*implementation*/}
public void draw() { /*implementation*/}
}
A

D

60
Q

A developer needs to create a custom button for the Account object that, when clicked, will perform a series of calculation and redirect the user to a custom visualforce page.
Which three attributes need to be defined with values in the tag to accomplish this?
Choose 3 answers
A. extensions

B. Action

C. readOnly

D. standard Controller

E. renderAs

A

A, B, D

61
Q

Which two statements are accurate regarding Apex classes and interfaces?
Choose 2 answers
A. Interface methods are public by default.

B. A top-level class can only have one inner class level.

C. Inner classes are public by default.

D. Classes are final by default.

A

A, B

62
Q
A developer creates a new Apex trigger with a helper class, and writes a test class that only exercises 95% coverage of new Apex helper class. Change Set deployment to production fails with the test coverage warning:
"Test coverage of selected Apex Trigger is 0%, at least 1% test coverage is required" What should the developer do to successfully deploy the new Apex trigger and helper class?
A. Create a test class and methods to cover the Apex trigger

B. Remove the falling test methods from the test class.

C. Run the tests using the ‘Run All Tests’ method.

D. Increase the test class coverage on the helper class

A

B

63
Q
A developer needs to implement a custom SOAP Web Service that is used by an external Web Application.
The developer chooses to Include helper methods that are not used by the Web Application In the Implementation of the Web Service Class.
Which code segment shows the correct declaration of the class and methods?
// Option A
global class WebServiceClass {
    private Boolean helperMethod() { /* implementation */ }
    global String updateRecords() { /* implementation */ }
}
// Option B
global class WebServiceClass {
    private Boolean helperMethod() { /* implementation */ }
    global static String updateRecords() { /* implementation */ }
}
// Option C
global class WebServiceClass {
    private Boolean helperMethod() { /* implementation */ }
    webservice static String updateRecords() { /* implementation */ }
}
// Option D
webservice class WebServiceClass {
    private Boolean helperMethod() { /* implementation */ }
    webservice static String updateRecords() { /* implementation */ }
}
A

Option C

64
Q

A Next Best Action strategy uses an Enhance Element that invokes an Apex method to determine a discount level for a Contact, based on a number of factors. What is the correct definition of the Apex method?
A. @InvocableMethod
global List> getLevel(List input)
{ /implementation/ }

B. @InvocableMethod
global static List> getLevel(List input)
{ /implementation/ }

C. @InvocableMethod
global Recommendation getLevel (ContactWrapper input)
{ /implementation/ }

D. @InvocableMethod
global static ListRecommendation getLevel(List input)
{ /implementation/ }

A

B

65
Q

A developer uses a loop to check each Contact in a list. When a Contact with the Title of
“Boss” is found, the Apex method should jump to the first line of code outside of the for loop.
Which Apex solution will let the developer implement this requirement?
A. Exit

B. break;

C. Continue

D. Next

A

B

66
Q

A developer has a Apex controller for a Visualforce page that takes an ID as a URL parameter. How should the developer prevent a cross site scripting vulnerability?
A. String.ValueOf(ApexPages.currentPage() .getParameters() .get(‘url_param’))

B. String.escapeSingleQuotes(ApexPages.currentPage() .getParameters(). get(‘url_param’))

C. ApexPages.currentPage() .getParameters() .get(‘url_param’)

D. ApexPages.currentPage() .getParameters() .get(‘url_param’) .escapeHtml4()

A

B

67
Q

What are three characteristics of change set deployments?
Choose 3 answers
A. Change sets can only be used between related organizations.

B. Sending a change set between two orgs requires a deployment connection.

C. Deployment is done in a one-way, single transaction.

D. Change sets can be used to transfer records.

E. Change sets can deploy custom settings data.

A

A, B, C

68
Q

Which salesforce org has a complete duplicate copy of the production org including data and configuration?
A. Partial Copy Sandbox

B. Production

C. Developer Pro Sandbox

D. Full Sandbox

A

D

69
Q

Which three web technologies can be integrated into a Visualforce page? (Choose three.)
A. PHP

B. Java

C. CSS

D. HTML

E. JavaScript

A

C, D, E

70
Q

Which three resources in an Azure Component can contain JavaScript functions?
A. Style

B. helper

C. Renderer

D. Controllers

E. Design

A

B, C, D

71
Q
How should a developer write unit tests for a private method in an Apex class?
A. Mark the Apex class as global.

B. Use the SeeAllData annotation.

C. Use the TestVisible annotation.

D. Add a test method in the Apex class.

A

C

72
Q

A developer has the following requirements:
Calculate the total amount on an Order.
Calculate the line amount for each Line Item based on quantity selected and price.
Move Line Items to a different Order if a Line Item is not stock.
Which relationship implementation supports these requirements?
A. Order has a Master-Detail field to Line Item and there can be many Line Items per Order.

B. Line Items has a Master-Detail field to Order and the Master can be re-parented.

C. Order has a Lookup field to Line Item and there can be many Line Items per Order.

D. Line Item has a Lookup field to Order and there can be many Line Items per Order

A

B

73
Q

Which two statements true about Getter and Setter methods as they relate to Visualforce? Choose 2 answers
A. Getter methods can pass a value from a controller to a page.

B. There is no guarantee for the order in which Getter or Setter methods are executed.

C. Setter methods can pass a value from a controller to a page.

D. Setter methods always have to be declared global.

A

B, D

74
Q
A developer must implement a CheckPaymentProcessor class that provides check processing payment capabilities that adhere to what defined for payments in the PaymentProcessor interface. public interface PaymentProcessor { void pay(Decimal amount); } Which is the correct implementation to use the PaymentProcessor interface class?
A. Public class CheckPaymentProcessor implements PaymentProcessor {
public void pay(Decimal amount);
}
B. Public class CheckPaymentProcessor extends PaymentProcessor {
public void pay(Decimal amount) {}
}
C. Public class CheckPaymentProcessor implements PaymentProcessor {
public void pay(Decimal amount) {}
}
D. Public class CheckPaymentProcessor extends PaymentProcessor {
public void pay(Decimal amount);
}
A

C

75
Q

Which process automation should be used to send an outbound message without using Apex code?
A. Flow Builder

B. Workflow Rule

C. Approval Process

D. Process Builder

A

A