Get Special Discount Offer of PDII-JPN Certification Exam Sample Questions and Answers [Q21-Q39]

Share

Get Special Discount Offer of PDII-JPN Certification Exam Sample Questions and Answers

New PDII-JPN Dumps For Preparing Salesforce Developers Certified Salesforce Exam Well

NEW QUESTION # 21
開発者は、次のように Queueable インターフェースを実装するクラスを作成しました。
ジャワ
共有なしのパブリッククラス OrderQueueableJob は Queueable を実装します {
パブリック void 実行(QueueableContext コンテキスト) {
// 実装ロジック
System.enqueueJob(新しい FollowUpJob());
}
}
デプロイメントプロセスの一環として、開発者は対応するテストクラスを作成する必要があります。テストクラスを正常に実行するために、開発者が実行すべき2つのアクションはどれですか?1

  • A. テスト クラスの実行ユーザーが、少なくとも Order オブジェクトに対する「すべて表示」権限を持っていることを確認します。
  • B. Queueable ジョブが一括モードで実行できるようにするには、seeAllData=true を実装します。2
  • C. System.enqueueJob(new OrderQueueableJob()) を Test.startTest と Test.stopTest() で囲みます。
  • D. テスト実行中にジョブの連鎖を防ぐには、Te3st.isRunningTest() を実装します。

Answer: C,D

Explanation:
Testing asynchronous Apex, such as the Queueable interface, requires specific handling to ensure the job actually executes during the test run and adheres to platform limits.
First, Salesforce enforces a strict limit on chaining Queueable jobs during unit tests. Specifically, you cannot chain jobs (enqueue a job from another job) within a test. Since the OrderQueueableJob attempts to enqueue FollowUpJob, the test will throw an error. To resolve this, the developer should use Test.isRunningTest() (Option B) within the execute method to conditionally bypass the System.enqueueJob call during test runs.
Second, asynchronous jobs are queued by the system and do not run immediately. To force the execution of a Queueable job so that results can be asserted, the System.enqueueJob call must be wrapped within Test.
startTest() and Test.stopTest() (Option D). When Test.stopTest() is called, the execution pauses until all queued asynchronous jobs in that block finish running.
Option A is incorrect because seeAllData does not affect asynchronous processing modes. Option C is incorrect because the class is defined as without sharing, meaning it bypasses sharing rules regardless of the running user's permissions. By combining recursion/chaining guards and the startTest/stopTest block, the developer can reliably test the logic within the execute method.


NEW QUESTION # 22
開発者は、外部 Web サービスの WSDL から Apex コードを生成しました。Web サービスには基本認証が必要です。
開発者は認証にどのコードを使用する必要がありますか?

  • A. Http.setAuthentication('Basic QthZGprjpchVulHNchFtZQ')
  • B. stub.inputHttpHeaders_x.put('Authorization' , 'Basic QthZGprJpchVulHNchFtZQ')
  • C. Http.setHeader ('Authorization' , 'Basic QthZGprjpchVulHNchFtZQ!)
  • D. stub.authentication.put ('Authorization','Basic QthZGprjpchVulHNchFtZQ')

Answer: B


NEW QUESTION # 23
開発者は、ゲストがフロントデスクのキオスクに到着したときに自己登録できる Aura コンポーネントを構築しました。ここで開発者は、ゲストがフロント デスクに到着するたびにユーザーに警告するユーティリティ トレイのコンポーネントを作成する必要があります。
何を使えばいいのでしょうか?

  • A. アプリケーションイベント
  • B. コンポーネントイベント
  • C. 変更履歴
  • D. DML 操作

Answer: A

Explanation:
Application Events in Aura components are used for communication between components that are not in the same containment hierarchy. An application event to alert users about the arrival of a guest at the front desk is appropriate because it allows any component within the app to listen and respond to the event, regardless of where it is located in the component hierarchy.References: Aura Components Developer Guide - Application Event


NEW QUESTION # 24
セーブポイントに関して正しいのはどれですか?

  • A. 任意の順序で作成されたセーブポイント変数にロールバックできます。
  • B. 静的変数はロールバック中に元に戻されません。
  • C. セーブポイントへの参照は、トリガー呼び出しをまたがる可能性があります。
  • D. セーブポイントは DML ステートメントのガバナ制限によって制限されません。

Answer: B

Explanation:
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


NEW QUESTION # 25
テストクラスで Vizualforce ページを
初期化するベストプラクティスは何ですか?

  • A. テストを使用します。setCurrentPage (Page.MyTeatPage);
  • B. テストを使用します。currantPage .getParamatars put (MyTaestPaga) ;
  • C. コントローラーを使用します。現在のページ。setPage (MyTastfage) ;
  • D. テストを使用します。setCurrentPage MyTestPags;

Answer: A


NEW QUESTION # 26
Universal Containers は、ユーザーが送信した製品イメージのサイズを変更する Heroku サービスと統合する必要があります。
統合を実装し、Heroku アプリのエンドポイントへの悪意のある呼び出しから保護するための 2 つの代替手段は何ですか? 2つの答えを選択してください

  • A. アウトバウンド メッセージでワークフロー ルールを作成し、[セッション ID の送信] を選択して、Heroku アプリがそれを使用してサイズ変更された画像を Salesforce に送り返すことができるようにします。
  • B. @future Apex HTTP コールアウトを使用して、シリアル化された JSON データと何らかの形式の事前共有秘密鍵を渡すトリガーを作成します。Heroku アプリがリクエストを認証し、サイズ変更された画像を Salesforce に保存できるようにします。
  • C. Heroku アプリがサイズ変更された画像を Salesforce に自動的に保存できるようにするアウトバウンド メッセージを含むワークフロー ルールを作成します。
  • D. JSON シリアル化データを渡す @future Apex HTTP コールアウトを使用するトリガーを作成します。したがって、Heroku アプリは、Salesforce でサイズ変更された画像を使用してコールアウトに自動的に返信できます。

Answer: A,C


NEW QUESTION # 27
開発者は、組織内のすべてのカスタム オブジェクトのドロップダウン リストを表示する Lightning Web コンポーネントを作成します。
Apexメソッドはデータを準備し、コンポーネントに返します。開発者はレスポンスに含めるオブジェクトを決定するために何をすべきでしょうか?

  • A. sObject の記述結果の isCustom() 値を確認します。
  • B. sObject の記述結果で、getObjectType() の値が 'Custom' か 'Standard' かを確認します。
  • C. @salesforce/schema からすべてのカスタム オブジェクトのリストをインポートします。
  • D. Schema クラスの getCustomObjects() メソッドを使用します。

Answer: A

Explanation:
Comprehensive and Detailed Explanation:
To programmatically identify custom objects in Apex, developers utilize Schema Describe information. The Schema.getGlobalDescribe() method returns a map of all object tokens in the org. By iterating through these tokens and calling the getDescribe() method on each, the developer can access various properties of the object's metadata.
The specific property to distinguish between standard and custom objects is the isCustom() method (Option C). This boolean method returns true if the object is a custom object (including custom settings and custom metadata types) and false if it is a standard platform object.
Option A is incorrect because @salesforce/schema is used in LWC to import references to specific known objects/fields, not to discover the entire org's metadata dynamically. Option B is incorrect as getObjectType() returns an SObjectType token, not a string value like 'Custom'. Option D is incorrect because there is no getCustomObjects() method in the standard Schema class; discovery must be done via the global describe map.


NEW QUESTION # 28
標準コントローラー ページにカスタム機能を追加する場合、またはページ全体で再利用可能な機能が必要な場合、どのタイプのコントローラーが最適ですか?

  • A. カスタムコントローラー
  • B. 標準コントローラー
  • C. コントローラ拡張
  • D. 標準リスト/セット コントローラー

Answer: C


NEW QUESTION # 29
開発者は、ゲストがフロントデスクのキオスクに到着したときに自己登録できる Aura コンポーネントを構築しました。ここで開発者は、ゲストがフロント デスクに到着するたびにユーザーに警告するユーティリティ トレイのコンポーネントを作成する必要があります。
何を使えばいいのでしょうか?

  • A. アプリケーションイベント
  • B. コンポーネントイベント
  • C. 変更履歴
  • D. DML 操作

Answer: A


NEW QUESTION # 30
ある会社には、ユーザの入力に基づいて結果のリストを返す Apex コントローラを呼び出すことで、ユーザが特定のオブジェクト タイプのレコードを検索できるカスタム コンポーネントがあります。検索が完了すると、searchComplete イベントが発生し、結果がイベントの results 属性に入れられます。このコンポーネントは他のコンポーネント内で使用されるように設計されており、1 つのページに複数回表示される場合があります。
検索完了時にイベントを発生させるために追加する最適なコードは何ですか?

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

Answer: D

Explanation:
The optimal code that should be added to fire the event when the search has completed is Option D.
This option uses the $A.get("e.c:searchComplete") method to get the event definition, the setParams() method to set the results attribute, and the fire() method to fire the event. The option also uses the cmp.getEvent("searchComplete") method to get the event definition, which is equivalent to the $A.get() method. Option A is incorrect, as it uses the $A.createComponent() method, which is used to create a component dynamically, not an event. Option B is incorrect, as it uses the $A.eventService.newEvent() method, which is deprecated and should not be used. Option C is incorrect, as it uses the $A.enqueueAction() method, which is used to invoke an Apex controller method, not an event. Reference: [Create and Fire Events], [Lightning Components Developer Guide]


NEW QUESTION # 31
Universal Containersは、Customer Community PlusライセンスでCustomer Communityを利用したいと考えています。UCは外部ユーザー向けにプライベート共有モデルを使用しています。要件の一つは、取引先責任者と様々な取引先レコードを関連付けるカスタム連結オブジェクトに基づいて、同じ取引先階層内の特定のコミュニティユーザーが複数の部門のコンテナを参照できるようにすることです。これらの要件を満たすソリューションはどれでしょうか?

  • A. レコードを公開するために共有なしを指定するカスタム コントローラを使用する Visualforce ページ。
  • B. 所有者に基づいて適切なレコードを表示するフィルターを備えたジャンクション オブジェクトのカスタム リスト ビュー。
  • C. Lightning データ サービスを使用するコミュニティ ホームページ上の Lightning Web コンポーネント。
  • D. 連結オブジェクトのリレーションに基づいて Apex 管理共有レコードを作成する Apex トリガー。

Answer: D

Explanation:
9
The "Customer Community Plus" license is distinct because it supports advanced sharing features, including
10Apex Managed Sharing. In a Private sharing model, a standard community user can only see records they own or those shared with them via the role hierarchy (if applicable). Since the requirement involves granting access based on a complex relationsh11ip defined in a junction object, standard sharing rules are insufficient because they cannot "walk" the relations12hip of the junction object to determine access.
Apex Managed Sharing (Option A) allows a developer to bridge this gap. A trigger can be written on the junction object. When a relationship is created between a Contact (Community User) and an Account (Department), the trigger can insert a record into the AccountShare table (or the share table of the container object). This share record explicitly grants the User 'Read' access to the related records.
Option C is an "anti-pattern" because using without sharing to bypass security is a security risk and doesn't actually grant record access for standard platform features; it only hides the restriction within that specific page. Option B and D are UI-level solutions and do not address the underlying record-level security (sharing) required for a Private OWD model. Apex Managed Sharing provides a robust, programmatic way to enforce complex, data-driven security requirements in a Community environment.


NEW QUESTION # 32
開発者は、次のメソッドの単体テストを作成しています。

ネガティブなテスト ケースで使用されるアサーションはどれですか?

  • A. System.assertEquals (真、isFreezing('O')
  • B. System.assertEquals(true, isFreezing(null))
  • C. System.assertEquals(null, isFreezing('asdf))
  • D. System.assertEquals(true, isFreezingClOO'))

Answer: C


NEW QUESTION # 33
選択的 SOQL クエリであり、200,000 の取引先レコードの大規模なデータセットに使用できる 2 つのクエリはどれですか?
2 つの答えを選択してください

  • A. SELECT Id FROM Account WHERE II IK (アカウント Ida のリスト)
  • B. '!-NULL のような名前のアカウント WHERE から ID を選択します
  • C. SELECT ID FRCM アカウント WHERE 名 != ' '
  • D. SELECT ID FRCM アカウント WHEP 名 IN (名前のリスト) AND Customer_Number_c= 'ValueA

Answer: A,D

Explanation:
The two queries that are selective SOQL queries and can be used for a large data set of 200,000 Account records are: SELECT Id FROM Account WHERE Name IN (List of Names) AND Customer_Number__c = 'ValueA, and SELECT Id FROM Account WHERE Id IN (List of Account Ids). A selective SOQL query is a query that filters the records based on an indexed field or a field that has high selectivity. An indexed field is a field that has an index created by the system or the user to speed up the query performance. A field has high selectivity if the filter value in the query matches a low percentage of the total number of records for that object. The Name and Id fields are indexed fields, and the Customer_Number__c field is a custom field that can be marked as an external ID, which also creates an index. The IN operator allows the query to filter the records based on a list of values, which can improve the selectivity. The AND operator allows the query to combine multiple filters, which can also improve the selectivity. The query SELECT Id FROM Account WHERE Name LIKE '!-NULL' is not a selective SOQL query, as the LIKE operator with a wildcard character (%) at the beginning of the filter value is not selective, and the Name field is not indexed when used with the LIKE operator. The query SELECT Id FROM Account WHERE Name != '' is not a selective SOQL query, as the != operator is not selective, and the Name field is not indexed when used with the != operator. Reference: [Working with Very Large SOQL Queries], [Custom Field Attributes]


NEW QUESTION # 34
開発者は、lightning-record-edit-form t を使用してリードに関する情報を収集する Lightning Web コンポーネントを作成しました。ユーザーは、リード レコードを保存しようとすると、入力に関するエラー メッセージが一度に 1 つしか表示されないと不満を漏らします。
リード レコードを保存しようとすると、入力に関するエラー メッセージが一度に 1 つしか表示されないと不満を漏らします。
複数のフィールドで検証を実行し、最小限の JavaScript 介入で同時に複数のエラー メッセージを表示するための推奨されるアプローチは何ですか?

  • A. 検証ルール
  • B. トライ/キャッチ/最終ブロック
  • C. アペックストリガー
  • D. 外部 JavaScript ライブラリ

Answer: D


NEW QUESTION # 35
次のコード スニペットを考えてみましょう。

2 つの答えを選択してください

  • A. エンドポイントと資格情報を保存するための名前付き資格情報 endpoint_NC を作成します。
  • B. req.setEndpoint,calloat;eodPolat NC'); を使用します。コールアウトリクエスト内で。
  • C. エンドポイントの URL を endpointURL という名前のカスタム ラベルに保存します。
  • D. reg.setEndpoint(Label.endPoinrURL); を使用します。

Answer: B,C


NEW QUESTION # 36
開発者は、外部 Web サービスへのコールアウトを行う必要があるコードを作成しています。
コールアウトを非同期メソッドで行う必要があるのはどのシナリオですか?

  • A. 1 回のトランザクションで 10 件を超えるコールアウトが行われます。
  • B. コールアウトは Apex トリガで作成されます。
  • C. コールアウトは REST APL を使用して作成されます。
  • D. コールアウトが完了するまでに 60 秒以上かかる可能性があります。

Answer: B

Explanation:
Callouts cannot be made from a synchronous context such as an Apex trigger because they might exceed the maximum execution time, leading to timeouts. Asynchronous methods, such as future or Queueable, are required to handle callouts from triggers.
References: Apex Developer Guide - Asynchronous Apex


NEW QUESTION # 37
開発者は、getRecord ワイヤ アダプタを使用する Lightning Web コンポーネントを作成しました。
ワイヤ メソッドが期待どおりに機能していることを検証するために、Jest テストで開発者が行うべきことを 3 つ選択してください。
3つの答えを選択してください

  • A. lightning/uiRecordAp1 から getRecord をインポートします。
  • B. assert ステートメントを使用して結果を検証します。
  • C. iwe から mrf をインポートします。
  • D. モード データを含む JSON ファイルを作成します。
  • E. API を使用します。

Answer: A,B,C


NEW QUESTION # 38
組織には、アカウントにプライマリとしてリストされる連絡先が常に 1 つだけ存在する必要があるという要件があります。したがって、1 つの連絡先を選択すると、他の連絡先の選択が解除されます。クライアントは、この機能を制御するために、連絡先に「Is Primary」というチェックボックスを追加したいと考えています。
また、クライアントは、すべての連絡先の姓が完全に大文字で保存されていることを確認したいと考えています。
これらの要件を実装する最適な方法は何でしょうか?

  • A. 更新後と更新前の両方に対して単一のトリガーを Contact に書き込み、各ロジック セットを処理するヘルパー クラスへのコールアウトを作成します。
  • B. Is Primary ロジックの場合は Contact に更新後トリガーを記述し、姓ロジックの場合は Contact に別の更新前トリガーを記述します。
  • C. Is Primary ロジックの場合は Contact に検証ルールを記述し、姓ロジックの場合は Contact に更新前トリガーを記述します。
  • D. Is Primary ロジックの Account に更新後トリガーを書き込み、姓ロジックの Contact に before update トリガーを書き込みます。

Answer: A

Explanation:
A single trigger on Contact that handles both after update and before update events, utilizing helper classes for each logic set, is the most optimal implementation. It centralizes the logic for maintaining primary contacts and normalizing last names while allowing for clear separation of concerns through helper classes.References:
Apex Developer Guide - Triggers


NEW QUESTION # 39
......

Updated PDII-JPN Dumps Questions Are Available For Passing Salesforce Exam: https://www.ipassleader.com/Salesforce/PDII-JPN-practice-exam-dumps.html

Free UPDATED Salesforce PDII-JPN Certification Exam Dumps is Online: https://drive.google.com/open?id=1pSRDNtHL3H5LMhBzcPvAXF3cJMXVMLcQ