Platform-Developer-II Exam - Platform Developer II

certleader.com

Exambible offers free demo for Platform-Developer-II exam. "Platform Developer II", also known as Platform-Developer-II exam, is a Salesforce Certification. This set of posts, Passing the Salesforce Platform-Developer-II exam, will help you answer those questions. The Platform-Developer-II Questions & Answers covers all the knowledge points of the real exam. 100% real Salesforce Platform-Developer-II exams and revised by experts!

Free demo questions for Salesforce Platform-Developer-II Exam Dumps Below:

NEW QUESTION 1

What is the correct order of execution for Visualforce Page "get" requests (initial page visit)?

  • A. Evaluate constructors on controller and extensions2) If there's a <apex:form> element, create the view state3) Evaluate expressions, <apex:page> attribute actions, and other method calls (getters/setters) on main page4) Evaluate constructors, extensions, and expression on attribute definitions on any custom components present5) Send HTML to Browser
  • B. Evaluate constructors, extensions, and expression on attribute definitions on any custom components present2) Evaluate constructors on controller and extensions3) Evaluate expressions, <apex:page> attribute actions, and other method calls (getters/setters) on main page4) If there's a <apex:form> element, create the view state5) Send HTML to Browser
  • C. Evaluate constructors on controller and extensions2) Evaluate constructors, extensions, and expression on attribute definitions on any custom components present3) Evaluate expressions, <apex:page> attribute actions, and other method calls (getters/setters) on main page4) If there's a <apex:form> element, create the view state5) Send HTML to Browser

Answer: C

NEW QUESTION 2

Example 1: AggregateResult[] groupedResults = [SELECT Campaignid, AVG(Amount) FROM Opportunity GROUP BY CampaignId]; for (AggregateResult ar : groupedResuits) { System.debug ('Campaign ID' + ar.get('CampaignId'-); System.debug ('Average amount' + ar.get('exprd')); } Example 2: AggregateResult[] groupedResults = [SELECT Campaignid, AVG(Amount) theAverage FROM Opportunity GROUP BY Campaignid]; for (AggregateResult ar : groupedResuits) { System.debug(*Campaign ID' + ar.get('CampaignId')); System.debug ('Average amount' + ar.get('theAverage')); } Example 3: AggregateResult[] groupedResults = [SELECT CampaignId, AVG(Amount) FROM Opportunity GROUP BY CampaignId]; for (AggregateResult ar : groupedResuits) System.debug(*Campaign ID' + ar.get('CampaignId')); System.debug('Average amount' + ar.get.AVG(-); } Example 4:AggregateResult[] groupedResults = [SELECT CampaigniId, AVG(Amount) theAverage FROM Opportunity GROUP BY Campaignid]; for (AggregateResult ar : groupedResults) { System.debug('Campaign ID' + ar.get('CampaignId')); System.debug ('Average amount' + ar.theAverage-; } Which two of the examples above have correct System.debug statements? Choose 2 answers

  • A. Example 1
  • B. Example 2
  • C. Example 3
  • D. Example 4

Answer: AB

NEW QUESTION 3

A developer needs test data for Apex test classes.
What can the developer use to provide test data to the test methods? (Choose two.)

  • A. List<sObject> Is = Test.loadData (Lead.sObjectType, fmyTestLeads f);
  • B. myDataFactory.createTestRecords (10)
  • C. Database.createTestRecords (10)
  • D. List<sObject> Is = Test.loadDat (Lead.sObjectType, $Resource + 'myTestLeads f);

Answer: AB

NEW QUESTION 4

A developer is writing a complex application involving triggers, workflow rules, Apex classes, and processes. The developer needs to carefully consider the order of execution when developing the application.
* 1. Before Triggers
* 2. After Triggers
* 3. Post commit logic such as sending email
* 4. DML committed to the database
* 5. Workflow rules
* 6. Roll-up summary calculations
In what order do the following operations execute?

  • A. 1,2,5,6,4,3
  • B. 1,5,6,2,4,3
  • C. 1,2,4,5,6,3
  • D. 1,6,5,2,4,3

Answer: A

NEW QUESTION 5

A developer is writing unit tests for the following method:
Platform-Developer-II dumps exhibit
Which assertion would be used in a negative test case?

  • A. System.assertEquals(true, isFreezing(null))
  • B. System.assertEquals (true, isFreezing('O')
  • C. System.assertEquals(null, isFreezing('asdf))
  • D. System.assertEquals(true, isFreezingClOO'))

Answer: C

NEW QUESTION 6

A developer must create a custom pagination solution. While users navigate through pages, if the data is changed from elsewhere, users should still see the cached results first accessed.
How can the developer meet these requirements?

  • A. Use @Cache annotation
  • B. Use a StandardSetController
  • C. Use OFFSET in SOQL queries
  • D. Use OFFSET WITH CACHE in SOQL queries

Answer: B

NEW QUESTION 7

Which of the following object types can be used with a Web Service?

  • A. Maps
  • B. Sets
  • C. Pattern objects
  • D. Matcher objects
  • E. Lists
  • F. Exception objects

Answer: E

NEW QUESTION 8

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?

  • A. Schema Class
  • B. Apex API
  • C. Schema Builder
  • D. Metadata API

Answer: A

NEW QUESTION 9

A company has code to update a Request and Request Lines and make a callout to their external ERP system's REST endpoint with the updated records.
Platform-Developer-II dumps exhibit
The CalloutUtil. makeRestCallout fails with a 'You have uncommitted work pending. Please commit or rollback before calling out' error. What should be done to address the problem?

  • A. Change the CalloutUtil.makeRestCallout to an @InvocableMethod method.
  • B. Remove the Database.setSavepoint and Database.rollback.
  • C. Move the CalloutUtil.makeRestCallout method call below the catch block.
  • D. Change the CalloutUtil.makeRestCallout to an @future method

Answer: D

NEW QUESTION 10

The SOAP API .

  • A. Is based on REST principles and is optimized for loading or deleting large sets of dat
  • B. You can use it to query, queryAII, insert, update, upsert, or delete many records asynchronously by submitting batches
  • C. Provides a powerful, convenient, and simple REST-based web services interface for interacting with Salesforc
  • D. Its advantages include ease of integration and development, and it's an excellent choice of technology for use with mobile applications and web projects
  • E. Is used to create, retrieve, update or delete records, such as accounts, leads, and custom objects, and allows you to allows you to maintain passwords, perform searches, and much more
  • F. Is used to retrieve, deploy, create, update, or delete customizations for your or
  • G. The most common use is to migrate changes from a sandbox or testing org to your production environment

Answer: C

NEW QUESTION 11

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?

  • 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: A

NEW QUESTION 12

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

  • A. <apex:variable>
  • B. <apex:define>
  • C. <apex:param>
  • D. <apex:attribute>

Answer: D

NEW QUESTION 13

A developer migrated functionality from JavaScript demoting to a Lightning web component and wants to use the existing getOpportunities() method to provide data.
Which modification to the method is necessary?

  • A. A The method must be decorated with ©AuraEnabled.
  • B. The method must return a JSON Object.
  • C. The method must be decorated with (cacheable=true).
  • D. The method must return a String of a serialized JSON Array.

Answer: A

NEW QUESTION 14

A developer is working with existing functionality that tracks how many times a stage has changed for an Opportunity. When the opportunity’s stage is changed, a workflow rule is fired to increase the value of a filed by one. The developer wrote an after trigger to create a child record when the field changes from 4 to 5.
A user changes the stage of an Opportunities and manually sets the count field to 4. The count field updates to 5, but the child record is not created.
What is the reason this is happening?

  • A. After triggers fire before workflow rules.
  • B. After triggers are not fired after field updates.
  • C. Trigger .new does not change after a field update.
  • D. Trigger .old does not contain the updated value of the count field.

Answer: D

NEW QUESTION 15

A developer created an Opportunity trigger that updates the account rating when an associated opportunity is considered high value. Current criteria for an opportunity to be considered high value is an amount greater than or equal to SI,000,000. However, this criteria value can change over time.
There is a new requirement to also display high value opportunities In a Lightning web component.
Which two actions should the developer take to prevent the business logic that obtains the high value opportunities from being repeated in more than one place?
Choose 2 answers

  • A. Use custom metadata to hold the high value amount.
  • B. Call the trigger from the Lightning web component.
  • C. Leave the business logic code Inside the trigger for efficiency.
  • D. Create a helper class that fetches the high value opportunities.

Answer: AD

NEW QUESTION 16

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

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

Answer: A

NEW QUESTION 17

A company has a web page that needs to get Account record information, given its Salesforce record ID, from JavaScript on the page and then display it. Which method of integration is optimal?

  • A. SOAP API
  • B. Apex REST Web Service
  • C. Apex SOAP Web Service
  • D. REST API

Answer: B

NEW QUESTION 18

Platform-Developer-II dumps exhibit
What should be added to the setup, in the location indicated, for the unit test above to create the controller extension for the test?
A)
Platform-Developer-II dumps exhibit
B)
Platform-Developer-II dumps exhibit
C)
Platform-Developer-II dumps exhibit
D)
Platform-Developer-II dumps exhibit

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

Answer: C

NEW QUESTION 19

A company's support process dictates that any time a Case is closed with a Status of 'Could not fix,' an Engineering Review custom object record should be created and populated with information from the Case,
the Contact, and any of the Products associated with the Case. What is the correct way to automate this using an Apex trigger?

  • A. An after upsert trigger that creates the Engineering Review record and inserts it
  • B. A before update trigger that creates the Engineering Review record and inserts it
  • C. An after update trigger that creates the Engineering Review record and inserts it
  • D. A before update trigger that creates the Engineering Review record and inserts it

Answer: C

NEW QUESTION 20

Lightning Aura Component
Platform-Developer-II dumps exhibit
Given the code above, which two changes need to be made in the Apex Controller for the code to work' Choose 2 answers

  • A. Change the method signature to be global static, not public static.
  • B. Change the argument from JSONObject to String.
  • C. Annotate the entire class as @AuraEnabled instead of just the single method.
  • D. Remove line 06 from the Apex Controller and use firstName In the return.

Answer: BD

NEW QUESTION 21
......

P.S. Easily pass Platform-Developer-II Exam with 196 Q&As Dumps-files.com Dumps & pdf Version, Welcome to Download the Newest Dumps-files.com Platform-Developer-II Dumps: https://www.dumps-files.com/files/Platform-Developer-II/ (196 New Questions)