試験問題集でPDII練習で無料最新のSalesforce練習テスト [Q44-Q68]

Share

試験問題集でPDII練習で無料最新のSalesforce練習テスト

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

質問 # 44
A company has a custom object. Request__c. that has a field, Completed__c. and a Lookup to Opportunity, Opportunity__c.
Which SOQL query will get a unique list of all of the Opportunity records that have a Completed Request?

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

正解:C


質問 # 45
The Account edit button must be overridden in an org where a subset of users still use Salesforce Classic.
The org already has a Lightning Component that will do the work necessary for the override, and the client wants to be able to reuse it.
How should a developer implement this?

  • A. Override the edit button for Lightning with a Lightning Component, and Classic with a Visualforce page that contains the Lightning Component
  • B. Override the edit button for both Lightning and Classic with a new Visualforce page
  • C. Override the edit button for both Lightning and Classic with a Lightning Component
  • D. Override the edit button for Lightning with a Lightning Page, and Classic with a Visualforce page that contains the Lightning Component

正解:D


質問 # 46
How should a developer verify that a specific Account record is being tested in a test class for a visualforce controller?

  • A. Insert the Account into Salesforce, instantiate the page reference in the test class, then use System.setParentRecordId().get() to set the Account ID.
  • B. Insert the Account in the test class, instantiate the page reference in the test class, then use System.currentPageReference().getParameters{}.put() to set the Account ID.
  • C. Instantiate the page reference in the test class, insert the Account in the test class, then use seeAHData-true to view the Account.
  • D. Instantiate the page reference in the test class, insert the Account in the test class, then use System.setParentRecordld().get() to set the Account ID.

正解:D


質問 # 47
Account object has a field, Audit_Code__, that is used to specify what type of auditing the Account needs and a Lookup to user, Auditor__ that is the assigned auditor.
When an Account is initially created, the user specifies the Audit_Code__. Each User in the org has a unique text field, that is used to automatically assign the correct user to the Account Auditor__ field.

What should be changed to most optimize the code's efficiency?
Choose 2 answers

  • A. Build a Map <Id, List<String>> of Account Id to audit codes.
  • B. Add a WHERE clause to the SOQL query to filter On audit codes.
  • C. Build a Map<String, List<Account>> of audit code to accounts.
  • D. Add an initial SOQL query to get all distinct audit codes.

正解:B、C


質問 # 48
A custom Visualforce controller calls the ApexPages.addMessage() method, but no messages are rendering on the page. Which component should be added to the Visualforce page to display the message?
A)

B)

C)

D)

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

正解:B


質問 # 49

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 2 answers

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

正解:C、D


質問 # 50
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. Use an ID in the WHERE clause of the SOQL query.
  • B. Perform the SOQL query as part of a FOR loop.
  • C. Move the SOQL query to within an asynchronous process.
  • D. Perform the SOQL query via a call to the REST API.

正解:A


質問 # 51
A developer created a custom component to display an HTML table. The developer wants to be able to use the component on different Visualforce Pages and specify different header text for the table. Which tag should the developer use inside the component?

  • A. < apex:attribute>
  • B. < apex:define>
  • C. < apex:param>< meta charset="utf-8" />< apex:param>
  • D. < apex:variable>

正解:A


質問 # 52
The "Webservice" keyword __________.

  • A. Method must be static, and class must be global
  • B. Used for any member variables included
  • C. Can be used on all classes
  • D. All of the above

正解:D


質問 # 53
What is the transaction limit for the number of records using QueryLocator?

  • A. There is no limit
  • B. 50,000
  • C. 5,000,000
  • D. 100,000
  • E. 50,000,000

正解:E

解説:
"Scope" parameter in "executeBatch" can be set up to 2,000 records


質問 # 54
Which three Visualforce components can be used to initiate Ajax behavior to perform partial page updates? Choose 3 answers

  • 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.

正解:A、D


質問 # 55
A developer created a Lightning web component that uses a Lightning-record-edit-form to collect information about Leads. Users complain that they only see one error message at a time when they save a Lead record.
Which best practice should the developer use to perform the validations, and allow more than one error message to be displayed simultaneously?

  • A. Process Builder
  • B. Apex REST
  • C. Client-side validation
  • D. Custom validation rules

正解:C


質問 # 56
As part of a new integration, a developer is asked to implement a new custom search functionality that is capable of performing unrestricted queries and can account for all values within a custom picklist field, type__z, on the Opportunity object. The search feature must also account for NULL values.
The organization-wide default for the Opportunity object is set to Public Read-Only, and a new custom index has.
been created for the Type__c field. There are more than 5 million Opportunity records within the environment.
and a considerable amount of the existing records have NULL values for the picklist Which technique should the developer implement to maximize performance when querying NULL values?

  • A. Create a formula field that substitutes NULL values for a string of text, create an index for the formula field, then use the formula within the WHERE clause.
  • B. Use a SOSL query to return ALL opportunities that have a value of NULL in any field.
  • C. Use the OS operator to combine WHERE clauses to strictly search for each value within the picklist, including Type__c ' NULL.
  • D. Perform two SOQL queries; one to query Opportunities where Type__c - NULL, and another to query where Type_: - HBLL, then join the result set using Apex.

正解:D


質問 # 57
A developer is trying to access org data from within a test class. Which sObject type requires the test class to have the (seeAllData=true) annotation?

  • A. Report
  • B. User
  • C. RecordType
  • D. Profile

正解:A

解説:
Explanation
Test (SeeAllData=true) annotation is used to grant test classes and individual test methods access to all data in the organization, including pre-existing data that the test didn't create. This annotation is required for Apex code saved using Salesforce API version 24.0 and later.
Profile is one of the sObject types that require the isTest (SeeAllData=true) annotation to access org data from within a test class. Other sObject types that require this annotation are User, UserRole, Group, GroupMember, QueueSobject, and CronTrigger.
Therefore, using Profile as the sObject type requires the test class to have the isTest (SeeAllData=true) annotation.


質問 # 58
Which of the following about Dynamic Apex is incorrect?

  • A. getDescribe() can get you a variety of info on a particular object/field
  • B. Schema.getGlobalDescribeQ gives you a map of all sObject
  • C. In dynamic SOQL, you can use bind variables and bind variable fields
  • D. You can retrieve the sObject type from an Id by calling .getSObjectTypeQ

正解:C

解説:
Reference:
While you can use simple bind variables in dynamic SOQL, you cann|ot use bind variable fields
(e.g. :myVariable.field1_c)
Use escapeSingleQuotes to prevent SOQL injection


質問 # 59
What is the output of the following code snippet? l Contact con = new Contact( LastName = 'Smith', Department = 'Admin'); 2 insert con; 3 4 Savepoint sp_finance = Database.setSavepoint(); 5 con.Department
'finance'; 6 update con; 7 8 Savepoint sp_hr = Database.setSavepoint(); 9 con.Department = 'HR'; 10 update con; 11 12 Database.rollback(sp_finance); l3 Database.rollback(sp_hr);

  • A. The contact record will be saved ME department value HR.
  • B. A runtime error will be thrown on line 13.
  • C. A runtime error will be thrown on line 12.
  • D. The contact record will be saved with department value Finance.

正解:B


質問 # 60
What are three benefits of using declarative customizations over code? Choose 3 answers

  • A. Declarative customizations generally require less maintenance.
  • B. Declarative customizations cannot generate run time errors.
  • C. Declarative customizations are not subject to governor limits.
  • D. Declarative customizations do not require user testing.
  • E. Declarative customizations will automatically update with each Salesforce release.

正解:A、C、E


質問 # 61
The Contact object has a custom field called "Zone." Its data type is "Text" and field length is 3.
What is the outcome after executing the following code snippet in the org?
List<Contact> contactsToBeInserted=new List<Contact>(); Contact
contactInstance= new Contact(LastName='Smith', Department='Tech',
Zone_c='IAD'); contactsToBeInserted.add(contactInstance); contactInstance= new Contact(LastName='Sm1th', Department='Tech', Zone_c='PITT'); contactsToBeInserted.add(contactInstance); Database.insert (contactsToBeInserted,true);

  • A. Both inserts succeed and the contact record that has the Zone value of 'PI'I'I' is set to NULL
  • B. A partial insert succeeds and the contact record that has the Zone value 'IAD' is inserted
  • C. Both inserts succeed and the contact record that has the Zone value of 'PITT' is truncated
  • D. An unhandled DML exception is thrown and no contact records are inserted

正解:D


質問 # 62
What is the correct syntax for calling a controller action from a Visualforce page and updating part of the page once the action is completed? (Choose two.)
<apex:commandFunction action="{!Save}" value="Save" rendered="thePageBlock"/>

  • A. <apex:commandButton action="{!Save}" value="Save" redraw="thePageBlock"/>
  • B. rerender="thePageBlock"/>
  • C. <apex:actionFunction action="{!Save}" name="Save" rerender="thePageBlock"/>
  • D. <apex:actionSupport action="{!Save} " event="onchange"

正解:A、B


質問 # 63
Employee_c is a Child object of Company_c. The Company_c object has an external Id field Company_Id_c.
How can a developer insert an Employee_c record linked to Company_c with a Company_Id_c of '999'?
Employee_c emp = new Employee_c(Name='Developer'); emp.Company_r = '999'

  • A. Company_c(Company_Id_c='999') insert emp;
    Employee_c emp = new Employee_c(Name='Developer'); emp.Company_r = new
  • B. insert emp;
    Employee_c emp = new Employee_c(Name='Developer'); emp.Company_c = '999'
  • C. Company_r(Company_Id_c='999') insert emp;
  • D. insert emp;
    Employee_c emp = new Employee_c(Name='Developer'); emp. Company_c = new

正解:C


質問 # 64
What is the transaction limit for the number of DML statements allowed?

  • A. 0
  • B. 2,000
  • C. 1
  • D. 100 (synchronous), 200 (async)
  • E. 200 (synchronous), 100 (async)

正解:C

解説:
/Reference:
Includes Approval functions, rollbacks/savepoints, and System.runAs


質問 # 65
What can be done to improve the performance of the insert trigger shown above?

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

正解:D


質問 # 66
Employee-c is a Child object of Company-c. The Company-c object has an external Id field Company_Id_c.
How can a developer insert an Employee-c record linked to Company-c with a Company_Id__c of '999'?

  • A. Employee-c emp = new Employee-C(Name='Developer'); emp.Company_r = ' 999' insert emp;
  • B. Employee-c emp = new Employee-C(Name='Developer'); emp.Company_r = new Company-r(Company_Id_c=' 999'); insert emp;
  • C. Employee-c emp = new Employee-C(Name='Developer'); emp. Company-c = new Company-c(Company_Id_c=' 999 insert emp;
  • D. Employee-c emp = new Employee-C(Name='Developer'); emp.Company_c = ' 999' insert emp;

正解:B


質問 # 67
As part of a custom development, a developer creates a Lightning component to show how a particular opportunity progresses over time. The component must display the date stamp when any of the following fields change:
* Amount, Probability, Stage, or Close Date
How should the developer access the data that must be displayed?

  • A. Execute a SOQL query for Amount, Probability, Stage, and Close Date on the OpportunityHistory object.
  • B. Create custom a custom date field on Opportunity for each field to track the previous date and execute a SOQL query for date fields.
  • C. Subscribe to the Opportunity Change Data Capture event in the Lightning component.
  • D. Subscribe to the OpportunityHistory Change Data Capture event in the Lightning component.

正解:B


質問 # 68
......

確認済みPDII試験問題集と解答で時間限定無料提供!PDIIには正解付き:https://jp.fast2test.com/PDII-premium-file.html

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


弊社を連絡する

我々は12時間以内ですべてのお問い合わせを答えます。

我々の働いている時間: ( GMT 0:00-15:00 )
月曜日から土曜日まで

サポート: 現在連絡 

English Deutsch 繁体中文 한국어