PDIIリアルな試験問題PDII練習問題集 [Q57-Q77]

Share

PDIIリアルな試験問題PDII練習問題集

厳密検証されたPDII試験問題集と解答で無料提供のPDII問題と正解付き

質問 # 57
Universal Containers has an Apex trigger on Account that creates an Account Plan record when an Account is marked as a Customer. Recently a workflow rule was added so that whenever an Account is marked as a Customer, a 'Customer Since' date field is updated with today's date.
Since the addition of the workflow rule, two Account Plan records are created whenever the Account is marked as a Customer.
What might cause this to happen?

  • A. The Apex trigger does not use a static variable to ensure it only fires once.
  • B. The workflow rule is configured to evaluate when a record is created and every time it is edited.
  • C. The Apex trigger is not bulk safe and calls insert inside of a for loop.
  • D. The workflow rule field update is marked as 'Re-evaluate Workflow Rules After Field Change."

正解:A


質問 # 58
A developer has a Visualforce page that automatically assigns ewnership of an Account to a queue upon save. The page appears to correctly assign ownership, but an assertion validating the correct ownership fails.
What can cause this problem?

  • A. The test class does not retrieve the updated value from the database,
  • B. The test class does not use the seeallData=true= annotation.
  • C. The test class does not use the Bulk API for loading test data.
  • D. The test class does not implement the Queueable interface.

正解:A


質問 # 59
A developer has working business logic code, but sees the following error in the test class:
You have uncommitted work pending. Please commit
or rollback before calling out.
What is a possible solution?

  • A. Use mast. T=RunningTes={} before making the callout to bypass it in test execution,
  • B. Rewrite the business logic and test classes with @Testvisible set on the callout.
  • C. Call support for help with the target endpoint, as It is likely an external code error.
  • D. Set seeAllData to true the top of the test class, since the code does not fall in practice.

正解:A

解説:
The solution to the error is to use Test.setMock() before making the callout to bypass it in test execution. The Test.setMock() method allows the developer to specify a mock response for an HTTP callout or a web service callout, and avoid sending a real request to an external service. This way, the developer can test the callout logic without actually making the callout, and avoid the error of having uncommitted work pending. The developer should create a class that implements the HttpCalloutMock interface or the WebServiceMock interface, and define the mock response in the respond() method. Then, the developer should use the Test.setMock() method to pass the mock class and the mock response as parameters, before calling the method that makes the callout. Calling support for help with the target endpoint, as it is likely an external code error, will not help, as the error is not caused by the external service, but by the test execution. Setting seeAllData to true at the top of the test class, since the code does not follow best practice, will not help, as it will only allow the test to access the org data, but it will not bypass the callout. Rewriting the business logic and test classes with @testVisible set on the callout will not help, as it will only make the callout accessible to the test class, but it will not bypass the callout. Reference: [Testing HTTP Callouts], [Testing Web Service Callouts], [Apex Developer Guide]


質問 # 60
UC Loans is a small company with a part time Salesforce administrator. UC Loans wants to create a Loan__c record whenever an Opportunity is won. What is the optimal solution for UC Loans to accomplish this?

  • A. Quick Action
  • B. Process Builder
  • C. Workflow Rule
  • D. Apex Trigger

正解:B


質問 # 61
As part of point-to-point integration, a developer must call an external web service which, due to high demand, takes a long time to provide a response. As part of the request, the developer must collect key Inputs from the end user before making the callout. Which two elements should the developer use to Implement these business requirements?
Choose 2 answers

  • A. Lightning web component
  • B. 2 Apex method that returns a Continuation object
  • C. Process Builder
  • D. Screen Flow

正解:A、B


質問 # 62
A developer created a class that implement he Queueable interface, as follows:
As part of the deployment process, the developer is asked to create a corresponding test class.
Which two actions should the developer take to successfully execute the test class?
Choose 2 answers

  • A. Implement Test.isRunningtest ( ) to prevent chaining jobs during test execution.
  • B. Implement seeAllData-true to ensure the Queueable )ob is able to run in bulk mode.
  • C. Ensure the running user of the test class has, at least, the View All permission on the Order object
  • D. Enclose System.enqueueJob (new orderQueueable Job ( }) within Test. starttest and Test, stoptest ()

正解:A、B


質問 # 63
A company requires all internal users to submit a Case for adding a new Account in Salesforce. The case record captures all the data required to create an Account. The case approval process is a manual process.
When a case is approved, an Account record should automatically be created based on the case details. What is the recommended solution?

  • A. Develop a Lightning Process to create an Account Record when the Case status becomes Approved.
  • B. Develop a Before Update trigger on Case to create an Account record based on Case Status.
  • C. Configure a custom button on the Case page to update the Case Status and insert a new Account record.
  • D. Develop an After Update trigger on Case to create an Account record based on Case Status.

正解:A


質問 # 64
A business process requires sending new Account records to an external system. The Account Name, Id, CreatedDate. and CreatedByld must be passed to the external system in near real-time when an Account is Inserted without error.
How should a developer achieve this?

  • A. Use a Workflow rule that calls an @InvocableMethod method.
  • B. Use a Process Builder that calls an @InvocableMethod method.
  • C. Use a before insert trigger and a Queueable class.
  • D. Use a before insert trigger and an @future method.

正解:D


質問 # 65
Consider the following code snippet:

Choose 2 answers

  • A. import { LightningElement, wire ) from 'lwc';
  • B. import getOrders from ,@salesforce/apex/OrderController.getAvailableOrders';
  • C. import ( LightningElement-apt ) from 'lwc*.-
  • D. import getOrders from @salesforc/apex/c.OrderController.getAvailablOrders';

正解:A、B


質問 # 66
What is a best practice when unit testing a controller? Choose 2 answers

  • A. Verify correct page references by using getURL()
  • B. Set query parameters by using getParameters () .put
  • C. Simulate user interaction by leveraging Test.setMock().
  • D. Access test data by using seeAllData=true.

正解:A、B


質問 # 67
A developer created the following test method:

The developer org has five accounts where the name starts with "Test". The developer executes this test in the Developer Console.
After the test code runs, which statement is true?

  • A. There will be no accounts where the name starts with "Test".
  • B. The test will fail.
  • C. There will be five accounts where the name starts with "Test".
  • D. There will be six accounts where the name starts with "Test".

正解:C

解説:
Based on the test method code, the statement that is true after the test code runs is that there will be five accounts where the name starts with "Test". This is because the test method is running in API version 24.0 or later, which means that it can't access pre-existing org data by default, and can only access data that it creates. Therefore, the first query that retrieves the accounts where the name starts with "Test" will return an empty list, as there are no such accounts in the test context. The test method then inserts a new account with the name "Test1", which will be the only account that the test method can access. The second query that retrieves the accounts where the name starts with "Test" will return a list with one account, which is the account that was just inserted. The test method then asserts that the size of the list is equal to 1, which will pass. The test will not fail, as there is no assertion error or exception. There will not be no accounts where the name starts with "Test", as there is one account that was inserted by the test method. There will not be six accounts where the name starts with "Test", as the test method can't access the five accounts that exist in the org data. Reference: [Isolation of Test Data from Organization Data in Unit Tests], [Understanding Test Data]


質問 # 68
A developer is experiencing issues with a Lightning web component. The component must surface information about Opportunity owned by the currently logged-in user.
When the component is rendered, the following message is displayed: ''Error retrieving data'' Which modification should be implemented to the Apex class to overcome the issue?

  • A. Use the Cacheable=True attribute in the Apex method.
  • B. Use the Continuation=true attribute in the Apex method.
  • C. Edit the code to use the without sharing keyword in the Apex class.
  • D. Ensure the OWD for the Opportunity object is public.

正解:A


質問 # 69
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 Sales_Help_Request__c
  • B. A workflow rule on the Sales_Help_Request__c object
  • C. A trigger on the Opportunity object
  • D. A roll-up summary field on the Opportunity object

正解:C


質問 # 70
A developer must create a custom pagination solution. Users will access the solution on a mobile device and will rarely access subsequent pages of records. Performance is crucial. Which approach is optimal?

  • A. Use @Cache annotation in the controller.
  • B. Use OFFSET in SOQL queries.
  • C. Use OFFSET CURSOR in SOQL queries.
  • D. Use a StandardSetController.

正解:B


質問 # 71
A business requires that every parent record must have a child record. A developer writes an Apex method with two DML statements to insert a parent record and a child record.
A validation rule blocks child records from being created. The method uses a try/catch block to handle the DML exception.
What should the developer do to ensure the parent always has a child record?

  • A. Delete the parent record in the catch statement when an error occurs on the child record DML operation.
  • B. Use addExror() on the parent record if an error occurs on the child record.
  • C. Use Catabase.inserc() and set the all = parameter to true,
  • D. Set a database savepoint to rollback if there are errors.

正解:C


質問 # 72
The Salesforce admin at cloud kicks created a custom object called Region_ c to store all postal zip codes in the United States and the Cloud Kicks sales region the Zip code belong to.
Object Name:

Fields:

Cloud Kicks wants a trigger on the Lead to populate the Region based on the Lead's zip code. Which code segment is the most efficient way to fulfill this request?

  • A.
  • B.
  • C.

正解:C


質問 # 73
How can a developer efficiently incorporate multiple JavaScript libraries in an Aura component?

  • A. Join multiple assets from a static resource.
  • B. Implement the libraries in separate helper files.
  • C. Use JavaScript remoting and script tags.
  • D. Use CDNs with script attributes.

正解:A


質問 # 74
Universal Containers uses Big Objects to store almost a billion customer transactions called customer_Transaction_ b.
These are the fields on customer Transaction b:

The following fields have been identified as Index Fields for the Customexr_Transaction__b object: Account__g, Program__c, and Transaction Date_ co.
Which SOQL query is valid on the customer_Transaction_b Big Object?

  • A.
  • B.

正解:B

解説:
Option A is the valid SOQL query on the customer_Transaction_b Big Object. Option A uses the index fields of the Big Object, which are Account__c, Program__c, and Transaction_Date__c, to filter the records. The query also uses the = operator to match the exact values of the index fields, which is required for Big Object queries. The query also uses the SELECT Id, Account__c, Program__c, Transaction_Date__c clause to return only the index fields of the Big Object, which is more efficient than returning all the fields. The query also uses the LIMIT 1000 clause to limit the number of records returned to 1000, which is the maximum limit for Big Object queries. Reference: [SOQL for Big Objects], [Big Object Indexes]


質問 # 75
As part of their quoting and ordering process, a company needs to send POFs to their document storage system's REST endpoint that supports OAuth 2.0. Each Salesforce user must be individually authenticated with the document storage system to send the PDF.
What is the optimal way for a developer to implement the authentication to the REST endpoint?

  • A. Named Credential with an OAuth Authentication Provider
  • B. Hierarchy Custom Setting with an OAuth token custom field
  • C. Hierarchy Custom Setting with 2 password custom field
  • D. Named Credential with Password Authentication

正解:A

解説:
Named Credentials with OAuth handle secure API calls. Individual authentication for each user with OAuth
2.0 is managed through Named Credentials.References: Named Credentials as Callout Endpoints


質問 # 76
A developer created 2 class that implements the Queueable Interface, as follows:

As part of the deployment process, the developer is asked to create a corresponding test class.
Which two actions should the developer take to successfully execute the test class?
Choose 2 answers

  • A. Ensure the running user of the test class has, at I the View All permission on the Order object.
  • B. Implement Test. isRunningTest() to prevent chaining jobs during test execution.
  • C. Implement seeAllData=True to ensure the Queueable job is able to run in bulk mode.
  • D. Enclose System.enqueueJob(new OrderQueueableJob ()] within Tess. and Test .stopTest (1.

正解:A、D


質問 # 77
......


PDII認定試験は、Salesforceを使用して現実世界の問題を解決する開発者の能力をテストする多肢選択問題と実践的な演習から構成されています。開発者は、Salesforceプラットフォーム上でカスタムアプリケーションを作成する能力を示すプログラミング課題を完了する必要があります。試験は、データモデリング、セキュリティ、および統合などのトピックもカバーします。


PDII認定は、Salesforceエコシステムで高く評価されており、Salesforceプラットフォーム上で複雑なアプリケーションを開発するための高度な技術的な専門知識と経験を示しています。さらに、Salesforce Technical Architect認定など、より高度なSalesforce認定のいくつかの前提条件でもあります。

 

無料でゲット!高評価Salesforce PDII試験問題集を今すぐダウンロード!:https://www.passtest.jp/Salesforce/PDII-shiken.html

あなたを合格させるPDII無料最新問題集でSalesforce練習テストしよう:https://drive.google.com/open?id=1gv_nFB8nTaO_QC9uZJl9EFpFOQSuNsCp