Try Free and Start Using Realistic Verified PDI Dumps Instantly
PDI Actual Questions - Instant Download 171 Questions
NEW QUESTION # 11
Considering the following code snippet:
When the code executes a DML exception is thrown.
How should the developer modify the code to ensure exceptions are handled gracefully?
- A. Implement the upsert DML statement.
- B. Remove null items from the list if Accounts.
- C. Implement a try/catch block for the DML.
- D. Implement Change Data Capture
Answer: C
NEW QUESTION # 12
Which code displays the contents of a Visualforce page as a PDF?
- A. <apex:page rendersAs="application/pdf">
- B. <apex:page contentType="pdf">
- C. <apex:page renderAs="pdf">
- D. <apex:page contentType="application/pdf">
Answer: C
Explanation:
Explanation
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_output_pdf_renderas.htm You can generate a downloadable, printable PDF file of a Visualforce page using the PDF rendering service.
Convert a page to PDF by changing the <apex:page> tag.
<apex:page renderAs="pdf">
NEW QUESTION # 13
A developer is asked to prevent anyone other than a user with Sales Manager profile from changing the Opportunity Status to Closed Lost if the lost reason is blank.
Which automation allows the developer to satisfy this requirement in the most efficient manner?
- A. An error condition formula on a validation rule on Opportunity
- B. approval process on the Opportunity object
- C. A record trigger flow on the Opportunity object
- D. An Apex trigger on the Opportunity object
Answer: A
NEW QUESTION # 14
As part of a data cleanup strategy, AW Computing wants to proactively delete associated opportunity records when the related Account is deleted.
Which automation tool should be used to meet this business requirement?
- A. Record-Triggered Flow
- B. Workflow Rules
- C. Scheduled job
- D. Process Builder
Answer: A
NEW QUESTION # 15
A developer wants to invoke on outbound message when a record meets a specific criteria.
Which three features satisfy this use case?
Choose 3 answer
- A. Visual Workflow can be used to check the record criteria and send an outbound message without Apex Code.
- B. Process builder can be used to check the record criteria and send an outbound message with Apex Code.
- C. workflows can be used to check the record criteria and send an outbound message.
- D. Approval Process has the capacity to check the record criteria and send an outbound message without Apex Code
- E. Process builder can be used to check the record criteria and send an outbound messagewithout Apex Code.
Answer: B,C,D
NEW QUESTION # 16
A developer identifies the following triggers on the Expense_c object:
* DeleteExpense,
* applyDefaultstoexpense
* validateexpenseupdate;
The triggers process before delete, before insert, and before update events respectively.
Which two techniques should the developer implement to ensure trigger best practice are followed?
- A. Create helper classes to execute the appropriate logic when a record is saved. (Missed)
- B. Unify the before insert and before update triggers and use Process Builder for the delete action.
- C. Unify all three triggers in a single trigger on the Expense__c object that includes all events.
- D. Maintain all three triggers on the Expense__c object, but move the Apex logic out for the trigger definition.
Answer: A,C
NEW QUESTION # 17
A developer is debugging the following code to determinate why Accounts are not being created Account a = new Account(Name = 'A'); Database.insert(a, false); How should the code be altered to help debug the issue?
- A. Add a System.debug() statement before the insert method
- B. Collect the insert method return value a Saveresult record
- C. Set the second insert method parameter to TRUE
- D. Add a try/catch around the insert method
Answer: D
NEW QUESTION # 18
A developer needs to apply the look and feel of lightning experience to a number of applications built using a custom third-party javascript framework and rendered in visualforce pages which option achieves this?
- A. Configure the user interface options in the setup menu to enable legacy mode for visualforce
- B. Set the attribute enablelightning to "true" in the definition
- C. Incorporate salesforce lightning design system css style sheets into the javascript applications
- D. Replace the third-party javascript library with native visualforce tags
Answer: C
NEW QUESTION # 19
A developer must create a ShippingCalculator class that cannot be instantiated and must include a working default implementation of a calculate method, that sub-classes can override. What is the correct implementation of the ShippingCalculator class?
- A. Public abstract class ShippingCalculator {
public abstract calculate() { /*implementation*/ }
} - B. Public abstract class ShippingCalculator {
public override calculate() { /*implementation*/ }
} - C. Public abstract class ShippingCalculator {
public void calculate() { /*implementation*/ }
} - D. Public abstract class ShippingCalculator {
public virtual void calculate() { /*implementation*/ }
}
Answer: A
Explanation:
Explanation
the extending class can override the existing virtual methods by using the override keyword in the method definition. Overriding a virtual method allows you to provide a different implementation for an existing methodhttps://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_extending.htm
NEW QUESTION # 20
A develop created these three roll-up summary fields on the custom object. Project_c:
The developer is asked to create a new field that should the ratio between rejected and approved timesheet for a given project.
What are two benefits of choosing a formula held instead of an Apex trigger to fulfill the request? Choose 2 answers
- A. Using a formula field reduces maintenance overhead.
- B. A formula field will trigger existing automation when deployed.
- C. A test class will validate the formula field during deployment.
- D. A formula field will calculate the retroactively for existing records
Answer: B,D
NEW QUESTION # 21
What should a developer do to check the code coverage of a class after running all tests?
- A. Select and run the class on the Apex Test Execution page
- B. view the overall Code Coverage panel of the tab in the Developer Console.
- C. View the Class test Coverage tab on the Apex Class record.
- D. View the Code Coverage column in the view on the Apex Classes page.
Answer: B
NEW QUESTION # 22
Which declarative process automation feature supports iterating over multiple records?
- A. Validation Rules
- B. Approval Process
- C. Workflow rules
- D. Flows
Answer: D
NEW QUESTION # 23
How can a developer get all of the available record types for the current user on the case object?
- A. Use SOQL to get all cases
- B. Use describesobjectresult of the case object
- C. Use describefieldresult of the case.recordtype field
- D. Use case.getrecordtypes()
Answer: C
NEW QUESTION # 24
A developer created a child Lightning web component nested inside a parent Lightning web component, parent component needs to pass a string value to the child component.
In which two ways can this be accomplished?
Choose 2 answers
- A. The parent component can use a custom event to pass the data to the child component,
- B. The parent component can invoke a method in the child component
- C. The parent component can use a public property to pass the data to the child component.
- D. The parent component can use the Apex controller class to send data to the child component.
Answer: A,C
NEW QUESTION # 25
A developer created this Apex trigger that calls MyClass,myStartmethod:
The developer creates a test method that calls MyClase,myStartmethod directly, resulting in 81% overall code coverage.
What happens wtier the developer tries to deploy the ... and two classes to production, assuming no other code exists?
- A. The deployment passes because both classes and the trigger were included ki the deployment.
- B. The deployment tails because no assertions mett made in the lest method.
- C. The deployment fails because the Apr- MgQM has no code coverage.
- D. The deployment passes became the Apex code has the requited 75% code coverage.
Answer: C
NEW QUESTION # 26
How should a developer write unit tests for a private method in an Apex class?
- A. Mark the Apex class as global.
- B. Add a test method in the Apex class.
- C. Use the TestVisible annotation.
- D. Use the SeeAllData annotation.
Answer: C
NEW QUESTION # 27
How would a developer change the field type of a custom field on the Account object from string to an integer?
- A. Mate the change in the declarative UI, then update the field type to an integer field in the Apex code.
- B. Make the change in the declarative UI, an then the change will automatically be reflected in the Apex code.
- C. Make the changes in the developer console, and then the change will automatically be reflected in the Apex code.
- D. Remove all references in the code, make the change in the declarative UI, and restore the references with the new type.
Answer: D
NEW QUESTION # 28
Universal Container* decides to use purely declarative development to build out a new Salesforce application.
Which two options can be used to build out logic layer for this application?
Choose 2 answer
- A. Record- Triggered flow
- B. Validation Rules
- C. Remote Actions
- D. Batch Jobs
Answer: A,B
NEW QUESTION # 29
......
Download Free Latest Exam PDI Certified Sample Questions: https://examtorrent.vce4dumps.com/PDI-latest-dumps.html