Salesforce PDII Actual Free Exam Questions & Community Discussion
Refer to the following code snippet:
Java
public class LeadController {
public static List<Lead> getFetchLeadList(String searchTerm, Decimal aRevenue) { String safeTerm = '%'+searchTerm.escapeSingleQuotes()+ '%'; return [ SELECT Name, Company, AnnualRevenue FROM Lead WHERE AnnualRevenue >= :aRevenue AND Company LIKE :safeTerm LIMIT 20
];
}
}
A developer created a JavaScript function as part of a Lightning web component (LWC) that surfaces information about Leads by wire calling getFetchLeadList when certain 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?1
Java
public class LeadController {
public static List<Lead> getFetchLeadList(String searchTerm, Decimal aRevenue) { String safeTerm = '%'+searchTerm.escapeSingleQuotes()+ '%'; return [ SELECT Name, Company, AnnualRevenue FROM Lead WHERE AnnualRevenue >= :aRevenue AND Company LIKE :safeTerm LIMIT 20
];
}
}
A developer created a JavaScript function as part of a Lightning web component (LWC) that surfaces information about Leads by wire calling getFetchLeadList when certain 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?1
Correct Answer: A,C,D
Vote an answer
Explanation: Only visible for EduDump members. You can sign-up / login (it's free).
A company wants to incorporate a third-party web service to set the Address fields when an Account is inserted, if they have not already been set. What is the optimal way to achieve this?
Correct Answer: A
Vote an answer
Explanation: Only visible for EduDump members. You can sign-up / login (it's free).
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?
Correct Answer: B,D,E
Vote an answer
Which Salesforce feature allows a developer to see when a user last logged in to Salesforce if real-time notification is not required?
Correct Answer: A
Vote an answer
Explanation: Only visible for EduDump members. You can sign-up / login (it's free).
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 th23e Accounts and 10,000 Campaign Member records across the contacts. What will happen when the mass update occurs?24252627
Correct Answer: A
Vote an answer
Explanation: Only visible for EduDump members. You can sign-up / login (it's free).
A developer is trying to decide between creating a Visualforce component or a Lightning component. Which scenario necessitates the use of Visualforce?
Correct Answer: D
Vote an answer
Explanation: Only visible for EduDump members. You can sign-up / login (it's free).
Refer to the code snippet below:
Java
public static void updateCreditMemo(String customerId, Decimal newAmount){ List<Credit_Memo__c> toUpdate = new List<Credit_Memo__c>(); for(Credit_Memo__c creditMemo : [Select Id, Name, Amount__c FROM Credit_Memo__c WHERE Customer_Id__c = :customerId LIMIT 50]) { creditMemo.Amount__c = newAmount; toUpdate.add(creditMemo);
}
Database.update(toUpdate,false);
}
A custom object called Credit_Memo__c exists in a Salesforce environment. As part of a new feature development, the developer needs to ensure race conditions are prevented when a set of records are mod1ified within an Apex transaction. In the preceding Apex code, how can the developer alter the que2ry statement to use SOQL features to prevent race conditions within a tr3ansaction?4
Java
public static void updateCreditMemo(String customerId, Decimal newAmount){ List<Credit_Memo__c> toUpdate = new List<Credit_Memo__c>(); for(Credit_Memo__c creditMemo : [Select Id, Name, Amount__c FROM Credit_Memo__c WHERE Customer_Id__c = :customerId LIMIT 50]) { creditMemo.Amount__c = newAmount; toUpdate.add(creditMemo);
}
Database.update(toUpdate,false);
}
A custom object called Credit_Memo__c exists in a Salesforce environment. As part of a new feature development, the developer needs to ensure race conditions are prevented when a set of records are mod1ified within an Apex transaction. In the preceding Apex code, how can the developer alter the que2ry statement to use SOQL features to prevent race conditions within a tr3ansaction?4
Correct Answer: D
Vote an answer
Explanation: Only visible for EduDump members. You can sign-up / login (it's free).
A developer is tasked with creating a Lightning web component that allows users to create a Case for a selected product, directly from a custom Lightning page. The input fields in the component are displayed in a non-linear fashion on top of an image of the product to help the user better understand the meaning of the fields. Which two components should a developer use to implement the creation of the Case from the Lightning web component?161718
Correct Answer: B,C
Vote an answer
Explanation: Only visible for EduDump members. You can sign-up / login (it's free).
Refer to the component code and requirements below:
HTML
<lightning:layout multipleRows="true">
<lightning:layoutItem size="12">{!v.account.Name}</lightning:layoutItem>
<lightning:layoutItem size="12">{!v.account.AccountNumber}</lightning:layoutItem>
<lightning:layoutItem size="12">{!v.account.Industry}</lightning:layoutItem>
</lightning:layout>
Requirements:
* For mobile devices, the information should display in three rows.
* For desktops and tablets, the information should display in a single row.
Requirement 2 is not displaying as desired. Which option has the correct component code to meet the requirements for desktops an7d tablets?
HTML
<lightning:layout multipleRows="true">
<lightning:layoutItem size="12">{!v.account.Name}</lightning:layoutItem>
<lightning:layoutItem size="12">{!v.account.AccountNumber}</lightning:layoutItem>
<lightning:layoutItem size="12">{!v.account.Industry}</lightning:layoutItem>
</lightning:layout>
Requirements:
* For mobile devices, the information should display in three rows.
* For desktops and tablets, the information should display in a single row.
Requirement 2 is not displaying as desired. Which option has the correct component code to meet the requirements for desktops an7d tablets?
Correct Answer: C
Vote an answer
Explanation: Only visible for EduDump members. You can sign-up / login (it's free).
0
0
0
10
