Ultimate Guide to Prepare Free Salesforce PDI Exam Questions and Answer
Pass Salesforce PDI Tests Engine pdf - All Free Dumps
NEW QUESTION # 112
A development team wants to use a deployment script lo automatically deploy lo a sandbox during their development cycles.
Which two tools can they use to run a script that deploys to a sandbox?
Choose 2 answers
- A. Developer Console
- B. SFDX CLI
- C. Change Sets
- D. VS Code
Answer: B,D
NEW QUESTION # 113
What are two valid options for iterating through each Account in the collection List<Account> named AccountList? (Choose two.)
- A. for(AccountList) {...}
- B. for (Account theAccount : AccountList) {...}
- C. for (List L : AccountList) {...}
- D. for (Integer i=0; i < AccountList.Size(); i++) {...}
Answer: B,D
NEW QUESTION # 114
Universal Containers hires a developer to build a custom search page to help user- find the Accounts they want. Users will be able to search on Name, Description, and a custom comments field.
Which consideration should the developer be aware of when deciding between SOQ1 Mid SOSI ?
Choose 2 answers
- A. SOSL is faster for tent searches.
- B. SOQL is able to return more records.
- C. SOSL is able to return more records.
- D. SOQL is faster for text searches.
Answer: A,B
NEW QUESTION # 115
Which three process automations can immediately send an email notification to the owner of an Opportunity when its Amount is changed to be greater than $10,000? Choose 3 answers
- A. Process Builder
- B. Flow Builder
- C. Approval Process
- D. Escalation Rule
- E. Workflow Rule
Answer: A,C,E
NEW QUESTION # 116
Universal Containers has developed custom Apex code and Lightning Components in a Sandbox environment. They need to deploy the code and associated configurations to the Production environment.
What is the recommended process for deploying the code and configurations to Production?
- A. Use a change set to deploy the Apex code and Lightning Components.
- B. Use the Ant Migration Tool to deploy the Apex code and Lightning Components.
- C. Use the Force.com IDE to deploy the Apex code and Lightning Components.
- D. Use Salesforce CLI to deploy the Apex code and Lightning Components.
Answer: D
NEW QUESTION # 117
A developer is building custom search functionality that uses SOSL to search account and contact records that match search terms provided by the end user. The feature is exposed through a Lightning web component, and the end user is able to providea list of terms to search.
Consider the following code snippet:
What is the maximum number of search terms the end user can provide to successfully execute the search without exceeding a governor limit?
- A. 0
- B. 2,000
- C. 1
- D. 2
Answer: D
NEW QUESTION # 118
A developer must implement a CheckPaymentProcessor class that provides check processing payment capabilities that adhere to what defined for payments in the PaymentProcessor interface. public interface PaymentProcessor { void pay(Decimal amount); } Which is the correct implementation to use the PaymentProcessor interface class?
- A. Public class CheckPaymentProcessor implements PaymentProcessor {
public void pay(Decimal amount);
} - B. Public class CheckPaymentProcessor extends PaymentProcessor {
public void pay(Decimal amount) {}
} - C. Public class CheckPaymentProcessor extends PaymentProcessor {
public void pay(Decimal amount);
} - D. Public class CheckPaymentProcessor implements PaymentProcessor {
public void pay(Decimal amount) {}
}
Answer: A
NEW QUESTION # 119
A company has a custom object, Sales, }_Help_Request__c, that has a Lookup relationship to Opportunity. The Seles Help Request__c has a mumber field, Number_ct_Hours__c, that represents the amount of time spent on the Sales_Help Request__C.
A developer is tasked with creating a field, total_Hour2__c, on Opportunity that should be the sum of all of the Number_of_Hours_c values for the Sales_Help_Request__c records related to that Opportunity.
What should the developer use to implement this?
- A. A trigger on the Opportunity object
- B. A roll-up summary field on the sales Help_Request__c object
- C. A roll-up summary field on the Opportunity object
- D. A record-triggered flow on the Sales Help Request__c object
Answer: D
NEW QUESTION # 120
To which data type in Apex a currency field automatically assigned?
- A. Decimal
- B. Integer
- C. Currency
- D. Double
Answer: A
NEW QUESTION # 121
What can be easily developed using the Lightning Component framework?
- A. Salesforce Classic user Interface pages
- B. Customized JavaScript buttons
- C. Salesforce integrations
- D. Lightning Pages
Answer: D
NEW QUESTION # 122
A developer created a Visualforce page and custom controller to display the account type field as shown below. Custom controller code: public class customCtrlr{ private Account theAccount; public String actType; public customCtrlr() { theAccount =[SELECT Id, Type FROM Account WHERE Id =
:apexPages.currentPage().getParameters().get('id')]; actType = theAccount.Type; } } Visualforce page snippet:
The Account Type is {!actType} The value of the account type field is not being displayed correctly on the page. Assuming the custom controller is property referenced on the Visualforce page, what should the developer do to correct the problem?
- A. Add with sharing to the custom controller.
- B. ConverttheAccount.Type to a String.
- C. Change theAccount attribute to public.
- D. Add a getter method for the actType attribute.
Answer: D
Explanation:
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_controller_custom.htm
NEW QUESTION # 123
A developer of Universal Containers is tasked with implementing a new Salesforce application that must be able to by their company's Salesforce administrator.
Which three should be considered for building out the business logic layer of the application? Choose 3 answers
- A. Process Builder
- B. Scheduled Jobs
- C. Workflows
- D. validation Rules
- E. Invocable Actions
Answer: A,C,D
NEW QUESTION # 124
What are three ways for a developer to execute tests in an org? Choose 3.
- A. Metadata API
- B. Developer Console
- C. Bulk API
- D. Setup Menu
- E. ToolingAPI
Answer: B,D,E
NEW QUESTION # 125
A developer must troubleshoot to pinpoint the causes of performance issues when a custom page loads in their org.
Which tool should the developer use to troubleshoot?
- A. Salesforce CLI
- B. AppExchange
- C. Developer Console
- D. Visual Studio Core IDE
Answer: C
NEW QUESTION # 126
A developer has an integer variable called maxAttempts. The developer meeds to ensure that once maxAttempts is initialized, it preserves its value for the lenght of the Apex transaction; while being able to share the variable's state between trigger executions. How should the developer declare maxAttempts to meet these requirements?
- A. Declare maxattempts as a constant using the static and final keywords
- B. Declare maxattempts as a private static variable on a helper class
- C. Declare maxattempts as a member variable on the trigger definition.
- D. Declare maxattempts as a variable on a helper class
Answer: B
NEW QUESTION # 127
What should a developer do to check the code coverage of a class after running all tests?
- A. View the Class test Percentage tab on the Apex Class list view in Salesforce Setup.
- B. View the Code Coverage column in the list on the Apex Classes page.
- C. View the code coverage percentage or the class using the Overalll code Coverage panel in the Developer Console Test tab.
- D. Select and run the class on the Apex est Execution page in the Developer Console.
Answer: C
NEW QUESTION # 128
A developer wants to retrieve the Contacts and Users with the email address '[email protected]'. Which SOSL statement should the developer use?
- A. FIND {[email protected]} IN Email Fields RETURNING Contact (Email), User (Email)
- B. FIND Email IN Contact, User FOR {dev2uc.com}
- C. FIND {Email = '[email protected]'} RETURNING Contact (Email), User (Email)
- D. FIND {Email = '[email protected]'} IN Contact, User
Answer: A
NEW QUESTION # 129
A developer must create a CreditcardPayment class that provides an implementation of an existing Payment class. Public virtual class Payment { public virtual void makePayment(Decimal amount) { /*implementation*/
} } Which is the correct implementation?
- A. Public class CreditCardPayment implements Payment {
publicoverride void makePayment(Decimal amount) { /*Implementation*/ }
} - B. Public class CreditCardPayment extends Payment {
public virtual void makePayment(Decimal amount) { /*implementation*/ }
} - C. Public class CreditCardPayment implements Payment {
public virtual void makePayment(Decimalamount) { /*implementation*/ }
} - D. Public class CreditcardPayment extends Payment {
public override void makePayment(Decimal amount) { /*implementation*/ }
}
Answer: D
NEW QUESTION # 130
A Lightning component has a wired property, searcResults, that stores a list of Opportunities. Which definition of the Apex method, to which the searchResults property is wired, should be used?
- A. @AuraEnabled(cacheable=false)
public List<Opportunity> search(String term) { /*implementation*/ } - B. @AuraEnabled(cacheable=false)
public static List<Opportunity> search(String term) { /*implementation*/ } - C. @AuraEnabled(cacheable=true)
public List<Opportunity> search(String term) { /*implementation*/ } - D. @AuraEnabled(cacheable=true)
public static List<Opportunity> search(String term) { /* implementation*/ }
Answer: D
NEW QUESTION # 131
Given the following code snippet, that is part of a custom controller for a Visualforce page:
In which two ways can the try/catch be enclosed to enforce object and field-level permissions and prevent the DML statement from being executed if the current logged-in user does not have the appropriate level of access? Choose 2 answers
- A. Use if (thisContact.Owner = = UserInfo.getuserId ( ) )
- B. Use if (Schema, sobjectType, Contact, isUpdatable ( ) )
- C. Use if (Schema , sobjectType. Contact. Field, Is_Active_c. is Updateable ( ) )
- D. Use if (Schema.sObjectType.Contact.isAccessible ( ) )
Answer: B,C
NEW QUESTION # 132
......
Platform Developer I (PDI) Practice Tests 2024 | Pass PDI with confidence!: https://drive.google.com/open?id=1d8QF7B1npacIiu24JH0DHxpjxxjNzNnN
Online Exam Practice Tests with detailed explanations!: https://www.fast2test.com/PDI-premium-file.html