Spring Sale Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code = simple70
Pass the Salesforce Developers PDII Questions and answers with Dumpstech
Java
@isTest
static void testUpdateSuccess() {
Account acet = new Account(Name = 'test');
insert acet;
// Add code here
extension.inputValue = 'test';
PageReference pageRef = extension.update();
System.assertNotEquals(null, pageRef);
}
What should be added to the setup, in the location indicated, for the unit test above to create the controller extension for the test?
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 CurrencyIsoCode text field that contains the currency code they should use. If a Catalog's CurrencyIsoCode changes, all of its Catalog Items' CurrencyIsoCodes should be changed as well. What should a developer use to update the CurrencyIsoCodes on the Catalog Items when the Catalog's CurrencyIsoCode changes?
Given a list of Opportunity records named opportunityList, which code snippet is best for querying all Contacts of the Opportunity's Account?
How should a developer assert that a trigger with an asynchronous process has successfully run?
When developing a Lightning web component, which setting displays lightning-layout items in one column on small devices, such as mobile phones, and in two columns on tablet-size and desktop-size screens?
A Salesforce developer is hired by a multi-national company to build a custom Lightning application that shows employees their employment benefits and earned commissions over time. The application must acknowledge and respect the user's locale context for dates, times, numbers, currency, and currency symbols. When using Aura components, which approach should the developer implement to ensure the Lightning application complies with the user's locale?3
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?12345
Universal Containers uses a custom Lightning page to provide a mechanism to perform a step-by-step wizard search for Accounts. One of the steps in the wizard is to allow the user to input text into a text field, ERP_Number__c, that is then used in a query to find matching Accounts.
Java
erpNumber = erpNumber + '%';
List
A developer receives the exception 'SOQL query not selective enough'. Which step should be taken to resolve the issue?
Java
trigger AssignOwnerByRegion on Account ( before insert, before update ) {
List
for( Account anAccount : trigger.new ) {
Region__c theRegion = [
SELECT Id, Name, Region_Manager__c
FROM Region__c
WHERE Name = :anAccount.Region_Name__c
];
anAccount.OwnerId = theRegion.Region_Manager__c;
accountList.add( anAccount );
}
update accountList;
}
Consider the above trigger. Which two changes should a developer make in this trigger to adhere to best practices?30
A software company uses a custom object, Defect__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__c 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?34