1 / 14

Real Questions for Salesforce PDII Exam Killtest V11.02

Salesforce PDII exam real questions are the best material for you to study the test.

Télécharger la présentation

Real Questions for Salesforce PDII Exam Killtest V11.02

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. The safer , easier way to help you pass any IT exams. 1.Users report that a button on a custom Lightning Web Component is not working. However, there are no other details provided. What should the developer use to ensure error messages are properly displayed? A. Add the <apex:messages/> tag to the component. B. Use the Database method with allOrNone set to false. C. Add a Try/Catch block surrounding the DML statement. D. Add JavaScript and HTML to display an error message. Answer: C 2.Which use case is an appropriate fit for the ©future asynchronous Apex method? (Choose two.) A. A developer has jobs that need larger query results than regular transactions allow B. A developer needs to segregate DML operations and bypass the mixed save DML error C. A developer has long-running jobs with large data volumes that need to be performed in batches D. A developer has long-running methods and needs to prevent delaying an Apex transaction Answer: B,D 3.A Lightning Component functions in preview mode and needs to be used inside a Lightning App Builder page, but it is not available. What change should be applied to the component? A. Refresh the sandbox and upgrade it to the latest API version. B. Delete the component, metadata, and Apex controller and recreate them. C. Expose it in the markup using the implements and access attributes. D. Look for errors in the logic in the JavaScript controller. Answer: C 4.A Visualforce 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. Change the setters signature to return a Contact. C. Use a condition in the getter to return a new Contact if it is null. D. Change the getter's signature to be static Contact. Answer: C 5.A managed package uses a list of country ISO codes and country names as references data in many different places.. managed package Apex code. What is the optimal way to store and retrieve the list? A. Store the information in Custom Metadata and query it with SOQL. B. Store the information in Custom Metadata and access it with the getAll() method. C. Store the information in a List Custom Setting and query it with SOQL. D. Store the information in a list Custom Setting and access it with the getAll() method Answer: A 6.A developer has created a solution using the SOAP API for authenticating Communities users. What is needed when issuing the login() Call? (Choose two.) PDII Platform Developer II Salesforce Questions Killtest 2 / 14

  2. The safer , easier way to help you pass any IT exams. A. Organization Id B. Session Id C. Username and Password D. Security Token Answer: A,C 7.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 in the test class, instantiate the page reference in the test class, then use System.currentPageReference().getParameters{}.put() to set the Account ID. B. Instantiate the page reference in the test class, insert the Account in the test class, then use seeAHData-true to view the Account. C. Insert the Account into Salesforce, instantiate the page reference in the test class, then use System.setParentRecordId().get() to set the Account ID. 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. Answer: D 8.Consider the controller code above that is called from a Lightning component and returns data wrapped in a class. PDII Platform Developer II Salesforce Questions Killtest 3 / 14

  3. The safer , easier way to help you pass any IT exams. PDII Platform Developer II Salesforce Questions Killtest Consider the controller code above that is called from a Lightning component and returns data wrapped in a class. The developer verified that the Queries return a single record each and there is error handing in the Lightning component, but the component is not getting anything back when calling the controller getSomeData(). What is wrong? A. The member's Name and Option of the class MyDataWrapper should be annotated with @AuraEnabled too. B. The member's Name and Option should not be declared public. C. The member's Name and Option should not have getter and setter. D. Instances of Apex classes such as MyDataWrapper cannot be returned to a Lightning component. Answer: A 9.A developer writes the following Apex trigger so that when a Case is closed, a single Survey record is created for that Case. The issue is that multiple Survey_c records are being created per Case. 4 / 14

  4. The safer , easier way to help you pass any IT exams. What could be the cause of this issue? A. A user is creating the record as Closed B. A workflow rule is firing with a Create Task action C. A workflow rule is firing with a Field Update action D. A user is editing the record multiple times Answer: D 10.Within the System.Limit class, what would you call to get the number of calls made in your transaction? A. get [typeOfLimit] —> (Ex. getDXLStaterr.ents () ) B. getLimit [typeOf Limit] —> (Ex. getLirr.it DXLSt at err.ents () ) Answer: A 11.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 Transient. C. Ensure properties are marked as private. D. Ensure profiles have access to the Visualforce page. Answer: B 12.The REST API___________. A. Is based on REST principles and is optimized for loading or deleting large sets of data. You can use it to query, queryAII, insert, update, upsert, or delete many records asynchronously by submitting batches 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 used to create, retrieve, update or delete records, such as accounts, leads, and custom objects, and allows you to maintain passwords, perform searches, and much more 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 Answer: B 13.A developer has generated Apex code from a WSDL for an external web service. The web service requires Basic authentication. What code should the developer use to authenticate? A. Http.setHeader ('Authorization' , 'Basic QthZGprjpchVulHNchFtZQ!) B. stub.inputHttpHeaders_x.put('Authorization' , 'Basic QthZGprJpchVulHNchFtZQ') C. Http.setAuthentication('Basic QthZGprjpchVulHNchFtZQ') PDII Platform Developer II Salesforce Questions Killtest 5 / 14

  5. The safer , easier way to help you pass any IT exams. D. stub.authentication.put ('Authorization','Basic QthZGprjpchVulHNchFtZQ') Answer: B 14.The progress of an apex job queued is using the System.enqueueJob method and needs to be monitored. Which options are valid? (Choose two.) A. Use the Apex Jobs page in setup B. Query the Queueable Apex record C. Query the AsyncApexJob record D. Use the Scheduled Jobs page in setup Answer: A,C 15.A custom field Exec_Count_c of type Number is created on an Account object. An account record with value of "1" for a: Exec__Count_c is saved. A workflow field update is defined on the Exec_Count_c field, to increment its value every time an account record is created or updated. The following trigger is defined on the account: trigger ExecOrderTrigger on Account (before insert, before update, after insert, after update){ for (Account accountlnstance: Trigger.New){ if (Trigger . isBefore){ accountlnstance Exec_Count_c += 1; } System, debug (accountlnstance.Exec_Count_c); } } A. 1,2,3,3 B. 1,2,3,4 C. 2, 2, 4, 4 D. 2,2,3,3 Answer: C 16.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. Add @testVisible to the method in the class the developer is testing. B. Use system.assert() in testSetup to verify the values are being returned. C. Call the Apex class method from a testMethod instead of the testSetup method. D. Verify the user has permissions passing a user into System.runAs(). Answer: D 17.An environment has two Apex Triggers: an after-update trigger on Account and an after-update trigger on Contact. The Account after-update trigger fires whenever an Account's address is updated, and it updates every associated Contact with that address. The Contact after-update trigger fires on every edit, and it updates every Campaign Member record related to the Contact with the Contact's state. Consider the following: A mass update of 200 Account records' addresses, where each Account has 50 Contacts. Each Contact has 1 Campaign Member. This means there are 10,000 Contact records across the Accounts and 10,000 Campaign Member records across the contacts. What will happen when the mass update occurs? A. The mass update will fail, since the two triggers fire in the same context, thus exceeding the number of records processed by DML statements. PDII Platform Developer II Salesforce Questions Killtest 6 / 14

  6. The safer , easier way to help you pass any IT exams. B. There will be no error, since each trigger fires within its own context and each trigger does not exceed the limit of the number of records processed by DML| statements. C. There will be no error, since the limit on the number of records processed by DML statements is 50,000. D. The mass update of Account address will succeed, but the Contact address updates will fail due to exceeding number of records processed by DML statements. Answer: B 18.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. Schedule an ©future process to Query records older than 7 years, and then recursively invoke itself in 1,000 record batches to delete them. B. Perform a SOSL statement to find records older than 7 years, and then delete the entire result set. C. Use aggregate functions to query for records older than 7 years, and then delete the AggregateResult objects. D. Schedule a batch Apex process to run every day that Queries and deletes records older than 7 years. Answer: D 19.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 What is the most efficient way to Query such information? A. [Select Amount, CloseDate, StageName, Probability FROM OpportunityHistory WHERE Opportunityld = :oppId]; B. [Select Newvalue, Oldvalue From OpportunityField_History Where Oppportunity = oppid AND Field IN C. [Select NewValue, Oldvalue FROM Opportunity FieldHistory WHERE Opportunityld = :oppId AND Field IN D. ('StageName', Probability',Amount /CloseDate')]; E. [Select Amount CloseDate. StageName, Probability FROM Opportunity_History WHERE Opportunityld - :oppId]; Answer: C 20.A company has a custom object. Order__c, that has a custom picklist field. Status__c, with values of New, In Progress," or Fulfilled and a lookup field, Contact_c, to Contact. Which SOQL query wrii return a unique list of all the Contact records that have no Fulfilled Orders? A. SELECT Contact_c From order_c Where id NOT IN (SELECT id FROM_c Where States_c + Fulfilled') B. SELECT iD FROM Contact WHERE id NOT IN (SELECT id From order_c WHERE_c = Fulfilled') C. SELECT Contact_c FROM Order_c Where Status_c <> ;Fulfilled' D. SELECT id FROM Contact WHERE id NOT IN (SELECT Contact _c FROM order_c Where Status_c = fulfilled') Answer: D PDII Platform Developer II Salesforce Questions Killtest 7 / 14

  7. The safer , easier way to help you pass any IT exams. 21.What is the transaction limit for the number of SOSL queries? A. 20 B. 2,000 C. 100 (synchronous), 200 (async) D. 200 (synchronous), 100 (async) E. There is no limit Answer: A 22.An integration user makes a successful login() call via the SOAP API. What can be used in the SOAP header to provide server authorization for subsequent API requests? A. Named Credentials B. Session ID C. OAuth access token D. Security token Answer: B 23.An org has a custom object, Registeration_c that has a lookup relationship to the Opportunity object. What should a developer use to create a stand-alone Vlsualforce page that displays the Registration__c records related to an Opportunity. A. A standard controller with a controller extension B. A controler extension C. A custom controler D. A standard controller Answer: D 24.Consider the above trigger intended to assign the Account to the manager of the Account''s region. PDII Platform Developer II Salesforce Questions Killtest Which two changes should a developer make in this trigger to adhere to best practices? Choose 2 answers A. Use a Map accountMap instead of List accountList. B. Use a Map to cache the results of the Region__c query by Id. 8 / 14

  8. The safer , easier way to help you pass any IT exams. C. Move the Region__c query to outside the loop. D. Remove the last line updating accountList as it is not needed. Answer: C,D 25.Which use case can only be performed by using asynchronous Apex? A. Scheduling a batch process to complete in the future B. Processing high volumes of records C. Updating a record after the completion of an insert D. Calling a web service from an Apex trigger Answer: D 26.In an organization that has multi-currency enabled, a developer is tasked with building a Lighting Component that displays the top ten Opportunities most recently access by the logged in user. The developer must ensure the Amount and LastModifiedDate field values are displayed according to the user's locale. What is the most effective approach to ensure values displayed respect the users locale settings? A. Use the FOR VIEW clause in the SOQL Query. B. Use REGEX expressions to format the values retrieved via SOQL. C. Use the FORMAT() function in the SOQL query. D. Use a wrapper class to format the values retrieved via SOQL. Answer: C 27.A developer has requirement to query three fields (id, name, Type) from an Account and first and last names for all Contacts associated with the Account. Which option is the preferred optimized method to achieve this for the Account named ‘Ozene Electronics’? A. Account a = (SELECT ID, Name, Type from Account where name= Ozone Electronics;) list 1contacts = (SELECT firstname, lastname from Contacts where accountid=: a -ID0; B. Account a = (SELECT ID, Name, Type, (select contat,firstName, Contact,LastName from Account, Contacts) from Account where name; Ozone Electronic' Limit 1 ); C. List 1Accounts = (Select ID, Name, Type from Account Join (Select ID, firstname, lastname form Contact where contact account , name 'ozone electronics)); D. List 1Contacts = new list ( ); for(Contact c ; 1Select firstname, lastname Account, Name Account,ID Account, Type from Contact where Account: Name=' electronics')) ( iContacts.add(c);) Answer: B 28.Given the following code: PDII Platform Developer II Salesforce Questions Killtest 9 / 14

  9. The safer , easier way to help you pass any IT exams. Assuming there were 10 Contacts and five Accounts created today, what is the expected result? A. System. QueryException: List has more than one row after Assignment on Account. B. System. LimitException: To many SOQL Queries on Account. C. System. QueryException: To many DML Statement errors on Contact D. System. LimitException: Too many SOQL Queries on Contract Answer: A PDII Platform Developer II Salesforce Questions Killtest 29.REST uses___________. A. The HTTP class B. The HTTPRequest class C. The HTTPResponse class D. All of the above Answer: D 30.If you wanted to create a record following the update of another (with data from the source object), what is the most customizable approach? A. Workflow Rule B. Process Builder C. After update Trigger D. Flow Answer: B 31.An org has a requirement that an Account must always have one and only one Contact listed as Primary. So selecting one Contact will de-select any others. The client wants a checkbox on the Contact called 'Is Primary' to control this feature. The client also wants to ensure that the last name of every Contact is stored entirely in uppercase characters. What is the optimal way to implement these requirements? A. write a single trigger on Contact for both after update and before update and callout to helper classes to handle each set of logic. B. Write an after update trigger on Contact for the Is Primary logic and a separate before update trigger on Contact for the last name logic. C. write an after update trigger on Account for the Is Primary logic and a before update trigger on Contact for the last name logic. D. write a Validation Rule on the Contact for the Is Primary logic and a before update trigger on Contact for the last name logic. Answer: A 32.After a Platform Event is defined in a Salesforce org, events can be published via which two mechanisms? Choose 2 answers A. internal Apps can use Outbound Messages B. Internal Apps can use Process Builder. C. External Apps require a custom Apex web service. D. External Apps can use the standard Streaming API. Answer: B,C 10 / 14

  10. The safer , easier way to help you pass any IT exams. 33.Which scenario requires a developer to use an Apex callout instead of Outbound Messaging? A. The callout needs to be asynchronous. B. The callout needs to be invoked from a Workflow Rule. C. The Target system uses a REST API. D. The Target system uses a SOAP API. Answer: C 34.A developer is writing code that requires making callouts to an external web service. Which scenario necessitates that the callout be made in an @future method? A. The callouts will be made in an Apex Test class. B. The callouts will be made in an Apex Trigger. C. The callout could take longer than 60 seconds to complete. D. over 10 callouts will be made in a single transaction. Answer: B 35.Which statement should be used to allow some of the records in a list of records to be inserted if others fail to be inserted? A. Database.insert(records, false) B. Database.insert(records, true) C. insert records D. insert (records, false) Answer: A 36.What is the transaction limit for the number of records for SOQL queries? A. 5,000 B. 20,000 C. 50,000 D. 10,000 E. There is no limit Answer: C 37.What is a consideration when using bind variables with dynamic SOQL? (Choose two.) A. Dynamic SOQL cannot reference fields on bind variables B. Dynamic SOQL cannot use bind variables C. Bind variables must be public or global D. Bind variables must be in local scope Answer: A,D 38.What is the transaction limit on the number of Apex jobs added to the queue? A. 100 B. 150 C. 50 D. 200 PDII Platform Developer II Salesforce Questions Killtest 11 / 14

  11. The safer , easier way to help you pass any IT exams. E. There is no limit Answer: C 39.An Apex trigger and Apex class increment a counter, Edit_Count_c, any time that the Case is changed. PDII Platform Developer II Salesforce Questions Killtest A new process on the case object was just created in production for when a Case is created or updated< since the process was created, they are reports that the Count is being incremented by more than one on Case edit. Which change in the Apex code will fix the problem? A) B) C) D) 12 / 14

  12. The safer , easier way to help you pass any IT exams. PDII Platform Developer II Salesforce Questions Killtest A. Option A B. Option B C. Option C D. Option D Answer: A 40.Consider the Apex class above that defines a RemoteAction used on a Visualforce search page. Global with sharing class MyRemoter { public String accountName { get; set; } public static Account account { get; set; } public AccountRemoter(} {} @RemoteAction global static Account getAccount (String acccuntName) { account = [SELECT Id, Name, NumberOfEmployees FROM Account WHERE Name = :accountName]; return account; } } Which code snippet will assert that the remote action returned the correct Account? A. MyRemoter remote = new MyRemoter(); Account a = remote.getAccount ({'TestAccount'); System.assertEquals, ‘TestAcccunt', a.Name -; B. Account a = MyRemoter.getAccount ('TestAccount'): System.assertEquals{ ‘TestAccount', a.Name }; C. MyRemoter remote = new MyRemoter('TestAccount'}; Account a = remote.getAccount {); System.assertEquals(, ‘'TestAccount', a.Name -; D. Account a = controller.getAccount('TestAccount’); System.assertEquals(, ‘TestAccount', a.Name } ; Answer: B 13 / 14

More Related