[Q69-Q93] リアルSalesforce PDII試験問題 [更新されたのは2024年]

Share

リアルSalesforce PDII試験問題 [更新されたのは2024年]

PDII試験問題集で合格させるのは更新されたのは2024年年最新のSalesforce Certified Platform Developer II (PDII)


PDII 認定試験は、Salesforce Certified Platform Developer I 資格をすでに取得している開発者を対象としています。この監督付きの試験には、60問の多肢選択問題と5問の非スコアリング問題が含まれています。試験は、Apex プログラミング、データモデリング、ユーザーインターフェース開発などの領域で開発者の知識とスキルを評価するように設計されています。試験時間は2時間半であり、合格点は70%です。


PDII認定を取得することは、Salesforceプラットフォームの深い理解と、スケーラブルで効率的かつ安全なアプリケーションを設計および開発する能力を示すものです。より複雑なプロジェクトに取り組み、キャリアを進めたい開発者にとって、この認定は貴重な資格です。この認定は、Salesforceイベント、コミュニティ、および求人機会へのアクセスも提供します。


PDII試験の準備をするために、開発者はApex、Visualforce、およびLightningコンポーネントに堅固な理解を持つ必要があります。また、Salesforceの開発ベストプラクティスに精通しており、複雑なビジネスロジックの設計と実装の経験がある必要があります。開発者は、SalesforceのTrailheadプラットフォームを含むオンラインで利用可能なさまざまなリソースを活用することができます。Trailheadには、PDII試験の準備を支援するために設計されたさまざまなコースやモジュールがあります。さらに、開発者は、Salesforceパートナーが提供するトレーニングコースに参加したり、Salesforceのイベントやカンファレンスに参加して、Salesforce開発の最新動向について学ぶことができます。

 

質問 # 69
Exhibit:

What can be done to improve the performance of the insert trigger shown above?

  • A.
  • B.
  • C.
  • D.

正解:C


質問 # 70
A large company uses Salesforce across several departments. Each department has its own Salesforce Administrator. It was agreed that each Administrator would have their own sandbox in which to test changes. Recently, users notice that fields that were recently added for one department suddenly disappear without warning. Also, Workflows that once sent emails and created tasks no longer do so. Which two statements are true regarding these issues and resolution? Choose 2 answers

  • A. A sandbox should be created to use as a unified testing environment instead of deploying Change Sets directly to production.
  • B. Page Layouts should never be deployed via Change Sets, as this causes Workflows and Field-level Security to be reset and fields to disappear.
  • C. The administrators are deploying their own Change Sets over each other, thus replacing entire Page Layouts and Workflows in Production
  • D. The administrators are deploying their own Change Sets, thus deleting each other's fields from the objects in production.

正解:A、C


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

正解:A


質問 # 72
Consider the following code snippet:

Which governor limit is likely to be exceeded when the trigger runs when a scope of 200 newly inserted accounts?

  • A. Total number of records processed as a result of DML
  • B. Total number of SOQL queries issued
  • C. Total number of DML statements issued
  • D. Total number of SOQL queries issued

正解:C


質問 # 73
A developer is integrated with a legacy on-premises SQL database.
What should the developer use to ensure the data being integrated is matched to the right records in Salesforce?

  • A. External id field
  • B. External Object
  • C. Lookup field
  • D. Formula field

正解:A


質問 # 74
A company requires an external system to be notified whenever an account is updated.

What LimitException could the following code trigger?

  • A. System.LimitException: Too many SOQL queries
  • B. System.LimitException: Too many future calls
  • C. System.CalloutException: Callout from triggers are currently not supported
  • D. System.LimitException: Too many callouts

正解:B


質問 # 75
Which statement is true regarding savepoints?

  • A. Static variables are not reverted during a rollback.
  • B. Reference to savepoints can cross trigger invocations.
  • C. You can roll back to any savepoint variable created in any order.
  • D. Savepoints are not limited by DML statement governor limits.

正解:A

解説:
When rolling back to a savepoint, any DML operations that occurred after that savepoint are undone, but static variables are not reverted. Therefore, when a rollback occurs, the state of all static variables at the time of the rollback remains the same as it was just before the rollback.References: Apex Developer Guide - Savepoint and Transaction Control


質問 # 76
A company exposes a REST web service and wants to establish two-way SSL between Salesforce and the REST web service. A certificate signed by an appropriate certificate authority has been provided to the developer.
What modification is necessary on the Salesforce side? (Choose two.)

  • A. Configure two-factor authentication with the provided certificate
  • B. Update the code to use HttpRequest.setClientCertificateName()
  • C. Update the code to use HttpRequest.setHeaderQ to set an Authorization header.
  • D. Create an entry for the certificate in Certificate and Key Management

正解:B、D


質問 # 77
An Apex trigger creates a Contract record every time an Opportunity record is marked as Closed and Won. This trigger is working great, except (due to a recent acquisition) historical Opportunity records need to be loaded into the Salesforce instance.
When a test batch of records are loaded, the Apex trigger creates Contract records.
A developer is tasked with preventing Contract records from being created when mass loading the Opportunities, but the daily users still need to have the Contract records created.
'What is the most extendable way to update the Apex trigger to accomplish this?

  • A. Add a validation rule to the Contract to prevent Contract creation by the user who loads the data.
  • B. Add the Profile ID of the user who loads the data to the trigger, so the trigger will not fire for this user.
  • C. Use a hierarchy custom setting to skip executing the logic inside the trigger for the user who loads the data.
  • D. Use a list custom setting ta disable the trigger for the user who loads the data.

正解:C


質問 # 78
trigger AssignOwnerByRegion on Account ( before insert, before update )
{
List<Account> accountList = new List<Account>();
for( Account anAccount : trigger.new )
{
Region__c theRegion = [
SELECT Id, Name, Region_Manager__c
FROM Region__c
WHERE Name = :anAccount.Region_Name__c
];
anAccount.OwnerId = theRegion.Region_Manager__c;
accountList.add( anAccount );
}
update accountList;
}
Consider the above trigger intended to assign the Account to the manager of the Account's region.
Which two changes should a developer make in this trigger to adhere to best practices? (Choose two.)

  • A. Move the Region__c query to outside the loop.
  • B. Use a Map accountMap instead of List accountList.
  • C. Use a Map to cache the results of the Region__c query by Id.
  • D. Remove the last line updating accountList as it is not needed.

正解:B、C


質問 # 79
The SOAP API __________.

  • A. Is used to create, retrieve, update or delete records, such as accounts, leads, and custom objects, and allows you to allows you to maintain passwords, perform searches, and much more
  • B. Provides a powerful, convenient, and simple REST-based web services interface for interacting with Salesforce. Its advantages include ease of integration and development, and it's an excellent choice of technology for use with mobile applications and web projects
  • C. Is based on REST principles and is optimized for loading or deleting large sets of data. You can use it to query, queryAll, insert, update, upsert, or delete many records asynchronously by submitting batches
  • D. Is used to retrieve, deploy, create, update, or delete customizations for your org. The most common use is to migrate changes from a sandbox or testing org to your production environment

正解:A

解説:
Use SOAP API in any language that supports Web services Session ID is used to make further calls after logging in


質問 # 80
The use of the transient keyword in Visualforce page controllers helps with which common performance issue?

  • A. Improves page transfers
  • B. Improves query performance
  • C. Reduces view state
  • D. Reduces load times

正解:C


質問 # 81
A developer created a Lightning web component for the Account record page that displays the five most recently contacted Contacts for an Account. The Apex method, Contacts, returns a list of Contacts and will be wired to a property in the component.

Which two lines must change in the above code to make the Apex method able to be wired?
Choose 2 answers

  • A. Add @AuraEnabled {cacheable=true) to line 03.
  • B. Remove private from line 09.
  • C. Add public to line 04.
  • D. Add @AuraEnabled {cacheable=trues) to line 08.

正解:A、C


質問 # 82
What should be added to the setup, in the location indicated, for the unit test above to create the controller extension for the test?
A)

B)

C)

D)

  • A. Option A
  • B. Option D
  • C. Option B
  • D. Option C

正解:D


質問 # 83
Universal Containers analyzes a Lightning web component and its Apex controller class that retrieves a list of contacts associated with an account. The code snippets are as follows:

Based on the code snippets, what change should be made to display the contacts' mailing addresses in the Lightning web component?

  • A. Add a new method in the Apex controller class to retneve the mailing addresses separately and modify the Lightning web component to invoke this method.
  • B. Extend the lightning-datatable component in the Lightning web component to include a column for the MailingAddress field.
  • C. Modify the SOQL guery in the getAccountContacts method to include the MailingAddress field.
  • D. Modify the SOQL query in the getAccountContacts method to include the MailingAddress field and update the columns attribute in javascript file to add Mailing address fields.

正解:D

解説:
To display the contacts' mailing addresses in the Lightning web component, both the SOQL query in the getAccountContacts method and the columns attribute in the JavaScript file of the component need to be updated. The query must include the MailingAddress field, and the JavaScript file must be modified to add this field to the columns shown in the lightning-datatable.References: Lightning Web Components Developer Guide - lightning-datatable


質問 # 84
Consider the following code snippet:

How should the <e-orders> component communicate to the <c-selected-orders component that an order has been selected by the user?

  • A. Create and fire a standard DOM event.
  • B. Create and fire a component event.
  • C. Create and fire an application event.
  • D. Create and dispatch a custom event,

正解:D

解説:
Create and dispatch a custom event. This approach allows LWC components to communicate effectively, maintaining component encapsulation and reusability.References: Communicating Between Lightning Web Components


質問 # 85
A Visualforce page needs to make a callout to get biding information and tax information from two different REST endpoints. The information needs to be Displayed to the user at the same time and the return value of the billing information contains the input for the tax information callout. Each endpoint might take up to two minutes to process.
How should a developer implement the callouts?

  • A. An HTTP REST call out for both the billing callout and the tax callout
  • B. An HTTP REST callout for the billing callout and a Continuation for the tax callout
  • C. A Continuation for the billing callout and an HTTP REST callout for the tax callout
  • D. A Continuation for both the billing callout and the tax callout

正解:D


質問 # 86
A company wants to run different logic based on an Opportunity's record type.
Which code segment handles this request and follows best practices?

  • A.
  • B.
  • C.
  • D.

正解:C


質問 # 87
Universal Containers uses a custom Lightning page to provide a mechanism to perform a step-by-step wizard search for Accounts. One of the steps in the wizard is to allow the user to input text into a text field, ERF Number_c, that is then used in a query to find matching Accounts.

Which step should be taken to resolve the issue?

  • A. Mark the ERP_Number__ c field as required.
  • B. Move the SO0L query to within an asynchronous process.
  • C. Mark the ERP_Numker = field as an external 10.
  • D. Perform the SOQL query as part of a for loop.

正解:C

解説:
The step that should be taken to resolve the issue is to mark the ERP_Number__c field as an external ID. An external ID is a custom field that has the External ID attribute, meaning that it contains unique record identifiers from a system outside of Salesforce. When a field is marked as an external ID, Salesforce automatically indexes it and allows it to be used in filters, such as the WHERE clause in a SOQL query. This would improve the performance of the query and avoid the non-selective query exception. Performing the SOQL query as part of a for loop would not resolve the issue, as it would still hit the query limits and be inefficient. Marking the ERP_Number__c field as required would not resolve the issue, as it would not affect the query performance or the indexability of the field. Moving the SOQL query to within an asynchronous process would not resolve the issue, as it would still run into the same query limits and exception. Reference: [Custom Field Attributes], [Working with Very Large SOQL Queries]


質問 # 88
A developer is asked to find a way to store sacret data with an ability to specify which profiles and users can access which secrets.
What should be used to store this data?

  • A. Static resources
  • B. Custom metadata
  • C. Custom settings
  • D. system.Cookie class

正解:C

解説:
Custom settings are a type of custom data that can be used to store secret data with an ability to specify which profiles and users can access which secrets. Custom settings can store data in a hierarchical structure, which allows the developer to set different values for different levels of access, such as organization, profile, or user. Custom settings can also be encrypted using the Protected Custom Settings feature, which prevents the data from being exposed in the user interface, the API, or Apex code. By using custom settings, the developer can store the secret data securely and control the access to the data based on the user's profile or identity. Reference: [Custom Settings], [Protected Custom Settings]


質問 # 89
A page throws an 'Attempt to dereference a null object' error for a Contact.
What change in the controller will fix the error?

  • A. Declare a static final Contact at the top of the controller.
  • B. (o] Use a condition in the getter to return a new Contact if it is null.
    G Change the setter's signature to return a Contact.
  • C. Change the getter's signature to be static Contact.

正解:B


質問 # 90

The test method above tests an Apex trigger that the developer knows will make a lot of queries when a lot of Account are simultaneously updated to be customer.
The test method fails at the Line 20 because of too many SOQL queries
What is the correct way to fix this?

The test method above tests an Apex trigger that the developer knows will make a lot of queries when a lot of Accounts are simultaneously updated to be customers.
The test method fails at the Line 20 because of too many SOQL queries.
What is the correct way to fix this?

  • A. Replace most of the Apex Trigger with Process Builder processes to reduce the number of queries in the trigger.
  • B. Add TeststartTest() before Line 18 of the code and add Test.stopTest() after line 18 of the code.
  • C. Add TesLstartTest() before and Test.stop Test() after both Line 7 of the code and Line 20 of the code.
  • D. Change the DataFactory class to create fewer Accounts so that the number of queries in the trigger is reduced.

正解:B


質問 # 91
Instead of waiting to send emails to support personnel directly from the finish method of a batch Apex process, Universal Containers wants to notify an external system in the event that an unhandled exception occurs.
What is the appropriate publish/subscribe logic to meet this requirement?

  • A. Publish the error event using the Eventbus. publish () method.
  • B. Publish the error event with a Flow.
  • C. Publish the error event using the addError method.
  • D. No publishing is necessary. Have the external system subscribe to the BatchapexErrorEvent.

正解:D


質問 # 92
What are three reasons that a developer should write Jest tests for Lightning web components?
Choose 3 answers

  • A. To verify the DOM output of a component
  • B. To test how multiple components work together
  • C. To test a component's non-public properties.
  • D. To verify that events fire when expected
  • E. To test basic user interaction

正解:A、C、E

解説:
Jest tests are essential for developing Lightning Web Components (LWC) because they allow developers to ensure the quality and correctness of their components in isolation from the rest of the application. Reason A is incorrect because testing non-public properties breaks encapsulation and is considered bad practice. B is correct because Jest tests can simulate user interactions with the component, such as clicking buttons or entering text, to ensure it behaves as expected. C is correct as well because Jest tests can confirm that the component renders the expected DOM output, which is crucial for ensuring that the HTML structure of the component is accurate. D is not the best choice since Jest is more suited for testing components in isolation rather than how multiple components interact; integration tests are more appropriate for that. Lastly, E is correct because Jest tests can verify that events are fired at the appropriate times, which is a critical part of the component's interaction with the rest of the application.
References
Jest Testing: Lightning Web Components Testing
Jest Testing Best Practices: Lightning Web Components Jest Best Practices


質問 # 93
......

PDII試験問題集、PDII練習テスト問題:https://www.goshiken.com/Salesforce/PDII-mondaishu.html

無料PDII試験問題集で合格させるお手軽に試験合格:https://drive.google.com/open?id=13_CnaUQ4Ukv87qUqAnJpEDs47zUQAEBH