Font size
WorksheetsSD 1-50
Total questions: 82
Worksheet time: 47mins
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?
0
1
2
3
Management asked for opportunities to be automatically created for accounts with annual revenue greater than
$1,000,000. A developer created the following trigger on the Account object to satisfy this requirement.
for (Account a: Trigger.new) {
if (a.AnnualRevenue > 1000000) {
List<Opportunity> opplist = (SELECT Id FROM Opportunity WHERE accountId = :a. Id]; if (opplist.size() == 0) {
Opportunity oppty = new Opportunity (Name = a.name, StageName = ‘Prospecting’, ClogeDate = system. today ().addDays (30) ) ;
insert oppty; }}}
Users are able to update the account records via the UI and can see an opportunity created for high annual revenue accounts. However, when the administrator tries to upload a list of 179 accounts using Data Loader, it fails with System. Exception errors.
Which two actions should the developer take to fix the code segment shown above? Choose 2 answers
Move the DML that saves opportunities outside of the for loop.
Query for existing opportunities outside of the for loop.
Use Database. query to query the opportunities.
Check if all the required fields for Opportunity are being added on creation.
What are two use cases for executing Anonymous Apex code? Choose 2 answers
To run a batch Apex class to update all Contacts
To schedule an Apex class to run periodically
To add unit test code coverage to an org
To delete 15,000 inactive Accounts in a single transaction after a deployment
A software company uses the following objects and relationships:
Case: to handle customer support issues
Defect c: a custom object to represent known issues with the company's software
Cage Defect c: a junction object between Case and Defect o to represent that a defect is a cause of a customer issue
Case and Defect c have Private organization-wide defaults.
What should be done to share a specific Case_Defect c record with a user?
Share the parent Defect_c record.
Share the parent Case and Defect c records.
Share the Case_Defect c record.
Share the parent Case record.
A developer created a trigger on the Account object and wants to test if the trigger is properly bulkified. 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
Create a static resource containing test data.
Use the @isTest (seeAllData=true) annotation in the test class
Use the @isTest (iParallel=true) annotation in the test class
Use Test.loadData to populate data in your test methods.
A developer is building custom search functionality that uses SOSL to search account and contact records that match search terms provided by the end user. The feature is exposed through a Lightning web component, and the end user is able to provide a list of terms to search.
Consider the following code snippet: @AuraEnabled
public static Ligt<List<sObject>> searchTerms(List<String> termList) { List‹List<sObject>> result = new List <List<sObject>> ();
for (String term : termList){
regult.addAll([FIND :term IN ALL FIELDS RETURNING Account (Name), Contact (FirstName, LastName) ])}
return result; }
What is the maximum number of search terms the end user can provide to successfully execute the search without exceeding a governor limit?
20
150
200
2000
A developer creates a Lightning web component that imports a method within an Apex class. When a Validate button is pressed, the method runs to execute complex validations.
In this implementation scenario, which artifact is part of the Controller according to the MVC architecture?
HTML file
XML file
JavaScript file
Apex class
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?
Use Security. acripinaccegeible to remove fields inaccessible to the current user.
Use Lightning Data Service to get the collection of sales records.
Use WITH SECURITY_ENFORCED in the SQL that fetches the data for the component.
Use Lightning Locker Service to enforce sharing rules and field-level security.
AW Computing (AWC) handles orders in Salesforce and stores its product inventory in a field, Inventory c, on a custom object, Product c. When an order for a Product c is placed, the Inventory c field is reduced by the quantity of the order using an Apex trigger.
public void reduceInventory (Id prodid, Integer gty){
Integer newInventoryAmt = getNewInventoryAmt (prodId, qty) ;
Product c = new Product c(Id = prodId, Inventory c = newInventoryAmt; Uptade p;
// code goes here }
AWC wants the real-time inventory reduction for a product to be sent to many of its external systems, including some future systems the company is currently planning.
What should a developer add to the code at the placeholder to meet these requirements?
A
B
C
D
The OrderHelper class is a utility class that contains business logic for processing orders. Consider the following code snippet:
public class without sharing OrderHelper{
//code implementation
}
A developer needs to create a constant named DELIVERY_MULTIPLIER with a value of 4.15. The value of the constant should not change at any time in the code.
How should the developer declare the DELIVERY MULTIPLIER constant to meet the business objectives?
decimal DELIVERY MULTIPLIER=4.15;
static decimal DELIVERY MULTIPLIER=4.15;
constant decimal DELIVERY MULTIPLIER = 4.15:
static final decimal DELIVERY MULTIPLIER =4.15;
A developer is asked to create a Visualforce page that lists the contacts owned by the current user. This component will be embedded in a Lightning page.
Without writing unnecessary code, which controller should be used for this purpose?
Standard list controller
Custom controller
Lightning controller
Standard controller
12.Which two sfdx commands can be used to add testing data to a Developer sandbox?
Choose 2 answers
force:data:tree:import
force:data:object:create
force:data:bulk:upsert
force:data:async:upsert
A developer is debugging the following code to determine why Accounts are not being created Account a = new Account (Name = 'A');
Database.insert(a, false);
How should the code be altered to help debug the issue?
Add a try/catch around the insert method.
Add a System.debug() statement before the insert method.
Set the second insert method parameter to TRUE.
Collect the insert method return value in a SaveResult record.
An org has two custom objects:
Plan c, that has a master-detail relationship to the Account object
Plan_Item c, that has a master-detail relationship to the Plan c object
What should a developer use to create a Visualforce section on the Account page layout that displays all of the
Plan c records related to the Account and all of the Plan_Item c records related to those Plan c records.
A custom controller by itself
A standard controller with a controller extension
A standard controller with a custom controller
A controller extension with a custom controller
15.A third-party vendor created an unmanaged Lightning web component. The Salesforce Administrator wishes to expose the component only on Record Page Layouts.
Which two actions should the developer take to accomplish this business objective? Choose 2 answers
Ensure isExposed is set to true on the XML file.
Specify lightning RecordPage as a target in the XML file.
Specify lightningCommunicy Page_Layout as a target in the XML file.
Specify lightningCommunity Page as a target in the XML file.
AW Computing tracks order information in custom objects called Order c and Order_Line c. Currently, all shipping information is stored in the Order c object.
The company wants to expand its order application to support split shipments so that any number of
Order_Line c records on a single Order c can be shipped to different locations. What should a developer add to fulfill this requirement?
Order_Shipment_Group c object and master-detail field on Order_Line c
Order_ Shipment_Group c object and master-detail fields to Order c and Order_Line c
Order Shipment_ Group_ c object and master-detail field on Order c
Order Shipment_ Group_ c object and master-detail field on Order c
17.- Which annotation exposes an Apex class as a RESTful web service?
@RestResource
@AuraEnabled
@HttpInvocable
@RemoteAction
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?
Lookup field from Opportunity to Engineering_ support c
Master-detail field from Opportunity to Engineering_ support c
Lookup field from Engineering_Support c to Opportunity
Master-detail field from Engineering_ support c to Opportunity
A developer wrote Apex code that calls out to an external system. How should a developer write the test to provide test coverage?
Write a class that implements the HTTPCalloutMock.
Write a class that implements WebserviceMock.
Write a class that extends WebserviceMock.
Write a class that extends HTTPCalloutMock.
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?
The deployment passes because both classes and the trigger were included in the deployment.
The deployment fails because the Apex trigger has no code coverage.
The deployment passes because the Apex code has the required >75% code coverage.
The deployment fails because no assertions were made in the test method.
A developer created a Lightning web component called statusComponent to be inserted into the Account record page.
Which two things should the developer do to make this component available?
Choose 2 answers
Add <target>lighening RecordPage</target> to the statusComponent.js-meta.xml file.
Add <isExposed>true</isExposed> to the statusComponent.js-meta.xml file.
Add <masterLabel>Account</masterLabel> to the statusCompoment.js-meta.xml file.
Add <target>lightning RecordPage</target> to the statusComponent.js file.
22.Which two settings must be defined in order to update a record of a junction object? Choose 2 answers
Read/Write access on the primary relationship
Read/Write access on the secondary relationship
Read access on the primary relationship
Read/Write access on the junction object
Universal Containers uses Service Cloud with a custom field, Stage c, on the Case object.
Management wants to send a follow-up email reminder 6 hours after the Stage c field is set to "Waiting on Customer". The Salesforce Administrator wants to ensure the solution used is bulk safe.
Which two automation tools should a developer recommend to meet these business requirements?
Scheduled Flow
Record-Triggered Flow
Einstein Next Best Action
Entitlement Process
Universal Containers has a Visualforce page that displays a table of every Container c being rented by a given Account. Recently this page is failing with a view state limit because some of the customers rent over 10,000 containers.
What should a developer change about the Visualforce page to help with the page load errors?
Implement pagination with a StandardSetController.
Use JavaScript remoting with SOQL Offset.
Implement pagination with an OffsetController.
Use lazy loading and a transient List variable.
The code below deserializes input into a list of Accounts.
public class AcctCreator {
public void insertAccounts() {
String acctsJson = getAccountsJson();
List<Account>accts = (List<Account>) JSON.deserialize(acctsJson, List<Account>.class);
05
06 // DML to insert accounts 07 }
08 // … other code including getAccountJson implementation 09 }
Which code modification should be made to insert the Accounts so that field-level security is respected?
01: public with sharing class AcctCreator
05: if (s0bjectType.Account.isCreatable())
05: accts = Database.stripInaccessible(accts, Database.CREATABLE);
05: sObjectAccessDecision sd = Security.stripInaccessible (AccessType.CREATABLE, accts);
A developer completed modifications to a customized feature that is comprised of two elements:
Apex trigger
Trigger handler Apex class
What are two factors that the developer must take into account to properly deploy the modification to the production environment?
Choose 2 answers
All methods in the test classes must use @isTest.
At least one line of code must be executed for the Apex trigger.
Test methods must be declared with the testMethod keyword.
Apex classes must have at least 75% code coverage org-wide.
27.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?
global inherited sharing class ProcesAccountProcessor implements Database.Batchable<sObject>, Schedulable
global inherited sharing class ProceegAccountProcessor implements Queueable
global inherited sharing class ProceegAccountProceessor implements Database.Batchable<sObject>
global inherited sharing class ProcessAccountProcessor implements Schedulable
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?
aura: flow
aura-flow
lightning-flow
lightning: flow
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?
Implement the line amount as a currency field and the order amount as a SUM formula field.
Write a single before trigger on the Line Item that calculates the item amount and updates the order amount on the Order.
Implement the line amount as a numeric formula field and the order amount as a roll-up summary field.
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.
Which two characteristics are true for Aura component events?
Choose 2 answers
By default, containers can handle events thrown by components they contain.
If a container component needs to handle a component event, add a includeFacetga"true attribute to its handler.
The event propagates to every owner in the containment hierarchy.
Depending on the current propagation phase, calling event. stopPropagation() may not stop the event propagation.
A developer is tasked with performing a complex validation using Apex as part of advanced business logic. When certain criteria are met for a PurchaseOrder, the developer must throw a custom exception.
What is the correct way for the developer to declare a class that can be used as an exception?
public class PurchaseOrder extends Exception{}
public class PurchaseOrder implements Exception{}
public class PurchaseOrderException implements Exception{}
public class PurchaseOrderException extends Exception{}
32.A Salesforce Administrator is creating a record-triggered flow. When certain criteria are met, the flow must call an Apex method to execute a complex validation involving several types of objects.
When creating the Apex method, which annotation should a developer use to ensure the method can be used within the flow?
@AuraEnabled
@future
@InvocableMethod
@RemoteAction
- Which statement should be used to allow some of the records in a list of records to be inserted if others fail to be inserted?
Database.insert(records, false)
insert (records, false)
Database .insert (records, true)
insert records
The Salesforce Administrator created a custom picklist field, Account_Status c, on the Account object. This picklist has possible values of "Inactive" and "Active". As part of a new business process, management wants to ensure an opportunity record is created only for Accounts marked as Active. A developer is asked to implement this business requirement.
Which automation tool should be used to fulfill the business need?
Salesforce Flow
Approval Process
Outbound Messaging
Entitlement process
Considering the following code snippet:
public static void insertAccounts(List<Account> theseAccounts){ for (Account ThisAccount : theseAccounts){
if (this.Account.website == null){ thisAccount.website='https://www.demo.com';
}
}
update theseAccounts;
}
When the code executes, a DML exception is thrown.
How should the developer modify the code to ensure exceptions are handled gracefully?
Implement the upsert: DML statement.
Implement Change Data Capture.
Implement a try/catch block for the DML.
Remove null items from the list of Accounts.
A developer receives an error when trying to call a global server-side method using the @remoteAction decorator. How can the developer resolve the error?
Add static to the server-side method signature.
Decorate the server-side method with (static=false).
Decorate the server-side method with (static=true).
Change the function signature to be private static.
The following automations already exist on the Account object:
A workflow rule that updates a field when a certain criteria is met
A custom validation on a field
A flow that updates related contact records A developer created a trigger on the Account object.
What should the developer consider while testing the trigger code?
The flow may be launched multiple times.
A workflow rule field update will cause the custom validation to run again.
The trigger may fire multiple times during a transaction.
Workflow rules will fire only after the trigger has committed all ML operations to the database.
38.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?
An outbound message
An Apex REST class
An invocable method
An Apex controller
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?
Lightning Data Service ignores field-level security.
The with sharing keyword must be used to enforce sharing rules.
The isAccessible() method must be used for field-level access checks.
Lightning Data Service handles sharing rules and field-level security.
A developer wrote the following two classes: public with sharing class StatueFetcher {
private Boolean active = true; private Boolean isActive() {
return active; }}
public with sharing class Calculator { public void deCalculations () {
StatusFetcher fetcher = new StatusFetcher (); İf(sFetcher.isActive()) {
//do calculations here }}}
The StatusFetcher class successfully compiled and saved. However, the Calculator class has a compile time error. How should the developer fix this code?
Make the isActive method in the statusFetcher class public.
Change the class declaration for the Calculator class to public with inherited sharing.
Make the doCalculations method in the Calculator class private.
Change the class declaration for the StatusFetcher class to public with inherited sharing.
41.Get Cloudy Consulting (GCC) has a multitude of servers that host its customers' websites. GCC wants to provide a servers status page that is always on display in its call center. It should update in real time with any changes
made to any servers. To accommodate this on the server side, a developer created a Server Update platform event.
The developer is working on a Lightning web component to display the information.
What should be added to the Lightning web component to allow the developer to interact with the Server Update platform event?
import ( subscribe, unsubscribe, onError ) from 'lightning/MeggageChannel'
import ( subscribe, unsubscribe, onError ) from 'lightning/pubsub'
import ( subscribe, unsubscribe, onError )from 'lightning/empApi'
import ( subscribe, unsubscribe, onError ) from 'lightning/ServerUpdate
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?
Exception
Messaging
OrgLimits
Limits
Universal Containers is building a recruiting app with an Applicant object that stores information about an individual person and a Job object that represents a job. Each applicant may apply for more than one job.
What should a developer implement to represent that an applicant has applied for a job?
Lookup field from Applicant to job
Junction object between Applicant and job
Formula field on Applicant that references Job
Master-detail field from Applicant to Job
The following code snippet is executed by a Lightning web component in an environment with more than 2,000 lead records:
@AuraEnabled
public void static updateLeads() {
for (Lead thislead : (SELECI Origin e FROM Lead]) ! thisLead. LeadSource = thisLead. Origin; update thisLead; }}
Which governor limit will likely be exceeded within the Apex transaction?
Total number of records processed as a result of DML statements
Total number of records retrieved by SOQL queries
Total number of SOQL queries issued
Total number of DML statements issued
45.What is the result of the following code? Account a = new Account();
Database. insert (a, false);
The record will be created and a message will be in the debug log.
The record will not be created and no error will be reported.
The record will not be created and an exception will be thrown.
The record will be created and no error will be reported.
A developer creates a custom exception as shown below: public class ParityException extends Exception {}
What are two ways the developer can fire the exception in Apex?
Choose 2 answers
throw new ParityException ("parity does not match);
throw new ParityException () ;
new ParityException ('parity does mop match') ;
new ParityException() ;
A developer created a custom order management app that uses an Apex class. The order is represented by an Order object and an OrderItem 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 OrderItem records to a new Order record?
Change the master-detail relationship to an external lookup relationship.
Create a junction object between Orderltem and Order.
Select the Allow reparenting option on the master-detail relationship.
Add without sharing to the Apex class declaration.
A developer created a child Lightning web component nested inside a parent Lightning web component. The parent component needs to pass a string value to the child component.
In which two ways can this be accomplished? Choose 2 answers
The parent component can use the Apex controller class to send data to the child component.
The parent component can use a public property to pass the data to the child component.
The parent component can invoke a method in the child component.
The parent component can use a custom event to pass the data to the child component.
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.
Create a custom event to handle the communication between components.
Use an application event to communicate between the components.
The Toggle component should call a method in the Temperature component.
Use Lightning Message Service to communicate between the components.
50.Universal Containers 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 S0AP messages over HTTPS. If the connection fails, messages should be retried for up to 24 hours.
What is the recommended approach to syne the orders in Salesforce with the order fulfillment system?
Set up a Workflow Rule outbound message to the order fulfillment system.
Create an after insert trigger on the Order object to make a callout to the order fulfillment system
Write an Apex SOAP service to integrate with the order fulfillment system.
Use Process Builder to call an invocable Apex method that sends a message to the order fulfillment system.
Where are two locations a developer can look to find information about the status of batch or future methods? Choose 2 answers
Apex Jobs
Time-Based Workflow Monitor
Apex Flex Queue
Paused Flow Interviews component
- What should a developer use to script the deployment and unit test execution as part of continuous integration?
Execute Anonymous
VS Code
Developer Console
Salesforce CLI
A business implemented a gamification plan to encourage its customers to watch some educational videos.
Customers can watch videos over several days, and their progress is recorded. Award points are granted to customers for all completed videos. When the video is marked as completed in Salesforce, an external web service must be called so that points can be awarded to the user.
A developer implemented these requirements in the after update trigger by making a call to an external web service. However, a Syetem. CalloutException is occurring.
What should the developer do to fix this error?
Replace the after update trigger with a before insert trigger.
Surround the external call with a try-catch block to handle the exception.
Move the callout to an asynchronous method with @future( callout=true) annotation.
Write a REST service to integrate with the external web service.
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?
Record-Triggered Flow
Workflow Rules
Scheduled job
Process Builder
Which scenario is valid for execution by unit tests?
Set the created date of a record using a system method.
Execute anonymous Apex as a different user.
Load data from a remote site with a callout.
Generate a Visualforce PDF with getContentAsPDF().
56.- Which three steps allow a custom scalable vector graphics (SVG) to be included in a Lightning web component?
Upload the SVG as a static resource.
Import the static resource and provide a variable for it in JavaScript.
Import the SVG as a content asset file.
Reference the import in the HTML template.
Reference the property in the HTML template.
A developer needs to have records with specific fleld values in order to test a new Apex class. What should the developer do to ensure the data is avallable to the test?
Use Test.loadData () and reference a CSV file in a static resource.
Use Anonymous Apex to create the required data.
Use SOQL to query the org for the required data.
Use Test.loadData () and reference a JSON file in Documents.
A Developer Edition org has five existing accounts. A developer wants to add 10 more accounts for testing purposes.
The following code is executed in the Developer Console using the Execute Anonymous window:
Account myAccount = new Account (Name = ‘MyAccount’); İnsert myAccount;
Integer x = 1;
List(Account> newAccounts = new List<Account> (); Do (
Account acct = new Account (Name = ‘New Account ‘ + xx++); Newaccounts.add (acct) ;
) while (x < 10) ;
How many total accounts will be in the org after this code is executed?
5
6
10
15
Which two process automations can be used on their own to send Salesforce Outbound Message? Choose 2 answers
Workflow Rule
Process Builder
Flow Builder
Strategy Builder
60.A developer created these three Rollup Summary fields in the custom object, Project c;
Total Timesheets c
Total Approved Timesheets c Total Rejected Timesheet c
The developer is asked to create a new field that shows the ratio between rejected and approved timesheets for a given project.
What are two benefits of choosing a formula field instead of an Apex trigger to fulfill the request? Choose 2 answers
A formula field will trigger existing automation when deployed.
A formula field will calculate the value retroactively for existing records.
Using a formula field reduces maintenance overhead.
A test class that validates the formula field is needed for deployment.
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
B
C
D
Which two statements are true about using the @testSetup annotation in an Apex test class?
Choose 2 answers
A method defined with the @testSetup annotation executes once for each test method in the lest class and counts towards system limits.
In a test setup method, test data is Inserted once and made available for all test methods in the test class.
The @testSetup annotation is not supported when the @isTest(SeeAlIData = True) annotation is used.
Records created in the test setup method cannot be updated in individual test methods.
Einstein Next Best Action is configured at Universal Containers to display recommendations to internal users on the Account detail page. If the recommendation is approved, a new opportunity record and task should be generated. If the recommendation is rejected, an Apex method must be executed to perform a callout to an external system.
Which three factors should a developer keep in mind when Implementing the Apex method?
Choose 3 answers
The method must be defined as static.
The method must use the @AuraEnabled annotation.
The method must use the @InvocableMethod annotation.
The method must be defined as public.
The method must use the @Future annotation.
64.Universal Containers uses a Master-Detail relationship and stores the availability date on each Line Item of an Order and Orders are only shipped when all of the Line Items are available.
Use a DAYS formula on each of the availability date fields and a COUNT Roll-Up Summary field on the Order.
Use a CEILING formula on each of the latest availability date fields.
Use a LATEST formula on each of the latest availability date fields.
Use a MAX Roll-Up Summary field on the latest availability date fields.
- What can be developed using the Lightning Component framework?
Salesforce integrations
Hosted web applications
Dynamic web sites
Single-page web apps
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?
Formula Field
Workflow Rule
Process Builder
Validation Rule
- Which code in a Visualforce page and/or controller might present a security vulnerability?
<apex: outputText value=" {!$CurrentPage.parameters,.userInput}” />
<apex: outputField value=" {!crtl.userInput}" />
<apex: outputText escape="false" value=" {!$CurrentPage.parameters.userInput}” />
<apex:outputField escape=”false" values=”{!ctrl.userInput}” />
A development team wants to use a deployment script to automatically deploy to a sandbox during their development cycles.
Which two tools can they use to run a script that deploys to a sandbox? Choose 2 answers
SFDX CLI
VSCode
Developer Console
Change Sets
A development team wants to use a deployment script to automatically deploy to a sandbox during their development cycles.
Which two tools can they use to run a script that deploys to a sandbox? Choose 2 answers
Ant Migration Tool
Change Sets
SFDX CLI
Developer Console
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?
Create the Picklist on each object and use a Global Picklist Value Set containing the values.
Create the Picklist on each object as a required field and select "Display values alphabetically, not in the order entered".
Create the Picklist on each object and select "Restrict picklist to the values defined in the value set"
Create the Picklist on each object and add a validation rule to ensure data integrity.
A developer must modify the following code snippet to prevent the number of SOQL queries issued from exceeding the platform governor limit.
The above method might be called during a trigger execution via a Lightning component. Which technique should be implemented to avoid reaching the governor limit?
Use the System.Limits.getLimitsQueries () method to ensure the number of queries is less than 100.
Refactor the code above to perform the SOQL query only if the Set of opportunityIds contains less 100 Ids.
Use the system.Limits.getQueries () method to ensure the number of queries is less than 100.
Refactor the code above to perform only one SOQL query, filtering by the Set of opportunityIds,
72.A developer writes a trigger on the Account object on the before update event that increments a count field. A workflow rule also increments the count field every time that an Account is created or updated. The field update in the workflow rule is configured to not re-evaluate workflow rules.
What is the value of the count field if an Account is inserted with an initial value of zero, assuming no other automation logic is implemented on the Account?
2
1
4
3
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.
The Vendor records have existing values in the Account object.
The Vendor object must use a Master-Detail field for reporting.
The Account object is included on a workflow on the Vendor object.
The Account records contain Vendor roll-up summary fields
A developer needs to create a custom button for the Account object that, when clicked, will perform a series of calculations and redirect the user to a custom Visualforce page. Which three attributes need to be defined with values in the <apex:page> tag to accomplish this?
Choose 3 answers
renderAs
action
standardController
extensions
readOnly
Which exception type cannot be caught?
LimitException
A Custom Exception
NoAccessException
CalloutException
Which three Salesforce resources can be accessed from a Lightning web component?
Static resources
Content asset files
Third-party web components
All external libraries
SVG resources
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 all it's trainers?
SELECI Id, (SELECT Id FROM Trainers_r) FROM Gym_c WHERE Name = ‘Viridian City Gym’
SELECI Id, (SELECT Id FROM Trainers_c) FROM Gym_c WHERE Name = ‘Viridian City Gym’
SELECI Id, (SELECT Id FROM Trainer_r) FROM Gym_c WHERE Name = ‘Viridian City Gym’
SELECI Id, FROM Trainers__c WHERE gym__r.Name =‘Viridian City Gym’
Instead of sending emails to support personnel directly from Salesforce, Universal Containers wants to notify an external system in the event that an unhandled exception occurs.
What is the appropriate publish/subscribe logic to meet this requirement?
Since this only involves sending emails, no publishing is necessary. Have the external system subscribe to the BastcApecerror event.
Publish the error event using the addError () method and have the external system subscribe to the event using CometD.
Publish the error event using the Eventbus.publish () method and have the external system subscribe to the event
using CometD.
Publish the error event using the addError () method and write a trigger to subscribe to the event and notify the external system.
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?
Query the Profile where the ID equals userInfo.getProfileID() and then use the profile.Opportunity. getDefaultRecordType() method.
Use Opportunity.SObjectType.getDescribe().getRecordTypeInfos()togetalistofrecordtypes,and iterate through
them until isDefaultRecordTypeMapping() is true.
C. Use the Schema.userInfo.Opportunity.getDefaultRecordType() method.
Create the opportunity and check the opportunity.recordType before inserting, which will have the record ID of
the current user's default record type.
What are two ways for a developer to execute tests in an org? Choose 2 answers
Developer Console
Tooling API
Bulk API
Metadata API
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?
Use the Data Loader command line.
Create a Schedulable Apex class.
Schedule a report.
A. Define a Data Export scheduled job.
If Apex code executes inside the execute () method of an Apex class when implementing the Barchable interface, which two statement are true regarding governor limits?
Choose 2 answers
A. The Apex governor limits cannot be exceeded due to the asynchronous nature of the transaction.
The Apex governor limits might be higher due to the asynchronous nature of the transaction.
The Apex governor limits are reset for each iteration of the execute () method.
The Apex governor limits are relaxed while calling the constructor of the Apex class.
