ExamGecko
Home Home / Salesforce / Certified Platform Developer II

Salesforce Certified Platform Developer II Practice Test - Questions Answers, Page 12

Question list
Search
Search

List of questions

Search

Related questions











A developer is writing unit tests for the following method:

Which assertion would be used in a negative test case?

A.
System.assertEquals(true, isFreezing(null))
A.
System.assertEquals(true, isFreezing(null))
Answers
B.
System.assertEquals (true, isFreezing('O')
B.
System.assertEquals (true, isFreezing('O')
Answers
C.
System.assertEquals(null, isFreezing('asdf))
C.
System.assertEquals(null, isFreezing('asdf))
Answers
D.
System.assertEquals(true, isFreezingClOO'))
D.
System.assertEquals(true, isFreezingClOO'))
Answers
Suggested answer: C

During the order of execution of a Visualforce page GET request, what happens after this step?

Evaluate constructors on controllers and extensions

A.
Evaluate constructors and expressions on custom components
A.
Evaluate constructors and expressions on custom components
Answers
B.
Create view state if <apex: form> exists
B.
Create view state if <apex: form> exists
Answers
C.
Send the HTML response to the browser
C.
Send the HTML response to the browser
Answers
D.
Evaluate expressions, action attributes, and method calls
D.
Evaluate expressions, action attributes, and method calls
Answers
Suggested answer: A

A developer needs to create a service that will process an email sent to it and create an account and contact using the contents of the email as data for the records.

How might a developer accomplish this requirement?

A.
Use the Apex Inbound Email Handler
A.
Use the Apex Inbound Email Handler
Answers
B.
Use the Fuel API with Email Data Extensions
B.
Use the Fuel API with Email Data Extensions
Answers
C.
Use Heroku Data Clips to Process Email
C.
Use Heroku Data Clips to Process Email
Answers
D.
Use Auto-launched Flow and Process Builder
D.
Use Auto-launched Flow and Process Builder
Answers
Suggested answer: A

How can Apex be used with Visual Workflow?

A.
To set the version of a Flow being run
A.
To set the version of a Flow being run
Answers
B.
To start a Flow automatically
B.
To start a Flow automatically
Answers
C.
To add custom styling to a Flow
C.
To add custom styling to a Flow
Answers
D.
To control access to a Flow
D.
To control access to a Flow
Answers
Suggested answer: B

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
A.
Named Credentials
Answers
B.
Session ID
B.
Session ID
Answers
C.
OAuth access token
C.
OAuth access token
Answers
D.
Security token
D.
Security token
Answers
Suggested answer: B

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

A.
Segregate calculation functionality from input functionality
A.
Segregate calculation functionality from input functionality
Answers
B.
Specify the list of sales forecasts as transient
B.
Specify the list of sales forecasts as transient
Answers
C.
Implement pagination and reduce records per page
C.
Implement pagination and reduce records per page
Answers
D.
Create formula fields to compute pivoted forecast calculations
D.
Create formula fields to compute pivoted forecast calculations
Answers
E.
Use JavaScript Remoting instead of controller actions
E.
Use JavaScript Remoting instead of controller actions
Answers
Suggested answer: A, C, E

A developer is creating unit tests for code that makes SOAP web service callouts. The developer needs to insert some test data as a part of the unit tests setup.

What are three actions to enable this functionality? (Choose three.)

A.
Surround the callout with TeststartTest(), Test.stopTest()
A.
Surround the callout with TeststartTest(), Test.stopTest()
Answers
B.
Surround the data insertion with Test.startTest(), Test.stopTest()
B.
Surround the data insertion with Test.startTest(), Test.stopTest()
Answers
C.
Implement the WebServiceMock interface
C.
Implement the WebServiceMock interface
Answers
D.
Update code to call Test.setMock()
D.
Update code to call Test.setMock()
Answers
E.
Implement the HttpCalloutMock interface
E.
Implement the HttpCalloutMock interface
Answers
Suggested answer: A, C, D

Which of the follow be used together in DML operations (transaction)? (Choose two.)

A.
Acco u nt - Acco u ntS ha re
A.
Acco u nt - Acco u ntS ha re
Answers
B.
Case - CaseComment
B.
Case - CaseComment
Answers
C.
Opportunity - User
C.
Opportunity - User
Answers
D.
Account - Order
D.
Account - Order
Answers
Suggested answer: B, D

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!)
A.
Http.setHeader ('Authorization' , 'Basic QthZGprjpchVulHNchFtZQ!)
Answers
B.
stub.inputHttpHeaders_x.put('Authorization' , 'Basic QthZGprJpchVulHNchFtZQ')
B.
stub.inputHttpHeaders_x.put('Authorization' , 'Basic QthZGprJpchVulHNchFtZQ')
Answers
C.
Http.setAuthentication('Basic QthZGprjpchVulHNchFtZQ')
C.
Http.setAuthentication('Basic QthZGprjpchVulHNchFtZQ')
Answers
D.
stub.authentication.put ('Authorization','Basic QthZGprjpchVulHNchFtZQ')
D.
stub.authentication.put ('Authorization','Basic QthZGprjpchVulHNchFtZQ')
Answers
Suggested answer: B

What is the correct syntax for calling a controller action from a Visualforce page and updating part of the page once the action is completed? (Choose two.)

A.
<apex : commandFunction action=?l { ! Save} " value="Save" rendered^"thePageBlock"/>
A.
<apex : commandFunction action=?l { ! Save} " value="Save" rendered^"thePageBlock"/>
Answers
B.
<apex: actionFunction action=" { ! Save} " name=!,Save" rerender=l,thePageBlock1'/>
B.
<apex: actionFunction action=" { ! Save} " name=!,Save" rerender=l,thePageBlock1'/>
Answers
C.
<apex:commandButton action="{!Save}" value="Save" redraw="thePageBlock"/>
C.
<apex:commandButton action="{!Save}" value="Save" redraw="thePageBlock"/>
Answers
D.
<apex: actionSupport action="{ ISave} " event=llonchange1' rerender="thePageBlock"/>
D.
<apex: actionSupport action="{ ISave} " event=llonchange1' rerender="thePageBlock"/>
Answers
Suggested answer: B, D
Total 408 questions
Go to page: of 41