295 Q&As in UPDATED DEX-450 Exam Questions Certification Test Engine to PDF
Get The Important Preparation Guide With DEX-450 Dumps
NEW QUESTION 106
What is the proper process for an Apex Unit Test
- A. Query for test data using SeeAllData = true. Call the method being tested. Verify that the results are correct.
- B. Create data for testing. Execute runAllTests(). Verify that the results are correct.
- C. Create data for testing. Call the method being tested. Verify that the results are correct.
- D. Query for test data using SeeAllData = true. Execute runAllTests(). Verify that the results are correct.
Answer: C
NEW QUESTION 107
A developer must create an Apex class, contactcontroller, that a Lightning component can use to search for Contact records. User of the Lightning component should only be able to search Contact records to which they have access. Which two will restrict the records correctly?
- A. public without sharing class ContactController
- B. public inherited sharing class ContactController
- C. public with sharing class ContactController
- D. public class ContactController
Answer: B,C
NEW QUESTION 108
Where can the custom roll-up summary fields be created using Standard Object relationships (Choose 3)
- A. On Account using Opportunity records.
- B. On Campaign using Campaign Member records.
- C. On Quote using Order records.
- D. On Opportunity using Opportunity Product records.
- E. On Account using Case records.
Answer: A,B,D
NEW QUESTION 109
What can a developer use to determine if the core Apex code exceeds any governor limits in a test class during bulk execution?
- A. @TestVisible
- B. Limits, startTest, stopTest
- C. @TestSetup.
- D. Test.getDmlStatements()
Answer: B
NEW QUESTION 110
What are three techniques that a developer can use to invoke an anonymous block of code? (Choose three.)
- A. Create a Visualforce page that uses a controller class that is declared without sharing.
- B. Run code using the Anonymous Apex feature of the Developer's IDE.
- C. Create and execute a test method that does not specify a runAs() call.
- D. Type code into the Developer Console and execute it directly.
- E. Use the SOAP API to make a call to execute anonymous code.
Answer: B,D,E
NEW QUESTION 111
Universal Containers recently transitioned from Classic to Lighting Experience. One of its business processes requires certain value from the opportunity object to be sent via HTTP REST callout to its external order management system based on a user-initiated action on the opportunity page. Example values are as follow Name Amount Account Which two methods should the developer implement to fulfill the business requirement? (Choose 2 answers)
- A. Create a Visualforce page that performs the HTTP REST callout, and use a Visualforce quick action to expose the component on the Opportunity detail page.
- B. Create a Lightning component that performs the HTTP REST callout, and use a Lightning Action to expose the component on the Opportunity detail page.
- C. Create an after update trigger on the Opportunity object that calls a helper method using @Future(Callout=true) to perform the HTTP REST callout.
- D. Create a Process Builder on the Opportunity object that executes an Apex immediate action to perform the HTTP REST callout whenever the Opportunity is updated.
Answer: B,C
NEW QUESTION 112
Managed Packages can be created in which type of org?
- A. Developer Edition
- B. Partial Copy Sandbox
- C. Unlimited Edition
- D. Developer Sandbox
Answer: A
NEW QUESTION 113
A developer considers the following snippet of code: Boolean isOK; integer x; String theString = 'Hello'; if (isOK == false && theString == 'Hello') { x = 1; } else if (isOK == true && theString =='Hello') { x = 2; } else if (isOK != null && theString == 'Hello') { x = 3; } else { x = 4; } Based on this code, what is the value of x?
- A. 0
- B. 1
- C. 2
- D. 3
Answer: A
NEW QUESTION 114
A large corporation stones Orders and Line Items In Salesforce for different lines of business. Users are a.. see Orders across the entire organization, but, for security purposes, should only be able to see the Line If Orders in their line of business.
Which type of relationship should be used between Line Items and Orders?
- A. Direct Lookup
- B. Master-Detail
- C. Indirect Lookup
- D. Lookup
Answer: B
NEW QUESTION 115
Which code should be used to update an existing Visualforce page that uses standard Visualforce components so that the page matches the look and feel of Lightning Experience?
- A. apex:actionStatus
- B. <apex:commandButton styleClass="slds-vf-button_brand" value="Refresh the Page">
- C. <apex:page lightningStyleSheets="true">
- D. <apex:page>
Answer: C
NEW QUESTION 116
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 override calculate() { /*implementation*/ }
} - B. Public abstract class ShippingCalculator {
public void calculate() { /*implementation*/ }
} - C. Public abstract class ShippingCalculator {
public virtual void calculate() { /*implementation*/ }
} - D. Public abstract class ShippingCalculator {
public abstract calculate() { /*implementation*/ }
}
Answer: C
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 method https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_extending.htm
NEW QUESTION 117
What is a benefit of using an after insert trigger over using a before insert trigger?
- A. An after insert trigger allows a developer to modify fields in the new record without a query.
- B. An after insert trigger allows a developer to bypass validation rules when updating fields on the new record.
- C. An after insert trigger allows a developer to insert other objects that reference the new record.
- D. An after insert trigger allows a developer to make a callout to an external service.
Answer: C
NEW QUESTION 118
A developer wants to store a description of a product that can be entered on separate lines by a user during product setup and later displayed on a Visualforce page for shoppers. Which field type should the developer choose to ensure that the description will be searchable in the custom Apex SOQL queries that are written?
- A. Text Area (Rich)
- B. Text Area (Long)
- C. Text
- D. Text Area
Answer: D
NEW QUESTION 119
A change set deployment from a sandbox to production fails due to a failure in a managed package unit test. The developer spoke with the manager package owner and they determined it is a false positive and can be ignored. What should the developer do to successfully deploy?
- A. Select 'Fast Deploy' to run only the tests that are in the change set.
- B. Select 'Run local tests' to run all tests in the org that are not in the managed package.
- C. Edit the managed package's unit test.
- D. Select 'Run local tests' to run only the tests that are in the change set.
Answer: B
NEW QUESTION 120
A developer wants to create a custom object to track Customer Invoices.How should Invoices and Accounts be related to ensure that all Invoices are visible to everyone with access to an Account?
- A. The Invoice should have a Master-Detail relationship to the Account
- B. The Invoice should have a Lookup relationship to the Account Previous
- C. The Account should have a Lookup relationship to the Invoice
- D. The Account should have a Master-Detail relationship to the Invoice.
Answer: A
NEW QUESTION 121
Given the following Anonymous Block:
Which one do you like?
What should a developer consider for an environment that has over 10,000 Case records?
- A. The transaction will fail due to exceeding the governor limit.
- B. The try/catch block will handle exceptions thrown by governor limits.
- C. The try/catch block will handle any DML exceptions thrown.
- D. The transaction will succeed and changes will be committed.
Answer: D
NEW QUESTION 122
......
Prepare With Top Rated High-quality DEX-450 Dumps For Success in Exam: https://certlibrary.itpassleader.com/Salesforce/DEX-450-dumps-pass-exam.html