Salesforce Certified Platform Developer II Practice Test - Questions Answers, Page 43

List of questions
Question 421

A developer needs to add code to a Lightning web component's configuration file so the component only renders for a desktop size form factor when on a record page.
What should the developer add to the component's record page target configuration to meet this requirement?
A)
B)
C)
D)
Question 422

After a platform event is defined in a Salesforce org,events can be published via which mechanism?
Question 423

A developer implemented a custom data table in a Lightning web component with filter functionality. However, users are submitting support tickets about long load times when the filters are changed. The component uses an Apex method that is called to query for records based on the selected filters.
What should the developer do to improve performance of the component?
Question 424

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?
Question 425

Refer to the code snippet below:
A custom object called Credit_Memo__c exists in a Salesforce environment. As part of a new feature development that retrieves and manipulates this type of record, the developer needs to ensure race conditions are prevented when a set of records are modified within an Apex transaction.
In the preceding Apex code, how can the developer alter the query statement to use SOQL features to prevent race conditions within a transaction?
A)
B)
C)
D)
Question 426

A developer is building a complex commission calculation engine in Apex that is called from an Opportunity trigger. During QA it was reported that the calculations are incorrect.
The developer has representative test data and passing test methods in their developer sandbox.
Which three tools or techniques could the developer use to execute the code and pause it at key lines to visually inspect values of various Apex variables?
Choose 3 answers
Question 427

Which code snippet processes records in the most memory efficient manner, avoiding governor limits such as 'Apex heap size too large'?
A)
B)
C)
D)
Question 428

An org has an existing process, built using Process Builder, on Opportunity that sets a custom field, CommissionBaseAmount__c, when an Opportunity is edited and the Opportunity's Amount changes.
A developer recently deployed an Opportunity before update trigger that uses the CommissionBaseAmount__c and complex logic to calculate a value for a custom field, CommissionAmount__c, when an Opportunity stage changes to Closed/Won.
Users report that when they change the Opportunity to Closed/Won and also change the Amount during the same save, the CommissionAmount__c is incorrect.
Which action should the developer take to correct this problem?
Question 429

Exhibit.
Given the code above, which two changes need to be made in the Apex Controller for the code to work? Choose 2 answers
Question 430

A developer is building a Lightning web component that retrieves data from Salesforce and assigns it to the record property.
What must be done in the component to get the data from Salesforce?
A)
B)
C)
Question