Practice Test Free
  • QUESTIONS
  • COURSES
    • CCNA
    • Cisco Enterprise Core
    • VMware vSphere: Install, Configure, Manage
  • CERTIFICATES
No Result
View All Result
  • Login
  • Register
Quesions Library
  • Cisco
    • 200-301
    • 200-901
      • Multiple Choice
      • Drag Drop
    • 350-401
      • Multiple Choice
      • Drag Drop
    • 350-701
    • 300-410
      • Multiple Choice
      • Drag Drop
    • 300-415
      • Multiple Choice
      • Drag Drop
    • 300-425
    • Others
  • AWS
    • CLF-C02
    • SAA-C03
    • SAP-C02
    • ANS-C01
    • Others
  • Microsoft
    • AZ-104
    • AZ-204
    • AZ-305
    • AZ-900
    • AI-900
    • SC-900
    • Others
  • CompTIA
    • SY0-601
    • N10-008
    • 220-1101
    • 220-1102
    • Others
  • Google
    • Associate Cloud Engineer
    • Professional Cloud Architect
    • Professional Cloud DevOps Engineer
    • Others
  • ISACA
    • CISM
    • CRIS
    • Others
  • LPI
    • 101-500
    • 102-500
    • 201-450
    • 202-450
  • Fortinet
    • NSE4_FGT-7.2
  • VMware
  • >>
    • Juniper
    • EC-Council
      • 312-50v12
    • ISC
      • CISSP
    • PMI
      • PMP
    • Palo Alto Networks
    • RedHat
    • Oracle
    • GIAC
    • F5
    • ITILF
    • Salesforce
Contribute
Practice Test Free
  • QUESTIONS
  • COURSES
    • CCNA
    • Cisco Enterprise Core
    • VMware vSphere: Install, Configure, Manage
  • CERTIFICATES
No Result
View All Result
Practice Test Free
No Result
View All Result
Home Free IT Exam Dumps

Certified Platform Developer II Dump Free

Table of Contents

Toggle
  • Certified Platform Developer II Dump Free – 50 Practice Questions to Sharpen Your Exam Readiness.
  • Access Full Certified Platform Developer II Dump Free

Certified Platform Developer II Dump Free – 50 Practice Questions to Sharpen Your Exam Readiness.

Looking for a reliable way to prepare for your Certified Platform Developer II certification? Our Certified Platform Developer II Dump Free includes 50 exam-style practice questions designed to reflect real test scenarios—helping you study smarter and pass with confidence.

Using an Certified Platform Developer II dump free set of questions can give you an edge in your exam prep by helping you:

  • Understand the format and types of questions you’ll face
  • Pinpoint weak areas and focus your study efforts
  • Boost your confidence with realistic question practice

Below, you will find 50 free questions from our Certified Platform Developer II Dump Free collection. These cover key topics and are structured to simulate the difficulty level of the real exam, making them a valuable tool for review or final prep.

Question 1

What level can a hierarchy custom setting be defined for? (Choose three.)

A. Users

B. Groups

C. Profiles

D. Roles

E. Organization

 


Suggested Answer: ACE

Community Answer: ACE

 

Question 2

Given the following containment hierarchy:
 Image
What is the correct way to communicate the new value of a property named “passthrough” to my-parent-component if the properly is defined within my-child-component?

A.
Image

B.
Image

C.
Image

D.
Image

 


Suggested Answer: B

Community Answer: B

 

Question 3

A company recently deployed a Visualforce page with a custom controller that has a data grid of information about Opportunities in the org. Users report that they receive a `Maximum view state size limit` error message under certain conditions.
According to Visualforce best practice, which three actions should the developer take to reduce the view state? (Choose three.)

A. Use the transient keyword in the Apex controller for variables that do not maintain state

B. Use the final keyword in the controller for variables that will not change

C. Use the private keyword in the controller for variables

D. Refine any SOQL queries to return only data relevant to the page

E. Use filters and pagination to reduce the amount of data

 


Suggested Answer: BDE

Community Answer: ADE

 

Question 4

Choose the correct definition for .

A. Standard Salesforce formatting, throws a specific message on a page

B. Standard Salesforce formatting, shows all errors that occur on page. Can add more messages through the “ApexPages.addMessage” function

C. A single message, without formatting, that can be associated with a specific component on the page

D. No formatting; displays all errors on a page

 


Suggested Answer: C

Community Answer: C

 

Question 5

Users complain that a page is very slow to respond. Upon investigation, the query below is found to perform slowly.
 Image
Which two actions can a developer take to improve performance? (Choose two.)

A. Make the CustomField_c field an External ID.

B. Make the field CustomField_c required because Salesforce field indexes do not include nulls.

C. Add a LIMIT clause to the query to reduce the number of records returned.

D. Contact Salesforce customer support to create a custom index to include null values.

 


Suggested Answer: AC

Community Answer: CD

 

Question 6

A developer is building a Lightning web component that displays quantity, unit price, and the total for an order line item. The total is calculated dynamically as the quantity multiplied by the unit price.
 Image
What must be added to display the total?

A. Add calculateTotal() { return quantity * unitPrice; } to the JavaScript and Total: {calculateTotal()}in the template.

B. Add get total() { return quantity * unitPrice; } to the JavaScript and Total: {total} in the template.

C. Add Total: {multiply{quantity, unitPrice}} in the template.

D. Add Total: {quantity * unitPrice} in the template.

 


Suggested Answer: A

Community Answer: B

 

Question 7

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. Expose it in the markup using the implements and access attributes.

B. Delete the component, metadata, and Apex controller and recreate them.

C. Refresh the sandbox and upgrade it to the latest API version.

D. Look for errors in the logic in the JavaScript controller.

 


Suggested Answer: A

Community Answer: A

 

Question 8

A developer built a Component to be used at the front desk for quests to self-register upon arrival at a kiosk. The developer is now asked to create a Component for the Utility Tray to alert Users whenever a guest has arrived at the front desk.
What should be used?

A. Application Event

B. DML Operation

C. Component Event

D. ChangeLog

 


Suggested Answer: C

Community Answer: A

 

Question 9

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__c, 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. Use a SOSL query to return ALL opportunities that have a value of NULL in any field.

B. Use the OR operator to combine WHERE clauses to strictly search for each value within the picklist, including Type__c = NULL.

C. Perform two SOQL queries; one to query Opportunities where Type__c != NULL, and another to query where Type__c = NULL, then join the result set using Apex.

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

 


Suggested Answer: D

Community Answer: D

 

Question 10

A developer must perform a complex SOQL query that joins two objects in a Lightning component.
How can the Lightning component execute the query?

A. Invoke an Apex class with the method annotated as @AuraEnabled to perform the query

B. Use the Salesforce Streaming API to perform the SOQL query

C. Create a Process Builder to execute the query and invoke from the Lightning component

D. Write the query in a custom Lightning web component wrapper and invoke from the Lightning component

 


Suggested Answer: A

Community Answer: A

 

Question 11

A developer sees test failures in the sandbox but not in production. No code or metadata changes have been actively made to either environment since the sandbox was created.
Which consideration should be checked to resolve the issue?

A. Ensure the sandbox is on the same release as production.

B. Ensure Workflow Rules are inactive.

C. Ensure the Apex Classes are on the same API version.

D. Ensure Process Builder processes are inactive.

 


Suggested Answer: A

Community Answer: A

 

Question 12

Universal Containers implements a private sharing model for the Convention_Attendee_ _c custom object. As part of a new quality assurance effort, the company created an Event_Reviewer_ _c user lookup field on the object. Management wants the event reviewer to automatically gain Read/Write access to every record they are assigned to.
What is the best approach to ensure the assigned reviewer obtains Read/Write access to the record?

A. Create a criteria-based sharing rule on the Convention Attendee custom object to share the records to a group of Event Reviewers.

B. Create an After Insert trigger on the Convention Attendee custom object, and use Apex Sharing Reasons and Apex Managed Sharing.

C. Create criteria-based sharing rules on the Convention Attendee custom object to share the records with the Event Reviewers.

D. Create a Before Insert trigger on the Convention Attendee custom object, and use Apex Sharing Reasons and Apex Managed Sharing.

 


Suggested Answer: D

Community Answer: B

Reference:
https://help.salesforce.com/articleView?id=security_apex_sharing_reasons.htm&type=5

Question 13

Consider the following code snippet:
 Image
The Apex method is executed in an environment with a large data volume count for Accounts, and the query is performing poorly.
Which technique should the developer implement to ensure the query performs optimally, while preserving the entire result set?

A. Annotate the method with the @Future annotation.

B. Create a formula field to combine the CreatedDate and RecordType value, then filter based on the formula.

C. Break down the query into two individual queries and join the two result sets.

D. Use the Database.queryLocator method to retrieve the accounts.

 


Suggested Answer: C

Community Answer: C

 

Question 14

When calling a RESTful web service, the developer must implement two-way SSL authentication to enhance security. The Salesforce admin has generated a self-sign certificate within Salesforce with a unique name of "ERPSecCertificate".
Consider the following code snippet:
 Image
Which method must the developer implement in order to sign the HTTP request with the certificate?

A. req.setHeader(‘certificate’, ‘ERPSecCertificate’);

B. req.setSecureCertificate(‘ERPSecCertificate’);

C. req.setSedure(‘ERPSecCertificate)’;

D. req.setClientCertificateName(‘ERPSecCertificate’);

 


Suggested Answer: D

Community Answer: D

 

Question 15

A corporation has many different Salesforce orgs, with some different objects and some common objects, and wants to build a single Java application that can create, retrieve, and update common object records in all of the different orgs.
Which method of integration should the application use?

A. SOAP API with the Partner WSDL

B. SOAP API with the Enterprise WSDL

C. Apex REST Web Service

D. Metadata API

 


Suggested Answer: A

Community Answer: A

 

Question 16

As part of a custom interface, a developer team creates various new Lightning web components. Each of the components handles errors using toast messages. When the development is complete, all the components are added to the same Lightning page.
During acceptance testing, users complain about the long chain of toast messages that display when errors occur loading the components.
Which two techniques should the developer implement to improve the user experience? (Choose two.)

A. Use a [template] tag to display in-place error messages

B. Use public properties on each component to display the error messages

C. Use the window.alert() method to display the error messages.

D. Use a Lightning web component to aggregate and display all errors.

 


Suggested Answer: AB

Community Answer: AD

 

Question 17

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?

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

 


Suggested Answer: B

 

Question 18

Which two relationship queries use the proper syntax? (Choose two.)

A. SELECT Id, Name, Account__r.Name FROM Contact WHERE Account__r.Industry = ‘Media’

B. SELECT Name, (SELECT LastName FROM Contacts__r) FROM Account

C. SELECT Name, (SELECT LastName FROM Contacts) FROM Account

D. SELECT Id, Name, Account.Name FROM Contact WHERE Account.Industry = ‘Media’

 


Suggested Answer: CD

Community Answer: CD

 

Question 19

A company has reference data stored in multiple custom metadata records that represent default information and delete behavior for certain geographic regions.
When a contact is inserted, the default information should be set on the contact from the custom metadata records based on the contact's address information. Additionally, if a user attempts to delete a contact that belongs to a flagged region, the user must get an error message.
What is the optimal way to automate this?

A. Apex invocable method

B. Remote action

C. Flow Builder

D. Apex trigger

 


Suggested Answer: D

 

Question 20

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. trigger CaseTrigger on Case (after insert, after update){ List createSurveys = new List<Survey_c>(); for (Case c : trigger.new){ if (c.IsClosed && (trigger.isInsert II trigger.isUpdate && trigger.oldMap.get(c.Id).IsClosed == false)){ createSurveys.add(new Survey_c(Case_c = c.Id)); } } insert createSurveys; }
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

 


Suggested Answer: D

Community Answer: C

 

Question 21

@isTest
static void testIncrement() {
Account acct = new Account(Name = 'Test');
acct.Number_Of_Times_Viewed__c = 0;
insert acct;
AuditUtil.incrementViewed(acct.Id);
Account acctAfter = [SELECT Number_Of_Times_Viewed__c FROM Account WHERE Id = :acct.Id][0]
System.assertEquals(1, acctAfter.Number_Of_Times_Viewed__c);
}
The test method above calls an @future method that increments the Number_of_Times_Viewed__c value. The assertion is failing because the
Number_of_Times_Viewed__c equals 0.
What is the optimal way to fix this?

A. Change the initialization to acct.Number_Of_Times_Viewed__c = 1.

B. Add Test.startTest() before and Test.stopTest() after AuditUtil.incrementViewed.

C. Add Test.startTest() before and Test.stopTest() after insert acct.

D. Change the assertion to System.assertEquals(0, acctAfter.Number_Of_Times_Viewed__c).

 


Suggested Answer: B

Community Answer: B

 

Question 22

A developer created a Lightning web component that allows users to input a text value that is used to search for Accounts by calling an Apex method. The Apex method returns a list of AccountWrappers and is called imperatively from a JavaScript event handler.
 Image
Which two changes should the developer make so the Apex method functions correctly? (Choose two.)

A. Add @AuraEnabled to line 09.

B. Add @AuraEnabled to line 03.

C. Add @AuraEnabled to lines 11 and 12.

D. Add @AuraEnabled to line 01.

 


Suggested Answer: C

Community Answer: B

 

Question 23

A developer has a Debug method within a class, which is invoked hundreds of times.
What is the optimal functionality in the Developer Console to count the number of calls made to the method?

A. The “Execution Log” Panel

B. The “Execution Stack” Panel

C. The “Executed Units” tab under the Execution Overview Panel

D. The “Execution Tree” tab under the Stack Tree Panel

 


Suggested Answer: C

Community Answer: C

 

Question 24

A user receives the generic "An internal server error has occurred" while interacting with a custom Lightning Component.
What should the developer do to ensure a more meaningful message?

A. Add an onerror event handler to the tag.

B. Add an error-view component to the markup.

C. Use an AuraHandledException in a try/catch block.

D. Use ProcessBuilder to catch the error.

 


Suggested Answer: C

Community Answer: A

 

Question 25

Choose the correct definition for .

A. Allows for controller methods to be called directly from Javascript. Must be encapsulated in tags. Unlike actionSupport, these functions can be called directly from Javascript code

B. Sends an AJAX request according to the time interval you specify. If this ever gets re-rendered, it resets

C. Adds AJAX support to another component (e.g. onClick, onMouseUp, onFocus, etc.)

D. Can be associated with an AJAX request (actionFunction/actionSupport/actionPoller) and shows content conditionally depending on the status of the request (in progress/complete). Use the “id” field to specify name; use “status” field on related components to connect them

E. Signifies which components should be processed by the server when an AJAX request is generated

 


Suggested Answer: B

Community Answer: B

 

Question 26

A developer is writing a Listener for implementing outbound messaging.
Which three considerations must the developer keep in mind in this case? (Choose three.)

A. Messages are retried independent of their order in the queue.

B. The Organization ID is included only in the first outbound message.

C. Messages can be delivered out of order.

D. The sessionId in an outbound message is scoped for both API requests and UI requests.

E. The Listener must be reachable from the public Internet.

 


Suggested Answer: ACD

 

Question 27

Which two objects can be inserted in the same transaction? (Choose two.)

A. Opportunity and User

B. Account and AccountShare

C. Case and CaseComment

D. Account and Group

 


Suggested Answer: BC

Community Answer: BC

 

Question 28

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

 


Suggested Answer: AD

Community Answer: AD

 

Question 29

In an organization that has multi-currency enabled, a developer is tasked with building a Lightning Component that displays the top ten Opportunities most recently accessed 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 user’s locale settings?

A. Use a wrapper class to format the values retrieved via SOQL.

B. Use the FORMAT() function in the SOQL query.

C. Use the FOR VIEW clause in the SOQL query.

D. Use REGEX expressions to format the values retrieved via SOQL.

 


Suggested Answer: C

Community Answer: B

 

Question 30

What is the most efficient way in Visualforce to show information based on data filters defined by an end-user for a large volume of data?

A. Use the rendered condition in Visualforce to limit data based on data filters

B. Use filter conditions in a SOQL query to limit data based on data filters

C. Use an Apex controller to refine raw data based on data filters and store the result in a transient variable

D. Use an Apex controller to refine raw data based on data filters and store the result in a static variable

 


Suggested Answer: B

Community Answer: B

 

Question 31

Image
The test method above tests in Apex trigger that the developer knows will make a lot of queries when a lot of Accounts are simultaneously updated to be customers.
The test method fails at the Line 20 because of too many SOQL queries.
What is the correct way to fix this?

A. Change the DataFactory class to create fewer Accounts so that the number of queries in the trigger is reduced

B. Add Test.startTest() before and Test.stopTest() after both Line 7 of the code and Line 20 of the code

C. Add Test.startTest() before Line 18 of the code and add Test.stopTest() after line 18 of the code

D. Replace most of the Apex Trigger with Process Builder processes to reduce the number of queries in the trigger

 


Suggested Answer: C

Community Answer: C

 

Question 32

In which of the following scenarios would it be acceptable to use programmatic sharing instead of declarative sharing? (Choose three.)

A. Every record created by sales users needs to be visible to their respective manager

B. Poor performance when using native sharing components

C. Team functionality is required on custom objects

D. There is an existing, external system of truth for user access assignments which will continue to drive access and be integrated with salesforce

E. You need to change record access to read/write for all users utilising a lightning component

 


Suggested Answer: BCD

Community Answer: BCD

 

Question 33

Universal Containers stores user preferences in a Hierarchy Custom Setting, User_Prefs_c, with a Checkbox field, Show_Help_c. Company-level defaults are stored at the organizational level, but may be overridden at the user level. If a user has not overridden preferences, then the defaults should be used.
How should the Show_Help_c preference be retrieved for the current user?

A. Boolean show = User_Prefs__c.getValues(UserInfo.getUserId()).Show_Help__c;

B. Boolean show = User_Prefs__c.getInstance().Show_Help__c;

C. Boolean show = User_Prefs__c.Show_Help__c;

D. Boolean show = User_Prefs__c.getValues().Show_Help__c;

 


Suggested Answer: A

Community Answer: B

Reference:
https://developer.salesforce.com/forums/?id=906F00000008ySqIAI

Question 34

When developing a Lightning web component, which setting displays lightning-layout-items in one column on small devices, such as mobile phones, and in two columns on tables-size and desktop-size screens?

A. Set size=“6” mobile-device-size=“12”

B. Set size=“6” small-device-size=“12”

C. Set size=“12” medium-device-size=“6”

D. Set size=“12” tablet-device-size=“6”

 


Suggested Answer: C

Community Answer: C

 

Question 35

1 Contact con = new Contact( LastName ='Smith', Department = 'Admin')
2 insert con;
3 Contact insertedContact=[select Name from Contact where id=:con.Id];
4 Savepoint sp_admin = Database.setSavepoint();
5 con.Department = 'HR';
6 update con;
7 Database.rollback(sp_admin);
8 System.debug(Limits.getDmlStatements());
Given the following code, what value will be output in the logs by line #8?

A. 5

B. 3

C. 4

D. 2

 


Suggested Answer: C

Community Answer: C

 

Question 36

What is a consideration when testing batch Apex? (Choose two.)

A. Test methods must execute the batch with a scope size of less than 200 records

B. Test methods must call the batch execute() method once

C. Test methods must use the @isTest (SeeAllData=true) annotation

D. Test methods must run the batch between Test.startTest() and Test.stopTest()

 


Suggested Answer: AD

Community Answer: BD

 

Question 37

A software company uses a custom object, Defect__c, to track defects in their software. Defect__c has organization-wide defaults set to private. Each Defect__c has a related list of Reviewer__c records, each with a lookup field to User that is used to indicate that the User will review the Defect__c.
What should be used to give the User on the Reviewer__c record read only access to the Defect__c record on the Reviewer__c record?

A. Apex managed sharing

B. View All on Defect__c

C. Lightning web component

D. Criteria-based sharing

 


Suggested Answer: B

Community Answer: A

 

Question 38

The Account edit button must be overridden in an org where a subset of users still uses 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 both Lightning and Classic with a Lightning Component

B. Override the edit button for both Lightning and Classic with a new Visualforce page

C. Override the edit button for Lightning with a Lightning Page, and for Classic, override the edit button with a Visualforce page that contains the Lightning Component

D. Override the edit button for Lightning with a Lightning Component, and for Classic, override the edit button with a Visualforce page that contains the Lightning Component

 


Suggested Answer: C

Community Answer: C

 

Question 39

Consider the following code snippet, depicting an Aura component:
 Image
Which two interfaces can the developer implement to make the component available as a quick action? (Choose two.)

A. force:hasRecordId

B. force:lightningQuickAction

C. force:hasSObjectName

D. force:lightningQuickActionWithoutHeader

 


Suggested Answer: BD

Community Answer: BD

Reference:
https://developer.salesforce.com/docs/component-library/bundle/force:lightningQuickAction/documentation

Question 40

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

 


Suggested Answer: BD

Community Answer: BD

 

Question 41

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?

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

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

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

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

 


Suggested Answer: D

Community Answer: D

 

Question 42

Which of the following standard fields are indexed? (Choose three.)

A. Name

B. CreatedBy

C. SystemModStamp

D. LastModifedDdate

E. RecordType

 


Suggested Answer: ACE

Community Answer: ACE

 

Question 43

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 an after update trigger on Contact for the Is Primary logic and a separate before update trigger on Contact for the last name logic.

B. Write a Validation Rule on the Contact for the Is Primary logic and a 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 single trigger on Contact for both after update and before update and callout to helper classes to handle each set of logic.

 


Suggested Answer: D

Community Answer: D

 

Question 44

A developer writes the following code:
public with sharing class OrderController() public PaqeReference sendOrder() Order_c order = new Order_c insert order;
ExternalOrder externalOrder = new ExternalOrder(order); Http h = new Http(); HttpRequest req = new HttpRequest(); req.setEndpoint('https://www.example.org/v1/orders'); req.setMethod('POST'); req.setBody(JSON.serialize(externalOrder));
HttpResponse res = h.send(req); order = (ExternalOrder)JSON.deserialize(res.getBody(),ExternalOrder.class);
While testing the code, the developer receives the following error message:
System.CalloutException : You have uncommitted work pending
What should the developer do? (Choose two.)

A. Use the asyncSend() method of the HTTP class to send the request in async context

B. Ensure all callouts are completed prior to executing DML statements

C. Move the web service callout into an @future method

D. Use Database.insert (order, true) to immediately commit any database changes

 


Suggested Answer: BC

 

Question 45

A developer is using a third-party JavaScript library to create a custom user interface in Visualforce. The developer needs to use JavaScript to get data from a controller method in response to a user action.
How can the developer accomplish this?

A. Use to create a JavaScript wrapper for the controller method

B. Use the @RemoteAction annotation on the method definition with JavaScript Remoting

C. Use the $Controller global variable to access the controller method via JavaScript

D. Use to enable JavaScript support for the controller method

 


Suggested Answer: B

Community Answer: D

 

Question 46

Consider the following code snippet:
 Image
Users of this Visualforce page complain that the page does a full refresh every time the Search button is pressed.
What should the developer do to ensure that a partial refresh is made so that only the section identified with opportunityList is re-drawn on the screen?

A. Enclose the DATA table within the tag.

B. Ensure the action method search returns null.

C. Implement the tag with immediate = true.

F. Implement the reRender attribute on the tag.

 


Suggested Answer: F

Community Answer: F

 

Question 47

What is a potential design issue with the following code?
trigger accountTrigger on Account (before update){ Boolean processOpportunity = false; List opptysClosedLost = new List() List IstAllOpp = [select StageName from Opportunity where accountId IN :Trigger.newMap.keySet()]; if(!IstAllOpp.isEmpty()) processOpportunity = true; while(processOpportunity)
{ for(opportunity o : IstAllOpp) if(o.StageName == 'Closed - Lost') opptysClosedLost.add(o); processOpportunity = false; if(!opptysClosedLost.isEmpty()) delete opptysClosedLost;

A. SOQL could be avoided by creating a formula field for StageName in Account from the related Opportunity

B. The code will result in a System.LimitException : Too many script statements error

C. The code will result in a System.DmlException:Entity_is_Deleted error

D. The code will result in a System.LimitException: Apex CPU time limit exceeded error

 


Suggested Answer: D

Community Answer: B

 

Question 48

A developer creates a Lightning web component to allow a Contact to be quickly entered. However, error messages are not displayed.
 Image
Which component should the developer add to the form to display error messages?

A. lightning-messages

B. aura:messages

C. lightning-error

D. apex:messages

 


Suggested Answer: A

 

Question 49

A company has a custom object, Request_c, that has a checkbox 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. SELECT Opportunity_c FROM Request_c WHERE Id IN (SELECT Id FROM Request_c Where Completed_c = true)

B. SELECT Opportunity_c FROM Request_c WHERE Completed_c = true

C. SELECT Id FROM Opportunity WHERE Id IN (SELECT Id FROM Request_c WHERE Completed = true)

D. SELECT Id From Opportunity WHERE Id IN (SELECT Opportunity_c FROM Request_c WHERE Completed_c = true)

 


Suggested Answer: D

 

Question 50

Which method should be used to convert a Date to a String in the current user's locale?

A. Date.format

B. String.format

C. String.valueOf

D. Date.parse

 


Suggested Answer: A

Community Answer: A

 

Access Full Certified Platform Developer II Dump Free

Looking for even more practice questions? Click here to access the complete Certified Platform Developer II Dump Free collection, offering hundreds of questions across all exam objectives.

We regularly update our content to ensure accuracy and relevance—so be sure to check back for new material.

Begin your certification journey today with our Certified Platform Developer II dump free questions — and get one step closer to exam success!

Share18Tweet11
Previous Post

CERTIFIED PLATFORM APP BUILDER Dump Free

Next Post

Certified Sales Cloud Consultant Exam Dump Free

Next Post

Certified Sales Cloud Consultant Exam Dump Free

Certified Tableau CRM and Einstein Discovery Consultant Dump Free

CGEIT Dump Free

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recommended

Network+ Practice Test

Comptia Security+ Practice Test

A+ Certification Practice Test

Aws Cloud Practitioner Exam Questions

Aws Cloud Practitioner Practice Exam

Comptia A+ Practice Test

  • About
  • DMCA
  • Privacy & Policy
  • Contact

PracticeTestFree.com materials do not contain actual questions and answers from Cisco's Certification Exams. PracticeTestFree.com doesn't offer Real Microsoft Exam Questions. PracticeTestFree.com doesn't offer Real Amazon Exam Questions.

  • Login
  • Sign Up
No Result
View All Result
  • Quesions
    • Cisco
    • AWS
    • Microsoft
    • CompTIA
    • Google
    • ISACA
    • ECCouncil
    • F5
    • GIAC
    • ISC
    • Juniper
    • LPI
    • Oracle
    • Palo Alto Networks
    • PMI
    • RedHat
    • Salesforce
    • VMware
  • Courses
    • CCNA
    • ENCOR
    • VMware vSphere
  • Certificates

Welcome Back!

Login to your account below

Forgotten Password? Sign Up

Create New Account!

Fill the forms below to register

All fields are required. Log In

Retrieve your password

Please enter your username or email address to reset your password.

Log In

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.