WorksheetsExam Zafer
Total questions: 72
Worksheet time: 36mins
Name
Class
Date
1.
Refer to the following Apex code:
Integer x = 0;
do {
x = 1;
x++;
}while (x<1);
System.debug(x);
What is the value of x when it is written to the debug log?
a)
0
b)
1
c)
2
d)
3
2.
A developer is creating a Lightning web component to show a list of sales records.
The Sales Representative user should be able to see the commission field on each record. The Sales Assistant user should be able to see all fields on the record except the commission field.
How should this be enforced so that the component works for both users without showing any errors?
a)
Use Security. acripinaccegeible to remove fields inaccessible to the current user.
b)
Use Lightning Data Service to get the collection of sales records.
c)
Use WITH SECURITY_ENFORCED in the SQL that fetches the data for the component.
d)
Use Lightning Locker Service to enforce sharing rules and field-level security.
3.
Universal Containers has a support process that allows users to request support from its engineering team using a custom object, Engineering_ Support__c
Users should be able to associate multiple Engineering_support__c records to a single Opportunity record.
Additionally, aggregate information about the Engineering_ Support__c records should be shown on the
Opportunity record.
What should a developer implement to support these requirements?
a)
Lookup field from Opportunity to Engineering_ support__c
b)
Master-detail field from Opportunity to Engineering_ support__c
c)
Lookup field from Engineering_Support__c to Opportunity
d)
Master-detail field from Engineering_ support__c to Opportunity
4.
A developer created this Apex trigger that calls MyClass.myStaticMethod:
trigger myTrigger on Contact (before insert)
{ MyClass.myStaticMethod(trigger.new); }
The developer creates a test class with a test method that calls MyClass.myStaticMethod directly, 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 exists?
a)
The deployment passes because both classes and the trigger were included in the deployment.
b)
The deployment fails because the Apex trigger has no code coverage.
c)
The deployment passes because the Apex code has the required >75% code coverage.
d)
The deployment fails because no assertions were made in the test method
5.
A developer has a requirement to write Apex code to update a large number of account records on a nightly basis.
The system administrator needs to be able to schedule the class to run after business hours on an as-needed
basis.
Which class definition should be used to successfully implement this requirement?
a)
global inherited sharing class ProcesAccountProcessor implements Database.Batchable, Schedulable
b)
global inherited sharing class ProceegAccountProcessor implements Queueable
c)
global inherited sharing class ProceegAccountProceessor implements Database.Batchable
d)
global inherited sharing class ProcessAccountProcessor implements Schedulable
6.
A Salesforce Administrator used Flow Builder to create a flow named "accountOnboarding". The flow must be used
inside an Aura component.
Which tag should a developer use to display the flow in the component?
a)
aura: flow
b)
aura-flow
c)
lightning-flow
d)
lightning: flow
7.
An org tracks customer orders on an Order object and the line items of an Order on the Line Item object. The Line
Item object has a Master/Detail relationship to the Order object. A developer has a requirement to calculate the
order amount on an Order and the line amount on each Line Item based on quantity and price.
What is the correct implementation?
a)
Implement the line amount as a currency field and the order amount as a SUM formula field.
b)
Write a single before trigger on the Line Item that calculates the item amount and updates the order amount on the Order.
c)
Implement the line amount as a numeric formula field and the order amount as a roll-up summary field.
d)
Write a process on the Line Item that calculates the item amount and order amount and updates the fields on the Line Item and the Order
8.
Cloud Kicks has a multi-screen flow that its call center agents use when handling inbound service desk calls.
At one of the steps in the flow, the agents should be presented with a list of order numbers and dates that are
retrieved from an external order management system in real time and displayed on the screen.
What should a developer use to satisfy this requirement?
a)
An outbound message
b)
An Apex REST class
c)
An invocable method
d)
An Apex controller
9.
A developer is migrating a Visualforce page into a Lightning web component.
The Visualforce page shows information about a single record. The developer decides to use Lightning Data
Service to access record data.
Which security consideration should the developer be aware of?
a)
Lightning Data Service ignores field-level security.
b)
The with sharing keyword must be used to enforce sharing rules.
c)
The isAccessible() method must be used for field-level access checks.
d)
Lightning Data Service handles sharing rules and field-level security.
10.
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)
Exception
b)
Messaging
c)
OrgLimits
d)
Limits
11.
What is the result of the following code?
Account a = new Account();
Database. insert (a, false);
a)
The record will be created and a message will be in the debug log.
b)
The record will not be created and no error will be reported.
c)
The record will not be created and an exception will be thrown.
d)
The record will be created and no error will be reported.
12.
A developer created a weather app that contains multiple Lightning web components.
One of the components, called Toggle, hasi toggle for Fahrenheit or Celsius units. Another component, called
Temperature, displays the current temperature in the unit selected in the Toggle component.
When a user toggles from Fahrenheit to Celsius or vice versa in the Toggle component, the information must be
sent to the Temperature component so the temperature can be converted and displayed.
What is the recommended way to accomplish this?
a)
Create a custom event to handle the communication between components.
b)
Use an application event to communicate between the components.
c)
The Toggle component should call a method in the Temperature component.
d)
Use Lightning Message Service to communicate between the components.
13.
What should a developer use to script the deployment and unit test execution as part of continuous integration?
a)
Execute Anonymous
b)
VS Code
c)
Developer Console
d)
Salesforce CLI
14.
Which scenario is valid for execution by unit tests?
a)
Set the created date of a record using a system method.
b)
Execute anonymous Apex as a different user.
c)
Load data from a remote site with a callout.
d)
Generate a Visualforce PDF with getContentAsPDF().
15.
The sales management team at Universal Containers requires that the Lead Source field of the Lead record be populated when a Lead is converted.
What should be used to ensure that a user populates the Lead Source field prior to converting a Lead?
a)
Formula Field
b)
Workflow Rule
c)
Process Builder
d)
Validation Rule
16.
The values 'High', 'Medium', and 'Low are identified as common values for multiple picklists across different objects.
What is an approach a developer can take to streamline maintenance of the picklists and their values, while also restricting the values to the ones mentioned above?
a)
Create the Picklist on each object and use a Global Picklist Value Set containing the values.
b)
Create the Picklist on each object as a required field and select "Display values alphabetically, not in the order entered".
c)
Create the Picklist on each object and select "Restrict picklist to the values defined in the value set"
d)
Create the Picklist on each object and add a validation rule to ensure data integrity.
17.
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 discussions, 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 Vendor records have existing values in the Account object.
b)
The Vendor object must use a Master-Detail field for reporting.
c)
The Account object is included on a workflow on the Vendor object.
d)
The Account records contain Vendor roll-up summary fields
18.
Which exception type cannot be caught?
a)
LimitException
b)
A Custom Exception
c)
NoAccessException
d)
CalloutException
19.
A developer is creating a page that allows users to create multiple Opportunities. The developer is asked to verify the current user's default Opportunity record type, and set certain default values based on the record type before inserting the record.
How can the developer find the current user's default record type?
a)
Query the Profile where the ID equals userInfo.getProfileID() and then use the profile.Opportunity. getDefaultRecordType() method.
b)
Use Opportunity.SObjectType.getDescribe().getRecordTypeInfos()togetalistofrecordtypes,and iterate through them until isDefaultRecordTypeMapping() is true.
c)
Use the Schema.userInfo.Opportunity.getDefaultRecordType() method.
d)
Create the opportunity and check the opportunity.recordType before inserting, which will have the record ID of the current user's default record type.
20.
Universal Containers wants to back up all of the data and attachments in its Salesforce org once a month.
Which approach should a developer use to meet this requirement?
a)
Use the Data Loader command line.
b)
Create a Schedulable Apex class.
c)
Schedule a report.
d)
Define a Data Export scheduled job.
21.
Cloud Kicks Fitness, an ISV Salesforce partner, is developing a managed package application. One of the application modules allows the user to calculate body fat using the Apex class, BodyFat, and its method, calculateBodyFat(). The product owner wants to ensure this method is accessible by the consumer of the application when developing customizations outside the ISV's package namespace.
Which approach should a developer take to ensure calculateBodyFat () is accessible outside the package
namespace?
a)
Declare the class and method using the global access modifier.
b)
Declare the class as global and use the public access modifier on the method.
c)
Declare the class as public and use the global access modifier on the method.
d)
Declare the class and method using the public access modifier.
22.
A developer must write an Apex method that will be called from a Lightning component. The method may delete
an Account stored in the accountRec variable.
Which method should a developer use to ensure only users that should be able to delete Accounts can successfully
perform deletions?
a)
accountRec.sObjectType.isDeleteable()
b)
Account. isDeletable()
c)
accountRec.isDeletable()
d)
Schema. sObjectType.Account.isDeletable()
23.
Which code displays the contents of a Visualforce page as a PDF?
a)
b)
c)
d)
24.
While writing an Apex class that creates Accounts, a developer wants to make sure that all required fields are handled property.
Which approach should the developer use to be sure that the Apex class works correctly without adding or
changing data in the org?
a)
Run the code in an Execute Anonymous block in the Developer Console.
b)
Create a test class to execute the business logic and run the test in the Developer Console.
c)
Include a try/catch block to the Apex class.
d)
Perform a code review with another developer.
25.
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 getAccounte method?
a)
@AuraEnable(getAccounts, ‘$searchTerm’) accountList;
b)
@AuraEnable(getAccounts, {searchTerm: ‘$searchTerm’}) accountList;
c)
@wire(getAccounts, ‘$searchTerm’) accountList;
d)
@wire(getAccounts, {searchTerm: ‘$searchTerm’}) accountList;
26.
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)
c)
d)
27.
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.
28.
A lead developer creates an Apex interface called "Laptop". Consider the following code snippet:
public class SilverLaptop{
//code implementation
}
How can a developer use the Laptop interface within the SilverLaptop class?
a)
@Extends (class="Laptop") public class SilverLaptop
b)
public class SilverLaptop extends Laptop
c)
@Interface (class="Laptop") public class SilverLaptop
d)
public class SilverLaptop implements Laptop
29.
A Lightning component has a wired property, searchResults, that stores a list of Opportunities.
Which definition of the Apex method, to which the searchReguits property is wired, should be used?
a)
@AuraEnabled(cacheable=false) Public static List search (String term) { /*implementation*/ }
b)
@AuraEnabled(cacheable=true) Public static List search (String term) { /*implementation*/ }
30.
Which aspect of Apex programming is limited due to multitenancy?
a)
The number of records processed in a loop
b)
The number of records returned from database queries
c)
The number of methods in an Apex class
d)
The number of active Apex classes
31.
What is a fundamental difference between a Master-Detail relationship and a Lookup relationship?
a)
In a Master-Detail relationship, when a record of a master object is deleted, the detail records are not deleted.
b)
A Master-Detail relationship detail record inherits the sharing and security of its master record.
c)
In a Lookup relationship, the field value is mandatory.
d)
In a Lookup relationship when the parent record is deleted, the child records are always deleted.
32.
A developer needs to create a baseline set of data (Accounts, Contacts, Products, Assets) for an entire suite of
tests allowing them to test independent requirements for various types of Salesforce Cases.
Which approach can efficiently generate the required data for each unit test?
a)
Add @IsTest(seeAlIData=true) at the start of the unit test class.
b)
Create test data before Test.startTest() in the unit test.
c)
Create a mock using the Stub API.
d)
Use @TestSetup with a void method.
33.
A developer wants to retrieve the Contacts and Users with the email address dev@uc.com.
Which SOS statement should the developer use?
a)
A
b)
B
c)
C
d)
D
34.
Since Aura application events follow the traditional publish-subscribe model, which method is used to fire an
event?
a)
fire()
b)
emit()
c)
fireEvent()
d)
registerEvent()
35.
What should be used to create scratch orgs?
a)
Developer Console
b)
Workbench
c)
Salesforce CLI
d)
Sandbox refresh
36.
Universal Containers implemented a private sharing model for the Account object. A custom Account search tool was developed with Apex to help sales representatives find accounts that match multiple criteria they specify. Since its release, users of the tool report they can see Accounts the do not own.
What should the developer use to enforce sharing permissions for the currently logged-in user while using the
custom search tool?
a)
Use the schema describe calls to determine if the logged-in user has access to the Account object.
b)
Use the with sharing keyword on the class declaration.
c)
Use the without sharing keyword on the class declaration.
d)
Use the UseInfo Apex class to filter all SOQL queries to returned records owned by the logged-in user
37.
How can a developer check the test coverage of active Process Builders and Flows before deploying them in a Change Set?
a)
Use SOQL and the Tooling API.
b)
Use the Code Coverage Setup page.
c)
Use the ApexTestResult class.
d)
Use the Flow Properties page.
38.
A developer needs to confirm that a Contact trigger works correctly without changing the organization's data.
What should the developer do to test the Contact trigger?
a)
Use Deploy from the VSCode IDE to deploy an 'insert Contact' Apex class.
b)
Use the Test menu on the Developer Console to run all test classes for the Contact trigger.
c)
Use the New button on the Salesforce Contacts Tab to create a new Contact record.
d)
Use the Open Execute Anonymous feature on the Developer Console to run an 'insert Contact’ DML statement.
39.
Which statement generates a list of Leads and Contacts that have a field with the phrase ACME?
a)
A
b)
B
c)
C
d)
D
40.
A team of many developers work in their own individual orgs that have the same configuration as the production
org.
Which type of org is best suited for this scenario?
a)
Developer Sandbox
b)
Full Sandbox
c)
Developer Edition
d)
Partner Developer Edition
41.
The values “High”,”Medium” and *Low* are Identified as common values for multiple picklists different object.
What is an approach a developer can take to streamline maintenance of the picklists and their values,while also restricting the values to the ones mentioned above?
a)
Create the Picklist on each object and use a Global Picklist Value Set containing the values.
b)
Create the Picklist on each object as a required field and select "Display values alphabetically not in the order entered".
c)
Create the Pickist on each object and select “Restrict picklist to the values deified in the value set”.
d)
Create the Picklist on each object and add a validation rule to ensure data integrity.
42.
In the following example, which sharing context will mymethod execute when it is invoked?
public Class myClass {
public void myMethod ( ) { /* implementation */}
}
a)
Sharing rules will be enforced by the instantiating class.
b)
Sharing rules will not be enforced for the running user.
c)
Sharing rules will be inherited from the calling context.
d)
Sharing rules will be enforced for the running user.
43.
The Jop_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 Jop_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 Jop_Application__r) FROM Contact WHERE Accounts.Industry = 'Technology’]
b)
[SELECT Id, (SELECT Id FROM Jop_Application__c) FROM Contact WHERE Account.Industry = 'Technology’];
c)
[SELECT Id, (SELECT Id FROM Jop_Application__r) FROM Contact WHERE Account.Industry = 'Technology’];
d)
[SELECT Id, (SELECT Id FROM Jop_Application__c) FROM Contact WHERE Accounts.Industry = 'Technology’];
44.
A team of developers is working on a source-driven project that allows them to work independently, with many different org configurations.
Which type of Salesforce orgs should they use for their development?
a)
Scratch orgs
b)
Developer sandboxes
c)
Full Copy sandboxes
d)
Developer eras
45.
Which statement describes the execution order when triggers are associated to the same object and event?
a)
Triggers are executed alphabetically by trigger name.
b)
Trigger execution order cannot be guaranteed.
c)
Triggers are executed in the order they are created.
d)
Triggers are executed in the order they are modified.
46.
A next Best Action strategy uses Enhancer 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)
A
b)
B
c)
C
d)
D
47.
A developer wants to import 500 Opportunity records into a sandbox.
Why should the developer choose to use Data Loader Instead of Data Import Wizard?
a)
Data Import Wizard can not import all 500 records.
b)
Data Loader automatically relates Opportunities to Accounts,
c)
Data Import Wizard does not support Opportunities.
d)
Data Loader runs from the developer's browser.
48.
An Opportunity needs to have an amount rolled up from a custom object that is not in a Master/Detail relationship.
How can this be achieved?
a)
Write a trigger on the child object and use a red-black tree sorting to sum the amount for all related child objects under the Opportunity.
b)
Write a trigger on the child object and use an aggregate function to sum the amount for all related child objects under the Opportunity,
c)
Write a Process Builder that Minks the custom object to the Opportunity
d)
Use the Streaming API to create real-time roll-up summaries.
49.
What should a developer use to obtain the Id and Name of all the Leads, Accounts, and Contacts that have the company name "Universal Containers'"?
a)
FIND 'Universal Containers’ IN CompanyName Fields RETURNING lead(id, name), account(id, name), contact(id, name)
b)
SELECT lead(id, name), account(id,name), contact(id, name) FROM Lead, Account, Contact WHERE Name = 'Universal Containers'
c)
SELECT Lead.id, Lead.Name, Account.Id, Account.Name, Contact.Id, Contact. Name FROM Lead, Account, Contact WHERE CompanyName = 'Universal Containers'
d)
FIND 'Universal Containers’ IN Name Fields RETURNING lead(id, name), account(id, name), contact(id, name)
50.
How does the Lightning Component framework help developers implement solutions faster?
a)
By providing code review standards and processes
b)
By providing an Agile process with default steps
c)
By providing change history and version control
d)
By providing device-awareness for mobile and desktops
51.
A developer considers the following snippet of code:
Boolean isOK;
integer x;
String theString =’Hello’;
if(isOK == false && theString == ’Hello’){
x=1;
} else if (isOK == true && theString == ’Hello’){
x=2;
} else if (isOK != null && theString == ’Hello’){
x=3;
}else {
x=4;
}
Based on this code, what is the value of x?
a)
1
b)
2
c)
3
d)
4
52.
While working in a sandbox, an Apex test fails when run in the Test Framework. However, running the Apex test logic in the Execute Anonymous window succeeds with no exceptions or errors.
Why did the method fail in the sandbox test framework but succeed in the Developer Console?
a)
The test method does not use System.runAs to execute as a specific user.
b)
The test method relies on existing data in the sandbox.
c)
The test method has a syntax error in the code.
d)
The test method is calling an @future method.
53.
A developer wants to get access to the standard price book in the org while writing a test class that covers an OpportunityLineItem trigger.
Which method allows access to the price book?
a)
Use @IsTest (SeeAllData=true) and delete the existing standard price book.
b)
Use Test.loadData () and a static resource to load a standard price book.
c)
Use Test.getStandartPricebookId() to get the standard price book ID.
d)
Use @TestVisible to allow the test method to see the standard price book.
54.
Universal Containers stores Orders and Line Items in Salesforce. For security reasons, financial representatives are allowed to see information on the Order such as order amount, but they should not be allowed to see the line Items on the Order.
Which type of relationship should be used between Orders and Line Items?
a)
Lookup
b)
Master-Detail
c)
Indirect Lookup
d)
Direct Lookup
55.
Universal Containers has an order system that uses an Order Number to identify an order for customers and service agents. Order records will be imported into Salesforce.
How should the Order Number field be defined in Salesforce?
a)
Lookup
b)
Indirect Lookup
c)
Number with External ID
d)
Direct Lookup
56.
Which aspect of Apex programming is limited due to multitenancy?
a)
The number of methods in an Apex class
b)
The number of records processed in a loop
c)
The number of active Apex classes
d)
The number of records returned from database queries
57.
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 correct implementation?
a)
A
b)
B
c)
C
d)
D
58.
Universal Containers has a large number of custom applications that were built using a third-party JavaScript framework and exposed using Visualforce pages. The company wants to update these applications to apply styling that resembles the look and feel of Lightning Experience.
What should the developer do to fulfill the business request in the quickest and most effective manner?
a)
Rewrite all Visualforce pages as Lightning components.
b)
Enable Available for Lightning Experience, Lightning Communities, and the mobile app on Visualforce pages used by the custom application.
c)
Set the attribute enableLightning to true m the definition,
d)
Incorporate the Salesforce Lightning Design System CSS stylesheet into the JavaScript applications.
59.
What is the result of the following code?
Account a = new Account();
Database.insert(a, false);
a)
The record will not be created and no error will be reported.
b)
The record will not be created and an exception will be thrown.
c)
The record will be created and a message will be in the debug log.
d)
The record will be created and no error will be reported.
60.
A large corporation stores Orders and Line Items in Salesforce for different lines of business. Users are allowed to
see Orders across the entire organization, but, for security purposes, should only be able to see the Line Items for
Orders in their line of business.
Which type of relationship should be used between Line Items and Orders?
a)
Lookup
b)
Direct Lookup
c)
Master-Detail
d)
Indirect Lookup
61.
What should a developer use to fix a Lightning web component bug in a sandbox?
a)
Execute Anonymous
b)
Developer Console
c)
VS Code
d)
Force.com IDE
62.
A developer must implement a CheckPaymentProcessor class that provides check processing payment capabilities that adhere to what is 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)
A
b)
B
c)
C
d)
D
63.
Universal Containers created a new job posting on the first of the month. It triggered a process scheduled action that will send a Chatter post to the department VP In 30 days if the position is still open and the status is not equal to Interviewing. On the 10th of the month, an applicant interviews, and the job posting status is updated to Interviewing.
What will happen to the Chatter post in this situation?
a)
The pending Chatter post will be sent in 30 days
b)
The pending Chatter post will be will be paused.
c)
The pending Chatter post will be sent on the 10th of the month.
d)
The pending Chatter post will be canceled
64.
How does the Lightning Component framework help developers implement solutions faster?
a)
By providing change history and version control
b)
By providing an Agile process with default steps
c)
By providing code review standards and processes
d)
By providing device-awareness for mobile and desktops
65.
Refer to the following code snippet for an environment has more than 200 Accounts belonging to the 'Technology' industry:
When the code executes, what happens as a result of the Apex transaction?
a)
The Apex transaction succeeds regardless of any uncaught exception and all processed accounts are updated.
b)
If executed in a synchronous context, the Apex transaction is likely to fail by exceeding the DML governor limit.
c)
The Apex transaction fails with the following message: Sobject row was retrieved via soL without querying the requested field: Account.Is Tech
d)
If executed in an asynchronous context, the Apex transaction is likely to fail by exceeding the ML governor limit.
66.
In the Lightning UI, where should a developer look to find information about a Paused Flow Interview?
a)
In the system debug log by filtering on Pausi filtering on Paused Flow Interview
b)
On the Paused Flow Interviews related list for given record
c)
On the Paused Flow Interviews component on the Home page
d)
In the Paused Interviews section of the Apex Flex Queue
67.
A developer is asked to prevent anyone other than a user with Sales Manager profile from changing the Opportunity Status to Closed Lost if the lost reason is blank.
Which automation allows the developer to satisfy this requirement in the most efficient manner?
a)
A record trigger flow on the Opportunity object
b)
An Apex trigger on the Opportunity object
c)
An approval process on the Opportunity object
d)
An error condition formula on a validation rule on Opportunity
68.
What can be used to override the Account's standard Edit button for Lightning Experience?
a)
Lightning action
b)
Lightning component
c)
Lightning page
d)
Lightning flow
69.
Consider the following code snippet:
public static List‹Lead› obtainAllFields(Set leadIds){
List result = new List 0);
for (Id leadid : leadIds)
result.add ([SELECT FIELDS (ALL) FROM Lead WHERE Id = :leadId];
}
return result;
}
Given the multi-tenant architecture of the Salesforce platform, what is a best practice a developer should
implement and ensure successful execution of the method?
a)
Avoid performing queries inside for loops.
b)
Avoid returning an empty List of records.
c)
Avoid using variables as query filters.
d)
Avoid executing queries without a limit clause.
70.
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 discussions, 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 does not allow changing a field type for a custom field.
b)
The organization wide default for the Vendor object is Public Read/Write.
c)
Some of the Vendor records have null for the Account field.
d)
The Account object has a roll-up summary field on the Vendor object.
71.
A developer needs to create a baseline set of data ( Accounts , Contacts , Products , Assets ) for an entire suite of tests allowing them to test independent requirements for various types of Salesforce Cases . Which approach can efficiently generate the required data for each unit test ?
a)
Add #IsTest ( seeAllData - true ) at the start of the unit test class .
b)
Use @TestSetup with a void method .
c)
Create test data before Test.starttest ( ) in the unit test .
d)
Create a mock using the Stub API .
72.
A company has a custom object, Sales_Help_Request_c, that has a Lookup relationship to Opportunity. The Sales_Help_Request_c has a
number field, Number of Hours c, that represents the amount of time spent on the sales_Help_Request, с.
A developer is tasked with creating a field, Total_Hours c, on Opportunity that should be the sum of all of the Number_of_Hours c values
for the Sales_Help_Request__c records related to that Opportunity.
What should the developer use to implement this?
a)
A trigger on the Opportunity object
b)
A record-triggered flow on the Sales_Help_Request__c object
c)
A roll-up summary field on the sales_Help_Request_ c object
d)
A roll-up summary field on the Opportunity object
100 %
