While developing Apex class with custom search functionality that will be launched from a Lightning Web Component, how can the developer ensure only records accessible to the currently logged in user are displayed?
AUse the with sharing keyword.
BUse the intertied sharing keyword.
CUse the without sharing keyword.
DUse the WITH SECURITY_ENFORCED clause within the SOQL
Consider the following code snippet:
Give the multi-tenant architecture of the Salesforce platform, what is a best practice a developer should implement and ensure successful execution of the method?
AAvoid returning an empty List of records.
BAvoid executing queries without a limit clause.
CAvoid using variables as query filters.
DAvoid performing queries inside for loops.
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?
ASchedule a report
BUse the Data Loader command line
CCreate a Schedulable Apex class
DDefine a Data Export scheduled job.
What is an example of a polymorphic lookup field in Salesforce?
AThe WhatId filed on the standard Event object
BA custom field, Link_ _c, on the standard Contact object that looks up to an Account or a Campaign
CThe LeadId and ContactId fields on the standard Campaign Member object
DThe ParentID field on the standard Account object
A developer wants to mark each Account in a List<Account> as either Active or Inactive, based on the value in the LastModifiedDate field of each Account being greater than 90 days in the past.
Which Apex technique should the developer use?
AA for loop, with an if or if/else statement inside
BAn if-else statement, with a for loop inside
CA switch statement, with a for loop inside
DA for loop, with a switch statement inside
Consider the following code snippet for a Visualforce page that is launched using a Custom Button on the Account detail page layout.
When the Save button is pressed the developer must perform a complex validation that involves multiple objects and, upon success, redirect the user to another Visualforce page.
What can the developer use to meet this business requirement?
ACustom controller
BApex trigger
CValidation rule
DController extension
Which two actions may cause triggers to fire? (Choose two.)
ARenaming or replacing a picklist entry
BChanging a user’s default division when the transfer division option is checked
CCascading delete operations
DUpdates to FeedItem
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?
ACreate the Picklist on each object as a required field and select “Display values alphabetically, not in the order entered”.
BCreate the Picklist on each object and add a validation rule to ensure data integrity.
CCreate the Picklist on each object and select “Restrict picklist to the values defined in the value set”.
DCreate the Picklist on each object and use a Global Picklist Value Set containing the values.
A developer is alerted to an issue with a custom Apex trigger that is causing records to be duplicated.
What is the most appropriate debugging approach to troubleshoot issue?
AReview the Historical Event logs to identify the source of the issue.
BAdd system, debug statements to the code to track the execution flow and identify the issue.
CDisable the trigger in production and test to see if the issue still occurs.
DUse the Apex Interactive Debugger to step through the code and identify the issue.
The following code snippet is executed by Lightning web component in an environment with more than 2,000 lead records:
Which governor limit will likely be exceeded within the Apex transaction?
ATotal number of records processed as a result of DML statements
BTotal number of records retrieved by SOQL queries
CTotal number of DML statement issued
DTotal number of SOQL queries issued
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?
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 on the record type before inserting the record.
How can the developer find the current user’s default record type?
ACreate the opportunity and check the opportunity.recordType, which will have the record ID of the current user’s default record type, before inserting.
BUse Opportunity.SObjectType.getDescribe().getRecordTypeInfos() to get a list of record types, and iterate through them until isDefaultRecordTypeMapping () is true.
CQuery the Profile where the ID equals userInfo.getProfileID() and then use the profile.Opportunity.getDefaultRecordType() method?
DUse the Schema.userInfo.Opportunity.getDefaultRecordType () method.
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?
AAn error condition formula on a validation rule on Opportunity
BAn Apex trigger on the Opportunity object
CAn approval process on the Opportunity object
DA record trigger flow on the Opportunity object
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 two.)
AAdd <target>lightning_RecordPage</target> to the statusComponent.js file
BSet isExposed to true in the statusComponent.js-meta.xml file
CAdd <target>lightning_RecordPage</target> to the startusComponent.js-meta.xml file.
DAdd <masterLabel>Account</masterLabel> to the statusComponent.js-meta.xml file.
A developer is tasked to perform a security review of the ContactSearch Apex class that exists in the system. Within the class, the developer identifies the following method as a security threat:
What are two ways the developer can update the method to prevent a SOQL injection attack? (Choose two.)
AUse variable binding and replace the dynamic query with a static SOQL
BUse the escapeSingleQuotes method to sanitize the parameter before its use
CUse the @ReadOnly annotation and the with sharing keyword on the class
DUse a regular expression expression on the parameter to remove special characters
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<apex:facet name= “messages” />
B<apex:pageMessage severity=“info” />
C<apex:pageMessages />
D<apex: message for=“info”/>
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 two.)_
AA throw new ParityException (‘parity does not match’)
Bnew ParityException (‘parity does not match’)
Cnew ParityException()
Dthrow new ParityException()
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?
Ainsert (records, false)
BDatabase.insert (records, true)
Cinsert records
DDatabase.insert (records, false)
Universal Containers is developing a new Lightening web component for their marketing department. They want to ensure that the component is fine tuned and provides a seamless user experience.
What are some benefits of using the Lightning Component framework?
ABetter performance due to client-side rendering
BEasy integration with third-party libraries
CCompatibility with all web browsers
DAutomatic support for accessibility standards
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?
AData Loader runs from the developer’s browser.
BData Import Wizard can not import all 500 records.
CData Loader automatically relates Opportunities to Accounts.
DData Import Wizard does not support Opportunities.
How can a developer check the test coverage of autolaunched Flows before deploying them in a change set?
AUse the Flow Properties page
BUse the Code Coverage Setup page
CUse the ApexTestResult class
DUse SOQL and the Tooling API
What are two ways for a developer to execute tests in an org? (Choose two.)
AMetadata API
BDeveloper Console
CTooling API
DBulk API
Which three steps allow a custom Scalable Vector Graphic (SVG) to be included in a Lightning web component? (Choose three.)
AImport the SVG as a content asset file.
BImport the static resource and provide a JavaScript property for it.
CUpload the SVG as a static resource.
DReference the import in the HTML template.
EReference the property in the HTML template.
Universal Containers wants to ensure that all new leads created in the system have a valid email address. They have already created a validation rule to enforce this requirement, but want to add an additional layer of validation using automation.
What would be the best solution for this requirement?
AUse a custom Lightning Web component to make a callout to validate the fields on a third party system.
BSubmit a REST API Callout with a JSON payload and validate the fields on a third party system
CUse a before-save Apex trigger on the Lead object to validate the email address and display an error message if it is invalid
DUse an Approval Process to enforce the completion of a valid email address using an outbound message action
A Lightning component has a wired property, searchResults, that stores a list of Opportunities.
Which definition of the Apex method, to which the searchResults property is wired, should be used?