Salesforce Certified Platform Developer II - Certified Platform Developer II Exam
Page: 2 / 85
Total 424 questions
Question #6 (Topic: Single Topic)
A Visualforce page contains an industry select list and displays a table of Accounts that have a matching value in their Industry field.
<apex:selectList value="{!selectedIndustry}">
<apex:selectOptions values="{!industries}"/>
</apex:selectList>
When a user changes the value in the industry select list, the table of Accounts should be automatically updated to show the Accounts associated with the
selected industry.
What is the optimal way to implement this?
<apex:selectList value="{!selectedIndustry}">
<apex:selectOptions values="{!industries}"/>
</apex:selectList>
When a user changes the value in the industry select list, the table of Accounts should be automatically updated to show the Accounts associated with the
selected industry.
What is the optimal way to implement this?
A. Add an <apex:actionFunction> within the <apex:selectOptions>.
B. Add an <apex:actionFunction> within the <apex:selectList>.
C. Add an <apex:actionSupport> within the <apex:selectList>.
D. Add an <apex:actionSupport> within the <apex:selectOptions>.
Answer: B
Question #7 (Topic: Single Topic)

The test method above calls a web service that updates an external system with Account information and sets the Account's Integration_Updated__c checkbox to
True when it completes. The test fails to execute and exits with an error: "Methods defined as TestMethod do not support Web service callouts. "
What is the optimal way to fix this?
A. Add Test.startTest() before and Test.setMock and Test.stopTest() after CalloutUtil.sendAccountUpdate.
B. Add Test.startTest() and Test.setMock before and Test.stopTest() after CalloutUtil.sendAccountUpdate.
C. Add if (!Test.isRunningTest()) around CalloutUtil.sendAccountUpdate.
D. Add Test.startTest() before and Test.stopTest() after CalloutUtil.sendAccountUpdate.
Answer: B
Question #8 (Topic: Single Topic)
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?
it in Production.
What should the developer ensure to correct these errors?
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: B
Question #9 (Topic: Single Topic)
<lightning:layout multipleRows="true">
<lightning:layoutItem size="12">{!v.account.Name}
</lightning:layoutItem>
<lightning:layoutItem size="12">{!v.account.AccountNumber}
</lightning:layoutItem>
<lightning:layoutItem size="12">{!v.account.Industry}
</lightning:layoutItem>
</lightning:layout>
Refer to the component code above. The information displays as expected (in three rows) on a mobile device. However, the information is not displaying as
desired (in a single row) on a desktop or tablet.
Which option has the correct component changes to display correctly on desktops and tablets?
<lightning:layoutItem size="12">{!v.account.Name}
</lightning:layoutItem>
<lightning:layoutItem size="12">{!v.account.AccountNumber}
</lightning:layoutItem>
<lightning:layoutItem size="12">{!v.account.Industry}
</lightning:layoutItem>
</lightning:layout>
Refer to the component code above. The information displays as expected (in three rows) on a mobile device. However, the information is not displaying as
desired (in a single row) on a desktop or tablet.
Which option has the correct component changes to display correctly on desktops and tablets?
A. <lightning:layout multipleRows="true"> <lightning:layoutItem size="12" mediumDeviceSize="6" largeDeviceSize="4">{!v.account.Name} </lightning:layoutItem> <lightning:layoutItem size="12" mediumDeviceSize="6" largeDeviceSize="4">{!v.account.AccountNumber} </lightning:layoutItem> <lightning:layoutItem size="12" mediumDeviceSize="6" largeDeviceSize="4">{!v.account.Industry} </lightning:layoutItem> </lightning:layout>
B. <lightning:layout multipleRows="true"> <lightning:layoutItem size="12" largeDeviceSize="4">{!v.account.Name} </lightning:layoutItem> <lightning:layoutItem size="12" largeDeviceSize="4">{!v.account.AccountNumber} </lightning:layoutItem> <lightning:layoutItem size="12" largeDeviceSize="4">{!v.account.Industry} </lightning:layoutItem> </lightning:layout>
C. <lightning:layout multipleRows="true"> <lightning:layoutItem size="12" mediumDeviceSize="4">{!v.account.Name} </lightning:layoutItem> <lightning:layoutItem size="12" mediumDeviceSize="4">{!v.account.AccountNumber} </lightning:layoutItem> <lightning:layoutItem size="12" mediumDeviceSize="4">{!v.account.Industry} </lightning:layoutItem> </lightning:layout>
D. <lightning:layout multipleRows="true"> <lightning:layoutItem size="12" mediumDeviceSize="6">{!v.account.Name} </lightning:layoutItem> <lightning:layoutItem size="12" mediumDeviceSize="6">{!v.account.AccountNumber} </lightning:layoutItem> <lightning:layoutItem size="12" mediumDeviceSize="6">{!v.account.Industry} </lightning:layoutItem> </lightning:layout>
Answer: C
Question #10 (Topic: Single Topic)
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?
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 update 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 upsert trigger that creates the Engineering Review record and inserts it
D. A before upsert trigger that creates the Engineering Review record and inserts it
Answer: A