Users report that a button on a custom Lightning web component is not working. However, there are no other details provided.
What should the developer use to ensure error messages are properly displayed?
AAdd the tag to the component.
BAdd a try-catch block surrounding the DML statement.
CUse the Database method with allOrNone set to false.
DAdd JavaScript and HTML to display an error message.
When the sales team views an individual customer record, they need to see recent interactions for the customer. These interactions can be sales, orders, phone calls, or Cases. The date range for recent interactions will be different for every customer record type.
How can this be accomplished?
AUse a Lightning component to query and display interactions based on record type that is passed in using a design:attribute from the Lightning page.
BUse a dynamic form on the customer record page to display recent interactions.
CUse batch Apex to query for the most recent interactions when the customer view screen is loaded.
DUse Lightning Flow to read the customer's record type, and then do a dynamic query for recent interactions and display on the View page.
Which of the following object types can be used with a Web Service?
AMaps
BSets
CPattern objects
DMatcher objects
ELists
FException objects
A company accepts orders for customers in their enterprise resource planning (ERP) system that must be integrated into Salesforce as Order__c records with a lookup field to Account. The Account object has an external ID field, ERP_Customer_ID__c.
What should the integration use to create new Order__c records that will automatically be related to the correct Account?
AInsert on the Order__c object followed by an update on the Order__c object.
BMerge on the Order__c object and specify the ERP_Customer_ID__c for the Account relationship.
CUpsert on the Order__c object and specify the ERP_Customer_ID__c for the Account relationship.
DUpsert on the Account and specify the ERP_Customer_ID__c for the relationship.
A developer creates a Lightning web component to allow a Contact to be quickly entered. However, error messages are not displayed.
Which component should the developer add to the form to display error messages?
Alightning-messages
Baura:messages
Clightning-error
Dapex:messages
A developer sees test failures in the sandbox but not in production. No code or metadata changes have been actively made to either environment since the sandbox was created.
Which consideration should be checked to resolve the issue?
AEnsure the sandbox is on the same release as production.
BEnsure Workflow Rules are inactive.
CEnsure the Apex Classes are on the same API version.
DEnsure Process Builder processes are inactive.
A company has reference data stored in multiple custom metadata records that represent default information and delete behavior for certain geographic regions.
When a contact is inserted, the default information should be set on the contact from the custom metadata records based on the contact's address information. Additionally, if a user attempts to delete a contact that belongs to a flagged region, the user must get an error message.
What is the optimal way to automate this?
AApex invocable method
BRemote action
CFlow Builder
DApex trigger
Users complain that a page is very slow to respond. Upon investigation, the query below is found to perform slowly.
Which two actions can a developer take to improve performance? (Choose two.)
AMake the CustomField_c field an External ID.
BMake the field CustomField_c required because Salesforce field indexes do not include nulls.
CAdd a LIMIT clause to the query to reduce the number of records returned.
DContact Salesforce customer support to create a custom index to include null values.
Which interface needs to be implemented by a Lightning Component so that it may be displayed in modal dialog by clicking a button on a Lightning Record page?
Aforce:lightningQuickAction
Blightning:quickAction
Clightning:editAction
Dforce:lightningEditAction
A company has a custom object, Sales Demo Request, that has a lookup to an Opportunity. It is required that a Sales Demo Request record be created when an
Opportunity's Probability is greater than 50%.
What is the optimal way to automate this?
AUse an Apex Trigger on Opportunity.
BBuild a Flow on Opportunity.
CCreate a Workflow on Opportunity.
DBuild a Process on Opportunity.
A company uses an external system to manage its custom account territory assignments. Every quarter, millions of Accounts may be updated in Salesforce with new Owners when the territory assignments are completed in the external system.
What is the optimal way to update the Accounts from the external system?
ABulk API
BSOAP API
CApex REST Web Service
DComposite REST API
A company wants to implement a new call center process for handling customer service calls. It requires service reps to ask for the caller's account number before proceeding with the rest of their call script.
Following best practices, what should a developer use to meet this requirement?
AApex Trigger
BProcess Builder
CFlow Builder
DApprovals
A large company uses Salesforce across several departments. Each department has its own Salesforce Administrator. It was agreed that each Administrator would have their own sandbox in which to test changes.
Recently, users notice that fields that were recently added for one department suddenly disappear without warning. Also, Workflows that once sent emails and created tasks no longer do so.
Which two statements are true regarding these issues and resolution? (Choose two.)
AThe administrators are deploying their own Change Sets, thus deleting each other's fields from the objects in production.
BA sandbox should be created to use as a unified testing environment instead of deploying Change Sets directly to production.
CPage Layouts should never be deployed via Change Sets, as this causes Workflows and Field-level Security to be reset and fields to disappear.
DThe administrators are deploying their own Change Sets over each other, thus replacing entire Page Layouts and Workflows in Production.
What is a benefit of JavaScript remoting over Visualforce Remote Objects?
AAllows for specified re-render targets
BDoes not require any Apex code
CDoes not require any JavaScript code
DSupports complex server-side application logic
Recently a Salesforce org's integration failed because it exceeded the number of allowed API calls in a 24-hour period. The integration handles a near real-time, complex insertion of data into Salesforce.
The flow of data is as follows:
✑ The integration looks up Contact records with a given email address and, if found, the integration adds a Task to the first matching Contact it finds.
✑ If a match is not found, the integration looks up Lead records with a given email address and, if found, the integration adds a Task to the first matching Lead it finds.
✑ If a match is not found, the integration will create a Lead and a Task for that newly created Lead.
What is one way in which the integration can stay near real-time, but not exceed the number of allowed API calls in a 24-hour period?
AUse the REST API as well as the SOAP API to effectively double the API calls allowed in a 24-hour period.
BCreate an Inbound Message that, using Flow, can do all of the logic the integration code was doing.
CWrite a custom Apex web service that, given an email address, does all of the logic the integration code was doing.
DCreate several Apex InboundEmailHandlers to accept calls from the third-party system, thus bypassing the API limits.
A developer created a new trigger that inserts a Task when a new Lead is created. After deploying to production, an outside integration is periodically reporting errors.
Which change should the developer make to ensure the integration is not affected with minimal impact to business logic?
ARemove the Apex Class from the Integration User's Profile.
BUse the Database method with allOrNone set to False.
CUse a Try/Catch block after the insert statement.
DDeactivate the Trigger before the Integration runs.
A developer is trying to access org data from within a test class.
Which sObject type requires the test class to have the (seeAllData=true) annotation?
AReport
BUser
CProfile
DRecordType
A developer is asked to update data in an org based on new business rules. The new rules state that Accounts with the type set to 'Customer' should have a status of 'Active', and Accounts with the type set to 'Prospect' should have a status of 'Pending'. No other changes to data should be made.
Which code block will accurately meet the business requirements?
AMap<String, String> statusMap = new Map<String, String>{'Customer'=>'Active', 'Prospect'=>'Pending'} List<Account> accountUpdates = new List<Account>(); for ( Account a : [SELECT Id, Type FROM Account]){ if ( statusMap.containsKey(a.Type) ) { a.Status = a.Type == 'Customer' ? 'Active' : 'Pending'; } accountUpdates.add(a); } update accountUpdates;
BMap<String, String> statusMap = new Map<String, String>{'Customer'=>'Active', 'Prospect'=>'Pending'} List<Account> accountUpdates = new List<Account>(); for ( Account a : [SELECT Id, Type FROM Account WHERE Status IN :statusMap.keySet()]){ a.Status = statusMap.get(a.Type); accountUpdates.add(a); } update accountUpdates;
CList<Account> accountUpdates = new List<Account>(); for ( Account a : [SELECT Id, Type FROM Account]){ if ( String.isNotBlank(a.Type) && a.Type == 'Customer' ){ a.Status = 'Active'; } if ( String.isNotBlank(a.Type) && a.Type == 'Prospect' ){ a.Status = 'Pending'; } accountUpdates.add(a); } update accountUpdades;
DList<Account> accountUpdates = new List<Account>(); for ( Account a : [SELECT Id, Type FROM Account]){ a.Status = a.Type == 'Customer' ? 'Active' : 'Pending'; accountUpdates.add(a); } update accountUpdates;
A company notices that their unit tests in a test class with many methods to create many records for prerequisite reference data are slow.
What can a developer to do address the issue?
AMove the prerequisite reference data setup to a TestDataFactory and call that from each test method.
BMove the prerequisite reference data setup to a @testSetup method in the test class.
CMove the prerequisite reference data setup to a static method in the test class and call that from each test method.
DMove the prerequisite reference data setup to the constructor for the test class.
A developer is trying to decide between creating a Visualforce component or a Lightning component for a custom screen.
Which functionality consideration impacts the final decision?
ADoes the screen need to be rendered as a PDF?
BDoes the screen need to be accessible from the Lightning Experience UI?
CWill the screen make use of a JavaScript framework?
DWill the screen be accessed via a mobile app?
A company recently deployed a Visualforce page with a custom controller that has a data grid of information about Opportunities in the org. Users report that they receive a Maximum view state size limit error message under certain conditions.
According to Visualforce best practice, which three actions should the developer take to reduce the view state? (Choose three.)
AUse the transient keyword in the Apex controller for variables that do not maintain state
BUse the final keyword in the controller for variables that will not change
CUse the private keyword in the controller for variables
DRefine any SOQL queries to return only data relevant to the page
EUse filters and pagination to reduce the amount of data
Choose the correct definition for <apex:messages>.
AStandard Salesforce formatting, throws a specific message on a page
BStandard Salesforce formatting, shows all errors that occur on page. Can add more messages through the "ApexPages.addMessage" function
CA single message, without formatting, that can be associated with a specific component on the page
DNo formatting; displays all errors on a page
How many Territories can an instance of salesforce have?