image


PDII Dumps PDII Braindumps

PDII Real Questions PDII Practice Test PDII Actual Questions


Salesforce


PDII


Salesforce Certified Platform Developer II (PDII)


https://killexams.com/pass4sure/exam-detail/PDII


Question: 90


Business rules require a Contact to always be created when a new Account is created .


What can be used when developing a custom screen to ensure an Account is not created if the creation of the Contact fails?

  1. use the Database.Delete method if the Contact insertion fails.

  2. Disable validation rules on Contacts and set default values with a Trigger.

  3. use the Database.Insert method with allOrNone set to False.

  4. use setSavePoint() and rollback() with a try/catch block.


Answer: D


Question: 91

A Developer wishes to improve runtime performance of Apex calls by caching results on the client . What is the best way to implement this?

  1. Decorate the server-side method with @AuraEnabled(cacheable=true).

  2. Set a cookie in the browser for use upon return to the page.

  3. Decorate the server-side method with @AuraEnabled(storable=true).

  4. Call the setStorable() method on the action in the JavaScript client-side code.


Answer: A


Question: 92

A developer is writing a Visualforce page to display a list of all of the checkbox fields found on a custom object. What is the recommended mechanism the developer should use to accomplish this?

  1. Schema Class

  2. Apex API

  3. Schema Builder

  4. Metadata API

An Apex trigger and Apex class increment a counter, Edit_Count_c, any time that the Case is changed.


image


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.


image

Which change in the Apex code will fix the problem? A)


B)


image


C)


image

image


  1. Option A

  2. Option B

  3. Option C

  4. Option D


Answer: A


Question: 94


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?

  1. External Object

  2. Lookup field

  3. Formula field

  4. External Id field


Answer: D


Question: 95

A developer encounters an error that states that the Apex heap size is exceeded . Which technique may reduce heap size?

  1. Add the transient keyword to the variable definition

  2. Move the variable definition inside the scope of the function

  3. Use static variables instead of instance variables

  4. Use SOQL for loops instead of standard SOQL queries

A customer has a single Visualforce page that allows each user to input up to 1500 sales forecasts and instantly view pivoted forecast calculations. Users are complaining that the page is loading slowly, and they are seeing error messages regarding heap and view state limits.


What are three recommendations to optimize page performance? (Choose three.)

  1. Segregate calculation functionality from input functionality

  2. Specify the list of sales forecasts as transient

  3. Implement pagination and reduce records per page

  4. Create formula fields to compute pivoted forecast calculations

  5. Use JavaScript Remoting instead of controller actions


Answer: A,C,E


Question: 97


A developer wants to retrieve and deploy metadata, perform simple CSV export of query results, and debug Apex REST calls by viewing JSON responses.


Which tool should the developer use?

  1. Developer Console

  2. Force.com Migration Tool

  3. Workbench

  4. Force.com IDE


Answer: C


Question: 98


A developer has been asked to create code that will meet the following requirements: Receives input of: Map<ld, Project_c), List<Account>

Performs a potentially long-running callout to an outside web service Provides a way to confirm that the process executed successfully

Which asynchronous feature should be used?

  1. ©future (callout=true)

  2. Database.AllowCallouts interface

  3. Schedulable interface

  4. Queueable interface


Answer: D


Question: 99

A company wants to implement a new call center process for handling customer service calls. It requires service reps to ask for the caller’s account number before proceeding with the rest of their call script.


Following best practices, what should a developer use to meet this requirement?

  1. Approvals

  2. Flow Builder

  3. Apex Trigger

  4. Process Builder


Answer: B


Question: 100


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

  1. A sandbox should be created to use as a unified testing environment instead of deploying Change Sets directly to production.

  2. Page Layouts should never be deployed via Change Sets, as this causes Workflows and Field-level Security to be reset and fields to disappear.

  3. The administrators are deploying their own Change Sets, thus deleting each other’s fields from the objects in production.

  4. The administrators are deploying their own Change Sets over each other, thus replacing entire Page Layouts and Workflows in Production


Answer: A,D


Question: 101

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?

  1. The callouts will be made in an Apex Test class.

  2. The callouts will be made in an Apex Trigger.

  3. The callout could take longer than 60 seconds to complete.

  4. over 10 callouts will be made in a single transaction.


Answer: B


Question: 102


Which interface needs to be implemented by a Lightning Component so that it may be displayed in modal dialog by clicking a button on a Lightning Record page?

  1. Force: lightningQuickAction

  2. Lightning:editAction

  3. Fightning:quickAction

  4. Force:lightningEditAction


Answer: A


Question: 103


Universal Containers has a Visualforce page that displays a table every Container_ c being rented by a gives Account. failing because some of the customers rent over 100,000 containers.


What should a developer change about the Visualforce page to help with the page load errors?

  1. Implement pagination with an OffsetController.

  2. Implement pagination with a StandardSetController.

  3. Use lazy loading and a transient List variable.

  4. Use JavaScript remoting with SOQL Offset.


Answer: B


Question: 104


A developer has a page with two extensions overriding the Standard controller for Case.


image


What will happen when a user clicks the command button?

  1. All of the three Save methods will be executed

  2. Save from Case Standard Controller will be executed

  3. Save from CaseExtensionTwo will be executed

  4. Save from CaseExtensionOne will be executed


Answer: D


Question: 105


The Metadata API .

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

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

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

  4. 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: D


Question: 106


Part of a custom Lightning Component displays the total number of Opportunities in the org, which is in the millions. The Lightning Component uses an Apex Controller to get the data it needs .


What is the optimal way for a developer to get the total number of Opportunities for the Lightning Component?

  1. SUM() SOQL aggregate query on the Opportunity object

  2. SOQL for loop that counts the number of Opportunities records

  3. COUNT() SOQL aggregate query on the Opportunity object

  4. Apex Batch job that counts the number of Opportunity records


Answer: C


image

6$03/( 48(67,216


7KHVH TXHVWLRQV DUH IRU GHPR SXUSRVH RQO\ )XOO YHUVLRQ LV XS WR GDWH DQG FRQWDLQV DFWXDO TXHVWLRQV DQG DQVZHUV


.LOOH[DPV FRP LV DQ RQOLQH SODWIRUP WKDW RIIHUV D ZLGH UDQJH RI VHUYLFHV UHODWHG WR FHUWLILFDWLRQ H[DP SUHSDUDWLRQ 7KH SODWIRUP SURYLGHV DFWXDO TXHVWLRQV H[DP GXPSV DQG SUDFWLFH WHVWV WR KHOS LQGLYLGXDOV SUHSDUH IRU YDULRXV FHUWLILFDWLRQ H[DPV ZLWK FRQILGHQFH +HUH DUH VRPH NH\ IHDWXUHV DQG VHUYLFHV RIIHUHG E\ .LOOH[DPV FRP


$FWXDO ([DP 4XHVWLRQV .LOOH[DPV FRP SURYLGHV DFWXDO H[DP TXHVWLRQV WKDW DUH H[SHULHQFHG LQ WHVW FHQWHUV 7KHVH TXHVWLRQV DUH XSGDWHG UHJXODUO\ WR HQVXUH WKH\ DUH XS WR GDWH DQG UHOHYDQW WR WKH ODWHVW H[DP V\OODEXV %\ VWXG\LQJ WKHVH DFWXDO TXHVWLRQV FDQGLGDWHV FDQ IDPLOLDUL]H WKHPVHOYHV ZLWK WKH FRQWHQW DQG IRUPDW RI WKH UHDO H[DP


([DP 'XPSV .LOOH[DPV FRP RIIHUV H[DP GXPSV LQ 3') IRUPDW 7KHVH GXPSV FRQWDLQ D FRPSUHKHQVLYH FROOHFWLRQ RI TXHVWLRQV DQG DQVZHUV WKDW FRYHU WKH H[DP WRSLFV %\ XVLQJ WKHVH GXPSV FDQGLGDWHV FDQ HQKDQFH WKHLU NQRZOHGJH DQG LPSURYH WKHLU FKDQFHV RI VXFFHVV LQ WKH FHUWLILFDWLRQ H[DP


3UDFWLFH 7HVWV .LOOH[DPV FRP SURYLGHV SUDFWLFH WHVWV WKURXJK WKHLU GHVNWRS 9&( H[DP VLPXODWRU DQG RQOLQH WHVW HQJLQH 7KHVH SUDFWLFH WHVWV VLPXODWH WKH UHDO H[DP HQYLURQPHQW DQG KHOS FDQGLGDWHV DVVHVV WKHLU UHDGLQHVV IRU WKH DFWXDO H[DP 7KH SUDFWLFH WHVWV FRYHU D ZLGH UDQJH RI TXHVWLRQV DQG HQDEOH FDQGLGDWHV WR LGHQWLI\ WKHLU VWUHQJWKV DQG ZHDNQHVVHV


*XDUDQWHHG 6XFFHVV .LOOH[DPV FRP RIIHUV D VXFFHVV JXDUDQWHH ZLWK WKHLU H[DP GXPSV 7KH\ FODLP WKDW E\ XVLQJ WKHLU PDWHULDOV FDQGLGDWHV ZLOO SDVV WKHLU H[DPV RQ WKH ILUVW DWWHPSW RU WKH\ ZLOO UHIXQG WKH SXUFKDVH SULFH 7KLV JXDUDQWHH SURYLGHV DVVXUDQFH DQG FRQILGHQFH WR LQGLYLGXDOV SUHSDULQJ IRU FHUWLILFDWLRQ H[DPV


8SGDWHG &RQWHQW .LOOH[DPV FRP UHJXODUO\ XSGDWHV LWV TXHVWLRQ EDQN DQG H[DP GXPSV WR HQVXUH WKDW WKH\ DUH FXUUHQW DQG UHIOHFW WKH ODWHVW FKDQJHV LQ WKH H[DP V\OODEXV 7KLV KHOSV FDQGLGDWHV VWD\ XS WR GDWH ZLWK WKH H[DP FRQWHQW DQG LQFUHDVHV WKHLU FKDQFHV RI VXFFHVV


7HFKQLFDO 6XSSRUW .LOOH[DPV FRP SURYLGHV IUHH [ WHFKQLFDO VXSSRUW WR DVVLVW FDQGLGDWHV ZLWK DQ\ TXHULHV RU LVVXHV WKH\ PD\ HQFRXQWHU ZKLOH XVLQJ WKHLU VHUYLFHV 7KHLU FHUWLILHG H[SHUWV DUH DYDLODEOH WR SURYLGH JXLGDQFH DQG KHOS FDQGLGDWHV WKURXJKRXW WKHLU H[DP SUHSDUDWLRQ MRXUQH\


'PS .PSF FYBNT WJTJU IUUQT LJMMFYBNT DPN WFOEPST FYBN MJTU

.LOO \RXU H[DP DW )LUVW $WWHPSW *XDUDQWHHG