Set 1 Flashcards

1
Q

A developer wants to retrieve the Contacts and Users with the email address ‘dev@uc.com’.
Which SOSL statement should the developer use?
A. FIND {Email = ‘dev@uc.com’} RETURNING Contact (Email), User (Email)
B. FIND {Email = ‘dev@uc.com’} IN Contact, User
C. FIND Email IN Contact, User FOR {dev2uc.com}
D. FIND {dev@uc.com} IN Email Fields RETURNING Contact (Email), User (Email)

A

D

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

An after trigger on the Account object performs a DML update operation on all of the child
Opportunities of an Account. There are no active triggers on the Opportunity object, yet a “maximum
trigger depth exceeded” error occurs in certain situations.
Which two reasons possibly explain the Account trigger firing recursively? (Choose two.)
A. Changes are being made to the Account during Criteria Based Sharing evaluation.
B. Changes to Opportunities are causing roll-up summary fields to update on the Account.
C. Changes are being made to the Account during an unrelated parallel save operation.
D. Changes to Opportunities are causing cross-object workflow field updates to be made on the
Account.

A

B, D

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

A developer created a trigger on the Account object and wants to test if the
trigger is properly bulklfield. The developer team decided that the trigger should be tested with 200
account records with unique names.
What two things should be done to create the test data within the unit test with the least amount of
code?
Choose 2 answers
A. Use the @isTest(isParallel=true) annotation in the test class.
B. Use the @isTest(seeAllData=true) annotation in the test class.
C. Create a static resource containing test data.
D. Use Test.loadData to populate data in your test methods.

A

C, D

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

A developer created a custom order management app that uses an Apex class. The order is
represented by an Order object and an Orderltem object that has a master-detail relationship to
Order. During order processing, an order may be split into multiple orders.
What should a developer do to allow their code to move some existing Orderltem records to a new
Order record?
A. Change the master-detail relationship to an external lookup relationship.
B. Select the Allow reparenting option on the master-detail relationship.
C. Create a junction object between Orderltem and Order.
D. Add without sharing to the Apex class declaration.

A

B

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

What is a key difference between a Master-Detail Relationship and a Lookup Relationship?
A. When a record of a master object in a Lookup Relationship is deleted, the detail records are also
deleted.
B. When a record of a master object in a Master-Detail Relationship is deleted, the detail records are
kept and not deleted.
C. A Lookup Relationship is a required field on an object.
D. A Master-Detail Relationship detail record inherits the sharing and security of its master record.

A

D

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

When importing and exporting data into Salesforce, which two statements are true?
Choose 2 answers
A. Bulk API can be used to bypass the storage limits when importing large data volumes in
development environments.
B. Bulk API can be used to import large data volumes in development environments without
bypassing the storage limits.
C. Developer and Developer Pro sandboxes have different storage limits.
D. Data import wizard is a client application provided by Salesforce.

A

C, D

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
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. Increase the test class coverage on the helper class
D. Run the tests using the 'Run All Tests' method.
A

B

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

What are two best practices when it comes to Lightning Web Component events?
A. Use event.detail to communicate data to elements in the same shadow tree
B. Use CustomEvent to pass data from a child to a parent component.
C. Use event.target to communicate data to elements that aren’t in the same shadow tree.
D. Use events configured with bubbles: false and composed:false.

A

B, C

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

A credit card company needs to Implement the functionality for a service agent to process
damaged credit cards. When the customers call In, the service agent must gather many pieces of
information Is tasked to Implement this functionality.
What should the developer use to satisfy this requirement In the most efficient manner?
A. Approval Process
B. Apex Trigger
C. Flow Builder
D. Lightning Component

A

B

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

As part of a data cleanup strategy, AW Computing wants to proactively delete associated
opportunity records when the related Account is deleted.
Which automation tool should be used to meet this business requirement?
A. Record-Triggered Flow
B. Workflow Rules
C. Scheduled job
D. Process Builder

A

A

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

Managers at Universal Containers want to ensure that only decommissioned containers are
able to be deleted in the system. To meet the business requirement a Salesforce developer adds
^Decommissioned” as a picklist value for the Status__: custom field within the Contact__c object.
Which tool should the developer use to enforce only Container records with a status of
“Decommissioned” can be deleted?
A. Before record-triggered flow
B. Validation rule
C. Apex trigger
D. After record-triggered flow

A

C

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

Which aspect of Apex programming is limited due to multitenancy?
A. The number of active Apex classes
B. The number of records returned from database queries
C. The number of methods in an Apex Class
D. The number of records processed in a loop

A

B

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

What are three techniques that a developer can use to invoke an anonymous block of code?
(Choose three.)
A. Create a Visualforce page that uses a controller class that is declared without sharing.
B. Type code into the Developer Console and execute it directly.
C. Use the SOAP API to make a call to execute anonymous code.
D. Run code using the Anonymous Apex feature of the Developer’s IDE.
E. Create and execute a test method that does not specify a runAs() call.

A

B, C, D

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q
What are three ways for a developer to execute tests in an org? Choose 3.
A. Tooling API
B. Metadata API.
C. Bulk API
D. Setup Menu
E. Salesforce DX
A

A, D, E

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

Universal Container uses Salesforce to create orders.
When an order is created, it needs to sync with the-in-house order fulfillment system. The order
fulfillment system can accept SOAP messages over the HTTPS. If the connection fails, messages
should be retried for up to 24 hours.
What is the recommended approach to sync the orders in Salesforce with the order fulfillment
system?
A. Create an after insert trigger on the Order object to make a callout to the order fulfilment system
B. Use Process Bulkier to call an invocable Apex method that sends a message to the order fulfilment
system.
C. Write an Apex SOAP service to integrate with the order fulfillment system.
D. Set up a Workflow Rule outbound message to the order fulfillment system.

A

A

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
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 has a private sharing model for Certification__c, and Certification__c is the
primary relationship in the Licensed_Professional__c object.
B. The organization has a private sharing model for Certification__c, and Contact is the primary
relationship in the Licensed_Professional__c object
C. The organization recently modified the Sales representative role to restrict Read/Write access to
Licensed_Professional__c
D. The organization’s sharing rules for Licensed_Professional__c have not finished their recalculation
process.

A

A, D

17
Q
What is the result of the following code snippet?
A. 0 Accounts are inserted.
B. 1 Account is inserted.
C. 200 Accounts are inserted.
D. 201 Accounts are inserted.
A

A

18
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. Classes are final by default.
D. Inner classes are public by default.
A

A, B

19
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.
B.

A

B

20
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=9
C. X=8
D. X=4

A

D —> need to see the whole process of the code

21
Q

Which two statements are true about Getter and Setter methods as they relate to
Visualforce?
A. Setter methods always have to be declared global.
B. Getter methods pass values from a controller to a page.
C. A corresponding Setter method is required for each Getter method.
D. There is no guarantee for the order in which Getter methods are called.

A

B, C

22
Q

Universal Containers wants Opportunities to no longer be editable when reaching the
Closed/Won stage.
How should a developer accomplish this?
A. Use the Process Automation settings.
B. Use Flow Builder.
C. Use a validation rule.
D. Mark fields as read-only on the page layout.

A

C

23
Q

A developer needs to confirm that an Account trigger is working correctly without changing
the organization’s dat a. What would the developer do to test the Account trigger?
A. Use the New button on the Salesforce Accounts Tab to create a new Account record.
B. Use Deply from the Force.com IDE to deploy an ‘insert Account’ Apex class.
C. Use the Test menu on the developer Console to run all test classes for the account trigger.
D. Use the Open Execute Anonymous feature on the Developer Console to run an ‘insert Account’
DML statement.

A

C

24
Q

Refer to the following code snippet for an environment has more than 200 Accounts
belonging to the Technology’ industry:

for (Account thisAccount : [SELECT Id, Industry FROM Account LIMIT 150]) {
if (thisAccount.Industry == ‘Technology’) {
thisAccount.Is_Tech__c = true;
}
update thisAccount;
}

When the code execution, which two events occur as a result of the Apex transaction?
When the code executes, which two events occur as a result of the Apex transaction?
Choose 2 answers
A. If executed in an asynchronous context, the apex transaction is likely to fall by exceeding the DML
governor limit
B. The Apex transaction succeeds regardless of any uncaught exception and all processed accounts
are updated.
C. If executed In a synchronous context, the apex transaction is likely to fall by exceeding the DHL
governor limit.
D. The Apex transaction fails with the following message. “SObject row was retrieved via SOQL
without querying the requested field Account.Is.Tech__c’’.

A

A

25
Q

A developer wants to invoke on outbound message when a record meets a specific criteria.
Which three features satisfy this use case?
Choose 3 answer
A. Process builder can be used to check the record criteria and send an outbound messagewithout
Apex Code.
B. Approval Process has the capacity to check the record criteria and send an outbound message
without Apex Code
C. Process builder can be used to check the record criteria and send an outbound message with Apex
Code.
D. Visual Workflow can be used to check the record criteria and send an outbound message without
Apex Code.
E. workflows can be used to check the record criteria and send an outbound message.

A

B, C, E