Which scenario requires a developer to use an Apex callout
Instead of Outbound Messaging?
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?
A developer built an Aura component for guests to self-register upon arrival at a front desk kiosk. Now the developer needs to create a component for the utility tray to alert users whenever a guest arrives at the front desk.
What should be used?
A software company uses a custom object, Defact__c, to track defects in their
software. Defect__c has organization-wide defaults set to private. Each Defect_ c
has a related list of Reviewer < records, each with a lookup field to User that is
used to indicate that the User will review the defect__c.
What should be used to give the User on the Reviewer_c record read only access
to the Defect__c record on the Reviewer_c record?
A developer is asked to replace the standard Case creation screen with a custom screen that takes users through a wizard before creating the Case. The org only has users running Lightning Experience.
What should the developer override the Case New Action with to satisfy the requirements?
A corporation has many different Salesforce orgs, with some different objects and some common objects, and wants to build a single Java application that can create, retrieve, and update common object records in all of the different orgs.
Which method of integration should the application use?
A developer is creating a Lightning web component that displays a list of records in a lightning-datatable. After saving a new record to the database, the list is not updating.
What should the developer change in the code above for this to
happen?
A page throws an ‘Attempt to dereference a null object’ error for a Contact.
What change in the controller will fix the error?
Universal Containers wants to use a Customer Community with Customer Community Plus licenses to allow their customers access to track how many containers they have rented and when they are due back. Universal Containers uses a Private sharing model for External users, Many of their customers are multi-national corporations with complex Account hierarchies. Each account on the hierarchy represents a department within the same business,
One of the requirements is to allow certain community users within the same
Account hierarchy to see several departments’ containers, based on a custom
junction object that relates the Contact to the various Account records that
represent the departments.
Which solution solves these requirements?
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?
Refer to the test method below''
The test method calls a web service that updates an external system with Account
information and sets the Accounts integration_Updated__c checkbox to True when it completes.
The test fails to execute and exits with an error: "Methods defined as TestMethod do
not support Web service callouts.â€
A)
B)
C)
D)
A developer has a requirement to query three fields (Id, Name, Type) from an Account; and first and last names for all Contacts associated with the Account.
Which option is the preferred, optimized method to achieve this for the Account named ‘Ozone Electronics’?
A)
B)
C)
D)
A developer is writing a Jest test for a Lightning web component that conditionally displays child components based on a user's checkbox selections.
What should the developer do to properly test that the correct components display and hide for each scenario?
What is the best practice to initialize a Vizualforce page in a test class?
A company has a native iOS order placement app that needs to connect to Salesforce to retrieve consolidated information from many different objects in a
JSON format.
Which is the optimal method to implement this in Salesforce?
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?
A developer is tasked with ensuring that email addresses entered into the system for Contacts and for a custom object called survey Response c do not belong to a list of blocked domains.
The list of blocked domains is stored in a custom object for ease of maintenance by users. The survey Response c object is populated via a custom Visualforce page.
What is the optimal way to implement this?
A user receives the generic "An internal server error has occurred†while interacting
with a custom Lightning component.
What should the developer do to ensure a more meaningful message?
A developer creates an application event that has triggered an infinite loop.
What may have caused this problem?
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?
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?
As part of their quoting and ordering process, a company needs to send POFs to their document storage system's REST endpoint that supports OAuth 2.0. Each Salesforce user must be individually authenticated with the document storage system to send the PDF.
What is the optimal way for a developer to implement the authentication to the REST endpoint?
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?
A company has many different unit test methods that create Account records as
part of their data setup. A new required field was added to the Account and now all
of the unit tests fail.
What is the optimal way for a developer to fix the issue?
Universal Containers wants to notify an external system, in the event that an unhandled exception occurs, by publishing a custom event using Apex.
What is the appropriate publish/subscribe logic to meet this requirement?
Consider the queries in the options below and the following Information:
* For these queries, assume that there are more than 200,000 Account records.
* These records Include soft-deleted records; that is, deleted records that are still in the Recycle Bin.
* There are two fields that are marked as External Id on the
Account. These fields are customer_Number_c and ERR_Key_ s.
Which two queries are optimized for large data volumes?
Choose 2 answers
An Aura component has a section that displays some information about an Account
and it works well on the desktop, but users have to scroll horizontally to see the description field output on their mobile devices and tablets.
How should a developer change the component to be responsive for mobile and tablet devices?
A)
B)
C)
D)
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?
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?
A developer wrote the following method to find all the test accounts in the org:
What should be used to fix this failing test?
An environment has two Apex triggers: an after-update trigger on Account and an after-update trigger on Contact.
The Account after-update trigger fires whenever an Account's address is updated, and it updates every associated Contact with that address. The Contact after-update trigger fires on every edit, and it updates every Campaign Member record related to the Contact with the Contact's state.
Consider the following: A mass update of 200 Account records’ addresses, where each Account has 50 Contacts. Each Contact has one Campaign Member. This means there are 10,000 Contact records across the Accounts and 10,000 Campaign Member records across the contacts.
What will happen when the mass update occurs?
Which three approaches should a developer implement to obtain the best performance for data retrieval when building a Lightning web component? Choose 3 answers
How should a developer verify that a specific Account record is being tested in a test
class for a Visualforce controller?
A company has an Apex process that makes multiple extensive database operations and web service callouts. The database processes and web services can take a long time to run and must be run sequentially.
How should the developer write this Apex code without running into governor limits and system limitations?
A developer is creating a Lightning web component to display a calendar. The component will be used in multiple countries. In some locales, the first day of the week is a Monday, or a Saturday, or a Sunday. ‘What should the developer do to ensure the calendar displays accurately for users in every locale?
A developer is asked to look into an issue where a scheduled Apex is running into DML limits. Upon investigation, the developer finds that the number of records processed by the scheduled Apex has recently increased to more than 10,000.
What should the developer do to eliminate the limit exception error?
A developer created an Opportunity trigger that updates the account rating when an associated opportunity is considered high value. Current criteria for an opportunity
to be considered high value is an amount greater than or equal to $1,000,000. However, this criteria value can change over time.
There is a new requirement to also display high value opportunities in a Lightning web component.
Which two actions should the developer take to meet these business requirements, and also prevent the business logic that obtains the high value opportunities from
being repeated in more than one place?
Choose 2 answers
Which statement is considered a best practice for writing bulk safe Apex triggers?
An Apex class does not achieve expected code coverage. The testsetup method explicitly calls a method In the Apex class..
How can the developer generate the code coverage?
In an organization that has multi-currency enabled, a developer Is tasked with building a Lighting component that displays the top ten Opportunities most recently accessed by the logged in user. The developer must ensure the Amount and LastModifiedDate field values are displayed according to the user's locale.
What is the most effective approach to ensure values displayed respect the user's locale settings?
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?
A developer is responsible for formulating the deployment process for a Salesforce project. The project follows a source-driven development approach, and the developer wants to ensure efficient deployment and version control of the metadata changes.
Which tool or mechanism should be utilized for managing the source-driven deployment process?
A developer gets an error saying ‘Maximum Trigger Depth Exceeded.’
What is a possible reason to get this error message?
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?
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?