A company uses Dpportunities to track sales to their customers and their org has millions of Opportunities. They want to begin to track revenue over time through a related Revenue object.
As part of their initial implementation, they want to perform a one-time seeding of their data by automatically creating and populating Revenue records for Opportunities, based on complex logic.
They estimate that roughly 100,000 Opportunities will have Revenue records created and populated.
What is the optimal way to automate this?
Which statement is true regarding savepoints?
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.
Depending on company personnel resources, what are two ways to automate this?
Choose 2 answers
A company has a custom component that allows users to search for records of a
certain object type by invoking an Apex Controller that returns a list of results
based on the user's input. When the search is completed, a searchComplete event
is fired, with the results put in a results attribute of the event. The component is
designed to be used within other components and may appear on a single page
more than once.
What is the optimal code that should be added to fire the event when the search has completed?
A)
B)
C)
D)
Consider the following code snippet:
A developer created the following test class to provide the proper code coverage for the snippet above:
However, when the test runs, no data is returned and the assertion fails.
Which edit should the developer make to ensure the test class runs successfully?
Refer to the following code snippet:
A developer created a JavaScript function as part of a Lightning web component (LWC) that surfaces information about Leads by wire calling geyFetchLeadList whencertain criteria are met.
Which three changes should the developer implement in the Apex class above to ensure the LWC can display data efficiently while preserving security?
Choose 3 answers
Business rules require a Contact ta always be created when a new Account is created.
What can be used when developing a custom screen to ensure an Account is not created if the creation of the Contact fails?
A company manages information about their product offerings in custom objects named Catalog and Catalog Item. Catalog Item has a master-detail field to Catalog, and each Catalog may have as many as 100,000 Catalog Items.
Both custom objects have a CurrencylsoCode text field that contains the currency
code they should use. If a Catalog's CurrencylsoCode changes, all of its Catalog
Items’ CurrencylsoCodes should be changed as well.
What should a developer use to update the CurrencylsoCodes on the Catalog Items
when the Catalog's CurrencylsoCode changes?
A developer wrote a class named asccuntRisteryManager that relies on field history tracking. The class has a static method called getaccountHistory that Lakes in an Account as a parameter and returns a list of associated accountHistory object records.
The following test fails:
What should be done to make this test pass?
A developer is asked to build a solution that will automatically send an email to the customer when an Opportunity stage changes. The solution must scale to allow for 10,000 emails per day. The criteria to send the email should be evaluated after certain conditions are met.
What is the optimal way to accomplish this?
A Visualforce page contains an industry select list and displays a table of Accounts that have a matching value in their Industry field.
When a user changes the value in the industry select list, the table of Accounts
should be automatically updated to show the Accounts associated with the selected
industry,
What is the optimal way to implement this?
A developer used custom settings to store some configuration data that changes occasionally. However, tests are now Failing in some of the sandboxes that were recently refreshed.
What should be done to eliminate this issue going forward?
Universal Containers (UC) has an ERP system that stores customer Information,
When an Account is created in Salesforce, the ERP system's REST endpoint for creating new customers must automatically be called with the Account information. If the call to the ERP
system falls, the Account should still be created. Accounts in the UC org are only created, one at a time, by users in the UC customer on-boarding department.
What should a developer implement to make the call to the ERP
system's REST endpoint?
A developer created the following test method:
The developer org has five accounts where the name starts with “Test”. The developer executes this test in the Developer Console.
After the test code runs, which statement is true?
A company needs to automatically delete sensitive information after seven years.
This could delete almost a million records every day.
How can this be achieved?
Recently, users notice that fields that were recently added for one department suddenly disappear without warning.
Which two statements are true regarding these issues and resolution?
Choose 2 answers
A developer is inserting, updating, and deleting multiple lists of records in a single transaction and wants to ensure that any error prevents all execution.
How should the developer implement error exception handling in their code to handle this?
Universal Containers ne=ds to integrate with several external systems. The process Is Initiated when a record Is created in Salesforce, The remote systems do not require Salesforce to wait for a response before continuing.
What is the recommended best solution to accomplish this?
Universal Containers implements a private sharing model for the Convention Attendee co custom object. As part of a new quality assurance effort, the company created an Event_Reviewer_c user lookup field on the object.
Management wants the event reviewer to automatically gain ReadWrite access to
every record they are assigned to.
What is the best approach to ensure the assigned reviewer obtains Read/Write access to the record?
Which two queries are selective SOQL queries and can be used for a large data set of 200,000 Account records?
Choose 2 answers
A developer is developing a reusable Aura component that will reside on an sObject Lightning page with the following HTML snippet:
How can the component"5 controller get the context of the Lightning page that the sObject is on without requiring additional test coverage?
How should a developer assert that a trigger with an asynchronous process has successfully run?
There are user complaints about slow render times of a custom data table within a Visualforce page that loads thousands of Account records at once.
What can a developer do to help alleviate such issues?
A developer has a test class that creates test data before making a mock callout but now receives a 'You have uncommitted work pending. Please commit or rollback before calling out’ error.
Which step should be taken to resolve the error?
An org has 2 requirement that addresses on Contacts and Accounts should be normalized to a company standard by Apex code any time that they are saved.
What is the optimal way to implement this?
What is a benefit of JavaScript remoting over Visualforce Remote Objects?
Universal Containers develops a Salesforce application that requires frequent interaction with an external REST API.
To avoid duplicating code and improve maintainability, how should they implement the APL integration for code reuse?
Refer to the Aura component below:
A developer receives complaints that the component loads slowly.
Which change can the developer implement to make the component perform faster?
When developing a Lightning web component, which setting displays lightninglayout-items im one column on small devices, such as mobile phones, and in two
columns on tablet-size and desktop-size screens?
Which method should be used to convert a Date to a String in the current user's locale?
Universal Containers analyzes a Lightning web component and its Apex controller
class that retrieves a list of contacts associated with an account. The code snippets
are as follows:
Based on the code snippets, what change should be made to display the contacts’ mailing addresses in the Lightning web component?
Universal Containers (LIC) wants to develop a customer community to help their customers log issues with their containers. The community needs to function for their German- and Spanish-speaking customers also. UC heard that it's easy to create an international community using Salesforce, and hired a developer to build out the site.
What should the developer use to ensure the site is multilingual?
What is the optimal way to fix this?
A)
B)
C)
D)
Consider the following code snippet:
Choose 2 answers
Consider the controller code below that is called from an Aura component and
returns data wrapped in a class.
The developer verified that the queries return a single record each and there is error handling in the Aura component, but the component is not getting anything back when calling the controller getSemeData.
‘What is wrong?
Refer to the following code snippets:
A developer is experiencing issues with a Lightning web component. The component must surface information about Opportunities owned by the currently logged-in user.
When the component is rendered, the following message is displayed: "Error retrieving data”.
Which modification should be implemented to the Apex class to overcome the issue?
An org has a requirement that an Account must always have one and only one Contact listed as Primary. So selecting one Contact will de-select any others. The client wants a checkbox on the Contact called 'Is Primary’ to control this feature.
The client also wants to ensure that the last name of every Contact is stored entirely in uppercase characters.
What is the optimal way to implement these requirements?
Consider the Apex controller below, that is called from an Aura component.
What is wrong with this code?
A developer notices the execution of all the test methods in a class takes a long time to run, due to the initial setup of all the test data that is needed to perform the tests. What should the developer do to speed up test execution?
A developer needs to store variables to control the style and behavior of a Lightning Web Component.
Which feature can be used to ensure that the variables are testable in both Production and all Sandboxes?
Assuming the CreateOneAccount class creates one account and implements the
Queueable interface, which syntax properly tests the Apex code?
A)
B)
C)
D)
The Account object has a field, Audit_Code_c, that is used to specify what type of auditing the Account needs and a Lookup to User, zudizar_c, that is the assigned auditor. When an Account is initially created, the user specifies the Audit_Code c. Each User in the org has a unique text field, Audit_Code _e, that is used to automatically assign the correct user to the Account’s Auditor_c field.
What should be changed to most optimize the code’s efficiency?
Choose 2 answers
Refer to the markup below:
A Lightning web component displays the Account name and two custom fields out of
275 that exist on the abject. The custom fields are correctly declared and
populated. However, the developer receives complaints that the component
performs slowly.
What can the developer do to improve the performance?
Consider the following code snippet:
The Apex method is executed in an environment with a large data volume count for Accounts, and the query is performing poorly.
Which technique should the developer implement to ensure the query performs optimally, while preserving the entire result set?
An Apex trigger creates a Contract record every time an Opportunity record is
marked as Closed and Won. This trigger is working great, except (due to a recent
acquisition) historical Opportunity records need to be loaded into the Salesforce
instance.
When a test batch of records are loaded, the Apex trigger creates Contract records.
A developer is tasked with preventing Contract records from being created when mass loading the Opportunities, but the daily users still need to have the Contract records created.
‘What is the most extendable way to update the Apex trigger to accomplish this?
A developer gets an error saying ‘Maximum Trigger Depth Exceeded.’
What is a possible reason to get this error message?
A developer created a Lightning web component that uses a lightning-record-edit-form to collect information about Leads. Users complain that they only see one error message at a time about their input when trying to save a Lead record.
What is the recommended approach to perform validations on more than one field, and display multiple error messages simultaneously with minimal JavaScript intervention?
Consider the Apex class below that defines a RemoteAction used on 2 Visualforce search page.
Which code snippet will assert that the remote action returned the correct Account?
A)
B)
C)
D)
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?
Refer to the test method below:
The test method calls an @future method that increments the
Number_of_Times_Viewed__c value. The assertion is failing because the
Number of Times Viewed_c equals 0.
What is the optimal way to fix this?