[Dec-2023] PDII Exam Dumps - Free Demo & 365 Day Updates [Q30-Q55]

Share

[Dec-2023] PDII Exam Dumps - Free Demo & 365 Day Updates

Free Sales Ending Soon - Use Real PDII PDF Questions

NEW QUESTION # 30
Universal Containers (UC) calculates commissions on their Opportunities in different ways based on complex rules that vary depending on the line of business of the Opportunity.
Whenever a new line of business Is added to Salesforce at UC, it is likely that a different calculation will need to be added too. When an Opportunity's stage is changed to Closed/Won, its commission should be calculated in real time.
What should a developer use so that different implementations of the commission calculation can be invoked on the stage change?

  • A. An Interface and implementing classes
  • B. A final dass with multiple methods
  • C. An Apex class with @ custom enum
  • D. Apex Describe Schema methods

Answer: C


NEW QUESTION # 31
A developer wants to retrieve and deploy metadata, perform a simple CSV export of query results, and debug APEX Rest calls by viewing the JSON responses. Which tool should the developer use?

  • A. Force.com Migration Tool
  • B. Force.com IDE
  • C. Developer Console
  • D. Workbench

Answer: D


NEW QUESTION # 32
What is the correct order of execution for Visualforce Page "get" requests (initial page visit)?

  • A. Evaluate constructors on controller and extensions
    2) If there's a <apex:form> element, create the view state
    3) Evaluate expressions, <apex:page> attribute actions, and other method calls (getters/setters) on main page
    4) Evaluate constructors, extensions, and expression on attribute definitions on any custom components present
    5) Send HTML to Browser
  • B. Evaluate constructors on controller and extensions
    2) Evaluate constructors, extensions, and expression on attribute definitions on any custom components present
    3) Evaluate expressions, <apex:page> attribute actions, and other method calls (getters/setters) on main page
    4) If there's a <apex:form> element, create the view state
    5) Send HTML to Browser
  • C. Evaluate constructors, extensions, and expression on attribute definitions on any custom components present
    2) Evaluate constructors on controller and extensions
    3) Evaluate expressions, <apex:page> attribute actions, and other method calls (getters/setters) on main page
    4) If there's a <apex:form> element, create the view state
    5) Send HTML to Browser

Answer: B


NEW QUESTION # 33
An Apex class does not achieve expected code coverage. The testsetup method explicitly calls a method in the Apex class.
How can the developer generate the code coverage?

  • A. Verify the user has permissions passing a user into system.runAs ().
  • B. Call the Apex class method from a testMethod instead of the testsetup method.
  • C. Use system.aasert () in testSetup to verify the values are being returned.
  • D. Add @testvisibie to the method in the class the developer is testing.

Answer: B


NEW QUESTION # 34
A developer created the code to perform an HTP GET request to an external system.

When the code is executed, the callout is unsuccessful and the following error appears within the Developer Console:System.CalloutException: Unauthorized endpoint Which recommended approach should the developer implement to the callout exception?

  • A. create a remote site setting configuration that includes the endpoint.
  • B. Change the access modifier for ERPCatelog from Public to global
  • C. use the setHeader () method to specify Basic Authentication.
  • D. Annotate the getERPCatalogContents method With @Future (Callout-true)

Answer: B


NEW QUESTION # 35
A Visualforce page contains an industry select list and displays a table of Accounts that have a matching value in their Industry field.

When a user changes the value in the industry select list, the table of Accounts should be automatically updated to show the Accounts associated with the selected industry.
What is the optimal way to implement this?

  • A. Add an <apex: actionSupport> within the <apex: selectOptions>.
  • B. Add an <apex: actionFunction> within the <apex: select List >.
  • C. Add an <apex: actionFunction> within the <apex : selectOptions>.
  • D. Add an <apex: actionSupport> within the <apex:selectList>.

Answer: B


NEW QUESTION # 36
When testing batch classes, what must a developer do? (Choose two.)

  • A. Call the class* "execute" method
  • B. Limit the amount of records you test to < 200
  • C. Use seeAIIData=true
  • D. Encapsulate code in Test.startTestQ and Test.stopTestQ

Answer: B,D

Explanation:
If you use "seeAIIData=true," you are a bad person


NEW QUESTION # 37
A developer receives the exception 'SOQL query not selective enough' when performing a query on an object with a large amount of dat
a. Which step should be taken to resolve the issue?

  • A. Perform the SOQL query via a call to the REST API.
  • B. Use an ID in the WHERE clause of the SOQL query.
  • C. Move the SOQL query to within an asynchronous process.
  • D. Perform the SOQL query as part of a FOR loop.

Answer: B


NEW QUESTION # 38
A developer created and tested a Visualforce page in their developer sandbox, but now receives reports that users are encountering ViewState errors when using it in Production. What should the developer ensure to correct these errors?

  • A. Ensure queries do not exceed governor limits.
  • B. Ensure properties are marked as private.
  • C. Ensure profiles have access to the Visualforce page.
  • D. Ensure properties are marked as Transient.

Answer: D


NEW QUESTION # 39
A developer is developing a reusable Aura component that will reside on an sObject Lightning page with the following HTML snippet:
Caura: component implements-"forcethaaRecordid, flexipage:availableForAllPageTypes">
<div>Hello!</div>
</aura:component>
How can the component's controller get the context of the Lightning page that the sobject is an without
requiring additional best coverage?

  • A. Add force:hasSobjectName to the implements attribute
  • B. Use the getSObjectType () method in an Apex class
  • C. Create a design attribute and configure via App Builder
  • D. Set the object type as a component attribute.

Answer: A


NEW QUESTION # 40
A developer needs test data for Apex test classes. What can the developer use to provide test data to the test methods? Choose 2 answers

  • A. MyDataFactory. createTestRecords (10)
  • B. Database . createTestRecords (10)
  • C. List ls = Test. loadData (Lead.sObjectType, 'myTestLeads');

Answer: A,C


NEW QUESTION # 41
Which is a valid Apex REST Annotation? (Choose two.)

  • A. @Http Patch
  • B. @HttpUpsert
  • C. @HttpDelete
  • D. @HttpAction

Answer: A,C


NEW QUESTION # 42
A company wants to build a custom Lightning Component that will display a specified Account Field Set and that can only be added to the Account record page.
Which design resource configuration should be used?
<design:component label="Account FS Component">

  • A. <aura:attribute name="fieldSetName" label="Field Set Name" />
    <sfdc:objects>
    <sfdc:object>Account</sfdc:object>
    </sfdc:objects>
    </design:component>
  • B. <design:attribute name="fieldSetName" label="Field Set Name" />
    <sfdc:objects>
    <sfdc:object>Account</sfdc:object>
    </sfdc:objects>
    </design:component>
    <design:component label="Account FS Component">
  • C. <aura:attribute name="fieldSetName" label="Field Set Name" />
    <sfdc:objects>
    <sfdc:object>FieldSet</sfdc:object>
    </sfdc:objects>
    </design:component>
    <design:component label="Account FS Component">
  • D. <design:attribute name="fieldSetName" Label="Field Set Name" />
    <sfdc:objects>
    <sfdc:object>FieldSet</sfdc:object>
    </sfdc:objects>
    </design:component>
    <design:component label="Account FS Component">

Answer: B


NEW QUESTION # 43
What is a benefit of JavaScript remoting over Visualforce Remote Objects?

  • A. Allows for specified re-render targets
  • B. Supports complex server-side application logic
  • C. Does not require any Apex code
  • D. Does not require any JavaScript code

Answer: D


NEW QUESTION # 44
A company uses a custom-built enterprise resource planning (ERP) system to handle order management.
The company wants Sales Reps to know the status of orders so that if a customer calls to ask about their shipment, the Sales Rep can advise the customer about the order's status and tracking number if it is already shipped.
Which two methods can make this ERP order data visible in Salesforce? (Choose two.)

  • A. Have the ERP system push the data into Salesforce using the SOAP API
  • B. Use Salesforce Connect to view real-time Order data in the ERP system
  • C. Ensure real-time order data is in Salesforce using the Streaming API
  • D. Write a cron job in Salesforce to poll the ERP system for order updates

Answer: A,B


NEW QUESTION # 45
When developing a Visualforce page that will be used by a global organization that does business in many languages and many currencies, which feature should be used? Choose 3 answers

  • A. Custom Labels
  • B. GetLocalCurrency()
  • C. ConvertCurrency()
  • D. Translation Workbench
  • E. Global Labels

Answer: A,C,D


NEW QUESTION # 46
A developer wants to create a Visualforce page that allows a user to search for a given account by Name. If the account is found, the account details should be populated on screen. If no account is found, an error message should be displayed to the user.
How can this be accomplished? (Choose two.)

  • A. Use the <apex:pageMessages> tag to display the error message
  • B. Use the ApexPages.addMessage() method to add the error message
  • C. Use the (apex: information) tag to display the error message
  • D. Use the account.addError() method to add the error message

Answer: A,B

Explanation:
Explanation/Reference:


NEW QUESTION # 47
Universal Containers has a Visualforce page that displays a table every Container_ c being rented by a gives Account.. failing because some of the customers rent over 100,000 containers.
What should a developer change about the Visualforce page to help with the page load errors?

  • A. Use JavaScript remoting with SOQL Offset.
  • B. Use lazy loading and a transient List variable.
  • C. Implement pagination with an OffsetController.
  • D. Implement pagination with a StandardSetController.

Answer: C


NEW QUESTION # 48
Refer to the code segment above.
When following best prachces for writing Apex triggers, which two lines are wrong or cause for concern?
Choose 2 answers

  • A. Line 20
  • B. Line 12
  • C. Line 16
  • D. Lines

Answer: A,D


NEW QUESTION # 49
A company needs to automatically delete sensitive information after 7 years. This could delete almost a million records every day.
How can this be achieved?

  • A. Use aggregate functions to query for records older than 7 years, and then delete the AggregateResult objects.
  • B. Schedule a batch Apex process to run every day that Queries and deletes records older than 7 years.
  • C. Perform a SOSL statement to find records older than 7 years, and then delete the entire result set.
  • D. Schedule an Cfuture process to Query records older than 7 years, and then recursively invoke itself in 1,000 record batches to delete them.

Answer: B


NEW QUESTION # 50
Example 1:
AggregateResult[] groupedResults = [SELECT CampaignId, AVG(Amount) FROM Opportunity GROUP BY CampaignId]; for (AggregateResult ar : groupedResults)
{
System.debug('Campaign ID' + ar.get('CampaignId'));
System.debug('Average amount' + ar.get('expr0'));
}
Example 2:
AggregateResult[] groupedResults = [SELECT CampaignId, AVG(Amount) theAverage FROM Opportunity GROUP BY CampaignId]; for (AggregateResult ar : groupedResults)
{
System.debug('Campaign ID' + ar.get('CampaignId'));
System.debug('Average amount' + ar.get('theAverage'));
}
Example 3:
AggregateResult[] groupedResults = [SELECT CampaignId, AVG(Amount) FROM Opportunity GROUP BY CampaignId]; for (AggregateResult ar : groupedResults)
{
System.debug('Campaign ID' + ar.get('CampaignId'));
System.debug('Average amount' + ar.get.AVG());
}
Example 4:
AggregateResult[] groupedResults = [SELECT CampaignId, AVG(Amount) theAverage FROM Opportunity GROUP BY CampaignId]; for (AggregateResult ar : groupedResults)
{
System.debug('Campaign ID' + ar.get('CampaignId'));
System.debug ('Average amount' + ar.theAverage);
}
Which two of the examples above have correct System.debug statements? (Choose two.)

  • A. Example 2
  • B. Example 3
  • C. Example 1
  • D. Example 4

Answer: A,C


NEW QUESTION # 51
A company has code to update a Request and Request Lines and make a callout to their external ERP system's REST endpoint with the updated records.


What should be done to address the problem?

  • A. Change the CalloutUtil.makeRestCallout to an @future method.
  • B. Remove the Database.setSavepoint and Database.rollback.
  • C. Move the CalloutUtil.makeRestCallout method call below the catch block.
  • D. Change the CalloutUtil.makeRastCallout to an @InvocableMethed method.

Answer: A


NEW QUESTION # 52
Universal Containers requested the addition of a third-party Map widget to an existing Lightning web component.
Which two actions should the developer take to implement this requirement?
Choose 2 answers

  • A. Upload the third-party JavaScript library as a static resource that Imports Into the component.
  • B. Use a content distribution network and Include <script> <script> tags In the component.
  • C. Import the third-party JavaScript module directly Into the component.
  • D. Import loadscript from lightning platformResourceLoader.

Answer: B,D


NEW QUESTION # 53
What is a consideration when testing batch Apex? (Choose two.)

  • A. Test methods must use the @isTest (SeeAllData=true) annotation
  • B. Test methods must call the batch execute() method once
  • C. Test methods must run the batch between Test.startTest() and Test.stopTest()
  • D. Test methods must execute the batch with a scope size of less than 200 records

Answer: C,D


NEW QUESTION # 54
A company has a custom object Sales_Help_Request__c that has a Lookup relationship to Opportunity. The Sales_Help_Request__c has a number field, Number_of_Hours__c, that represents the amount of time spent on the Sales_Help_Request__c.
A developer is tasked with creating a field, Total_Hours__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 trigger on Sales_Help_Request__c
  • C. A roll-up summary field on the Opportunity object
  • D. A workflow rule on the Sales_Help_Request__c object

Answer: B


NEW QUESTION # 55
......

PDII Dumps - Pass Your Certification Exam: https://www.certkingdompdf.com/PDII-latest-certkingdom-dumps.html

Latest Real Salesforce PDII Exam Dumps Questions: https://drive.google.com/open?id=1Q4kry6Bx-HMEZueguXwCuEk6NH9_t8eP