Salesforce PDII Dumps - Salesforce Certified Platform Developer II (SP24) PDF Sample Questions

discount banner
Exam Code:
PDII
Exam Name:
Salesforce Certified Platform Developer II (SP24)
196 Questions
Last Update Date : 04 July, 2024
PDF + Test Engine
$58 $75.4
Test Engine Only Demo
$48 $62.4
PDF Only Demo
$38 $49.4

Salesforce PDII This Week Result

0

They can't be wrong

0

Score in Real Exam at Testing Centre

0

Questions came word by word from this dumps

Best Salesforce PDII Dumps - pass your exam In First Attempt

Our PDII dumps are better than all other cheap PDII study material.

Only best way to pass your Salesforce PDII is that if you will get reliable exam study materials. We ensure you that realexamdumps is one of the most authentic website for Salesforce Developers exam question answers. Pass your PDII Salesforce Certified Platform Developer II (SP24) with full confidence. You can get free Salesforce Certified Platform Developer II (SP24) demo from realexamdumps. We ensure 100% your success in PDII Exam with the help of Salesforce Dumps. you will feel proud to become a part of realexamdumps family.

Our success rate from past 5 year very impressive. Our customers are able to build their carrier in IT field.

Owl
Search

45000+ Exams

Buy

Desire Exam

Download

Exam

and pass your exam...

Related Exam

Realexamdumps Providing most updated Developers Question Answers. Here are a few exams:


Sample Questions

Realexamdumps Providing most updated Developers Question Answers. Here are a few sample questions:

Salesforce PDII Sample Question 1

An org contains two custom objects; Building__c and Office__c. Office__c has a Lookup field to Building__c.

A developer is asked to automatically populate the Number_of_Offices__c field on the Building__c object with the count of related Office__c

records anytime an Office__c record s created or deleted. The developer cannot modify the field types.

Which solution meets the requirements?


Options:

A. Flow
B. Workflow
C. Apex Trigger
D. Process Builder

Answer: D

Salesforce PDII Sample Question 2

A company has a custom object Sales_Help_Request__c that has a Lookup relationship to Opportunity. The Sales_Help_Request__c has a number field, Number_of_Hours__c, that represents the amount of time spent on the Sales_Help_Request__c.

A developer is tasked with creating a field, Total_Hours__c, on Opportunity that should be the sum of all of the Number_of_Hours__c values for the Sales_Help_Request__c records related to that Opportunity.

What should the developer use to implement this?


Options:

A. A workflow rule on the Sales_Help_Request__c object
B. A roll-up summary field on the Opportunity object
C. A trigger on the Opportunity object
D. A trigger on Sales_Help_Request__c

Answer: E

Salesforce PDII Sample Question 3

A company decides that every time an Opportunity is created, they want to create a follow up Task and assign it to the Opportunity Owner.

What should a developer use to implement the requirements?


Options:

A. A Process Builder on Opportunity
B. A trigger on Task
C. A trigger on Opportunity
D. A Process Builder on Task

Answer: B

Salesforce PDII Sample Question 4

A developer wrote an Apex class to make several callouts to an external system.

If the URLs used in these callouts will change often, which feature should the developer use to minimize changes needed to the Apex class?


Options:

A. Session Id
B. Connected Apps
C. Remote Site Settings
D. Named Credentials

Answer: E

Salesforce PDII Sample Question 5

In a VisualForce page with a VisualForce component that has rendered set to false when the page loads, how can a developer ensure it will show on a re-render?


Options:

A. Set the re-render attribute of the component to true.
B. Perform a full page refresh since rendered elements cannot be re-rendered without refreshing.
C. Set the rendered attribute of the component to true and re-render the component.
D. Set the rendered attribute of the component to true and re-render a parent component.

Answer: E

Salesforce PDII Sample Question 6

An org has a requirement that the Shipping Address on the Account must be validated by a third-party web service, before the Account is allowed to be inserted.

What is the optimal way to meet this requirement?


Options:

A. Make a callout to the web service from a custom Visualforce controller.
B. Make a callout to the web service from a standard Visualforce controller.
C. Make a callout to the web service from an after insert trigger.
D. Make a callout to the web service from a before insert trigger.

Answer: C

Salesforce PDII Sample Question 7

When calling a RESTful web service, a developer receives a JSON payload that has a data hierarchy that is nested three levels deep. How can the developer describe the external data?


Options:

A. Deserialize the data untyped and then process it.
B. Declare a class with three levels and deserialize the JSON typed with this class.
C. Use the ANT migration tool, the custom metadata API, or the Dataloader.
D. Use middleware to flatten the JSON and consume it as a new custom object.

Answer: B

Salesforce PDII Sample Question 8

A company has many different unit test methods that create Account records as part of their data setup. A new required field was added to the Account and now all of the unit tests fail. What is the optimal way for a developer to fix the issue?


Options:

A. Add the required field to the data setup for all of the unit tests.
B. Add a before insert trigger on Account to set the value of the required field.
C. Create a TestDataFactory class that serves as the single place to create Accounts for unit tests and set the required field there.
D. Change the required field to be a validation rule that excludes the System Administrator profile.

Answer: D

Salesforce PDII Sample Question 9

A developer needs to store variables to control the style and behavior of a Lightning Web Component. Which feature should be used to ensure that the variables are testable in both Production and all Sandboxes?


Options:

A. Custom Metadata
B. Custom Object
C. Custom Setting
D. Custom Variable

Answer: B

Salesforce PDII Sample Question 10

Just prior to a new deployment, the Salesforce Administrator who configured a new order fulfillment process in a developer sandbox suddenly left the company. The users had fully tested all of the changes in the sandbox and signed off on them.

Unfortunately, although a Change Set was started, it was not complete. A developer is brought in to help finish the deployment.

What should the developer do to identify the configuration changes that need to be moved into production?


Options:

A. Leverage the Setup Audit Trail to review the changes made by the departed Administrator and identify which changes should be added to the Change Set.
B. Use the Metadata API and a supported development IDE to push all of the configuration from the sandbox into production to ensure no changes are lost.
C. Set up Continuous Integration and a Git repository to automatically merge all changes from the sandbox metadata with the production metadata.
D. In Salesforce setup, look at the last modified date for every object to determine which should be added to the Change Set.

Answer: B

Salesforce PDII Sample Question 11

A developer has working business logic code, but sees the following error in the test class:

You have uncommitted work pending. Please commit or rollback before calling out. What is a possible solution?


Options:

A. Rewrite the business logic and test classes with ©TestVisible set on the callout.
B. Set seeAIIData to "true" at the top of the test class, since the code does not fail in practice.
C. Call support for help with the target endpoint, as it is likely an external code error.
D. Use test.IsRunningTest() before making the callout to bypass it in test execution.

Answer: E

Salesforce PDII Sample Question 12

if the "PageReference.setRedirect" Apex function is set to False, what type of request is made?


Options:

A. Get request
B. Postback request
C. If PageReference points to the same controller and subset of extensions, postback request, otherwise get request

Answer: D

Salesforce PDII Sample Question 13

What is the best way to display field-level error messages in Lightning?


Options:

A. ukinputDefaultError
B. ukoutputText
C. auraxomponent
D. apex:message

Answer: B

Salesforce PDII Sample Question 14

A developer must create a way for external partners to submit millions of leads into Salesforce per day-How should the developer meet this requirement?


Options:

A. Publicly expose a Visualforce page via Force.com Sites
B. Create a web service on Heroku that uses Heroku Connect
C. Host a Web-to-Lead form on the company website
D. Publicly expose an Apex Web Service via Force.com Sites

Answer: C

Salesforce PDII Sample Question 15

The progress of an apex job queued is using the System.enqueueJob method and needs to be monitored.

Which options are valid? (Choose two.)


Options:

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, D

Salesforce PDII Sample Question 16

If you have a method "doStuff(List records)", which is a valid call?


Options:

A. doStuff([Select Id From Account]);
B. doStuff(List records);
C. doStuff(Account acct);
D. doStuff(sObject obj);

Answer: B

Salesforce PDII Sample Question 17

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?


Options:

A. use the Database.Delete method if the Contact insertion fails.
B. Disable validation rules on Contacts and set default values with a Trigger.
C. use the Database.Insert method with allOrNone set to False.
D. use setSavePoint() and rollback() with a try/catch block.

Answer: E

Salesforce PDII Sample Question 18

A developer created three Rollup Summary fields: Total_timesheets_c, Total_Approved_timesheet_c and Total_project_Timesheet_c in the custom object, project _c

Now, the developer is tasked with created a new field to show the ratio between and approved


Options:

A. No test methods will be executed during deployment.
B. A test class that validates the formula field is needed for deployment.
C. Using a formula field reduces maintenance overhead.
D. A formula field will calculate the value retroactively for existing records.

Answer: C, E

Salesforce PDII Sample Question 19

A developer is asked to build a solution that will automatically send an email to the Customer when an Opportunity stage changes. The solution must scale to allow for 10,000 emails per day. The criteria to send the email should be evaluated after all Workflow Rules have fired. What is the optimal way to accomplish this?


Options:

A. Use a Workflow Email Alert.
B. Usea MassEmailMessage() with an Apex Trigger.
C. Use a SingleEmailMessage() with an Apex Trigger.
D. Use an Email Alert with Process Builder.

Answer: E

Salesforce PDII Sample Question 20

A developer is working on code that requires a call to an external web service from a batch. How should the developer enable this functionality?


Options:

A. Implement a custom System.CalloutException class
B. Include Database.AllowCallout() in the class definition
C. Implement an @future method for the callout, and invoke it from the batch
D. Specify "callout=true" in the batch implementation

Answer: C

Salesforce PDII Sample Question 21

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?


Options:

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

Answer: B

Salesforce PDII Sample Question 22

ABC Company has an Apex process that makes multiple extensive database operation and web service callouts. The database processes and web services can take a length time to run and must be run sequentially.

How should the developer write this Apex code without running into governor limits and system limitations?


Options:

A. Use Limits class to stop entire process once governor limits are reached.
B. Use multiple @future methods for each process and callout.
C. Use Queueable Apex to chain the jobs to run sequentially.
D. Use Apex Scheduler to scheduled each process.

Answer: B

Salesforce PDII Sample Question 23

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?


Options:

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

Salesforce PDII Sample Question 24

What is a valid request for the following REST method? (Choose two.)

@HttpPost global static void myPostMethod(String si, Integer il, Boolean bl, String 52)


Options:

A. my first string 123 my second string32> false
B. "my first string" 123 !,my second string"32> false
C. si" : "my first string", 11" : "123", "bl" : "false", "S2" : "my second string"
D. il" : 123, "SI" : "my first string", "S2" : "my second string", "bl" : false

Answer: B, E

Salesforce PDII Sample Question 25

Which use case can only be performed by using asynchronous Apex?


Options:

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

Salesforce PDII Sample Question 26

A developer wrote an Apex class to make several callouts to an external system.

If the URLs used in these callouts will change often, which feature should the developer use to minimize changes needed to the Apex class?


Options:

A. Session Id
B. Connected Apps
C. Remote Site Settings
D. Named Credentials

Answer: E

Salesforce PDII Sample Question 27

In a VisualForce page with a VisualForce component that has rendered set to false when the page loads, how can a developer ensure it will show on a re-render?


Options:

A. Set the re-render attribute of the component to true.
B. Perform a full page refresh since rendered elements cannot be re-rendered without refreshing.
C. Set the rendered attribute of the component to true and re-render the component.
D. Set the rendered attribute of the component to true and re-render a parent component.

Answer: E

Salesforce PDII Sample Question 28

An org has a requirement that the Shipping Address on the Account must be validated by a third-party web service, before the Account is allowed to be inserted.

What is the optimal way to meet this requirement?


Options:

A. Make a callout to the web service from a custom Visualforce controller.
B. Make a callout to the web service from a standard Visualforce controller.
C. Make a callout to the web service from an after insert trigger.
D. Make a callout to the web service from a before insert trigger.

Answer: C

Salesforce PDII Sample Question 29

When calling a RESTful web service, a developer receives a JSON payload that has a data hierarchy that is nested three levels deep. How can the developer describe the external data?


Options:

A. Deserialize the data untyped and then process it.
B. Declare a class with three levels and deserialize the JSON typed with this class.
C. Use the ANT migration tool, the custom metadata API, or the Dataloader.
D. Use middleware to flatten the JSON and consume it as a new custom object.

Answer: B

Salesforce PDII Sample Question 30

A company has many different unit test methods that create Account records as part of their data setup. A new required field was added to the Account and now all of the unit tests fail. What is the optimal way for a developer to fix the issue?


Options:

A. Add the required field to the data setup for all of the unit tests.
B. Add a before insert trigger on Account to set the value of the required field.
C. Create a TestDataFactory class that serves as the single place to create Accounts for unit tests and set the required field there.
D. Change the required field to be a validation rule that excludes the System Administrator profile.

Answer: D

Salesforce PDII Sample Question 31

A developer needs to store variables to control the style and behavior of a Lightning Web Component. Which feature should be used to ensure that the variables are testable in both Production and all Sandboxes?


Options:

A. Custom Metadata
B. Custom Object
C. Custom Setting
D. Custom Variable

Answer: B

Salesforce PDII Sample Question 32

Just prior to a new deployment, the Salesforce Administrator who configured a new order fulfillment process in a developer sandbox suddenly left the company. The users had fully tested all of the changes in the sandbox and signed off on them.

Unfortunately, although a Change Set was started, it was not complete. A developer is brought in to help finish the deployment.

What should the developer do to identify the configuration changes that need to be moved into production?


Options:

A. Leverage the Setup Audit Trail to review the changes made by the departed Administrator and identify which changes should be added to the Change Set.
B. Use the Metadata API and a supported development IDE to push all of the configuration from the sandbox into production to ensure no changes are lost.
C. Set up Continuous Integration and a Git repository to automatically merge all changes from the sandbox metadata with the production metadata.
D. In Salesforce setup, look at the last modified date for every object to determine which should be added to the Change Set.

Answer: B

Salesforce PDII Sample Question 33

A developer has working business logic code, but sees the following error in the test class:

You have uncommitted work pending. Please commit or rollback before calling out. What is a possible solution?


Options:

A. Rewrite the business logic and test classes with ©TestVisible set on the callout.
B. Set seeAIIData to "true" at the top of the test class, since the code does not fail in practice.
C. Call support for help with the target endpoint, as it is likely an external code error.
D. Use test.IsRunningTest() before making the callout to bypass it in test execution.

Answer: E

Salesforce PDII Sample Question 34

if the "PageReference.setRedirect" Apex function is set to False, what type of request is made?


Options:

A. Get request
B. Postback request
C. If PageReference points to the same controller and subset of extensions, postback request, otherwise get request

Answer: D

Salesforce PDII Sample Question 35

What is the best way to display field-level error messages in Lightning?


Options:

A. ukinputDefaultError
B. ukoutputText
C. auraxomponent
D. apex:message

Answer: B

Salesforce PDII Sample Question 36

A developer must create a way for external partners to submit millions of leads into Salesforce per day-How should the developer meet this requirement?


Options:

A. Publicly expose a Visualforce page via Force.com Sites
B. Create a web service on Heroku that uses Heroku Connect
C. Host a Web-to-Lead form on the company website
D. Publicly expose an Apex Web Service via Force.com Sites

Answer: C

Salesforce PDII Sample Question 37

The progress of an apex job queued is using the System.enqueueJob method and needs to be monitored.

Which options are valid? (Choose two.)


Options:

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, D

Salesforce PDII Sample Question 38

If you have a method "doStuff(List records)", which is a valid call?


Options:

A. doStuff([Select Id From Account]);
B. doStuff(List records);
C. doStuff(Account acct);
D. doStuff(sObject obj);

Answer: B

Salesforce PDII Sample Question 39

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?


Options:

A. use the Database.Delete method if the Contact insertion fails.
B. Disable validation rules on Contacts and set default values with a Trigger.
C. use the Database.Insert method with allOrNone set to False.
D. use setSavePoint() and rollback() with a try/catch block.

Answer: E

Salesforce PDII Sample Question 40

A developer created three Rollup Summary fields: Total_timesheets_c, Total_Approved_timesheet_c and Total_project_Timesheet_c in the custom object, project _c

Now, the developer is tasked with created a new field to show the ratio between and approved


Options:

A. No test methods will be executed during deployment.
B. A test class that validates the formula field is needed for deployment.
C. Using a formula field reduces maintenance overhead.
D. A formula field will calculate the value retroactively for existing records.

Answer: C, E

Salesforce PDII Sample Question 41

A developer is asked to build a solution that will automatically send an email to the Customer when an Opportunity stage changes. The solution must scale to allow for 10,000 emails per day. The criteria to send the email should be evaluated after all Workflow Rules have fired. What is the optimal way to accomplish this?


Options:

A. Use a Workflow Email Alert.
B. Usea MassEmailMessage() with an Apex Trigger.
C. Use a SingleEmailMessage() with an Apex Trigger.
D. Use an Email Alert with Process Builder.

Answer: E

Salesforce PDII Sample Question 42

A developer is working on code that requires a call to an external web service from a batch. How should the developer enable this functionality?


Options:

A. Implement a custom System.CalloutException class
B. Include Database.AllowCallout() in the class definition
C. Implement an @future method for the callout, and invoke it from the batch
D. Specify "callout=true" in the batch implementation

Answer: C

Salesforce PDII Sample Question 43

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?


Options:

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

Answer: B

Salesforce PDII Sample Question 44

ABC Company has an Apex process that makes multiple extensive database operation and web service callouts. The database processes and web services can take a length time to run and must be run sequentially.

How should the developer write this Apex code without running into governor limits and system limitations?


Options:

A. Use Limits class to stop entire process once governor limits are reached.
B. Use multiple @future methods for each process and callout.
C. Use Queueable Apex to chain the jobs to run sequentially.
D. Use Apex Scheduler to scheduled each process.

Answer: B

Salesforce PDII Sample Question 45

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?


Options:

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

Salesforce PDII Sample Question 46

What is a valid request for the following REST method? (Choose two.)

@HttpPost global static void myPostMethod(String si, Integer il, Boolean bl, String 52)


Options:

A. my first string 123 my second string32> false
B. "my first string" 123 !,my second string"32> false
C. si" : "my first string", 11" : "123", "bl" : "false", "S2" : "my second string"
D. il" : 123, "SI" : "my first string", "S2" : "my second string", "bl" : false

Answer: B, E

Salesforce PDII Sample Question 47

Which use case can only be performed by using asynchronous Apex?


Options:

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


and so much more...