어느 Salesforce Developer의 개발 성장기

[Salesforce Certified Platform Developer1] Dump 오답 일기1 본문

Salesforce Dump/Platform Developer1 Dump

[Salesforce Certified Platform Developer1] Dump 오답 일기1

Developer_Foryou 2020. 3. 8. 00:43

※ 각 자격증별 Dump는 시험을 준비하면서, 
웹상에 공개된 Dump와 유료 Dump를 풀면서 자주 틀렸던 문제를 위주로 작성하였습니다. 
오래된 문제도 간혹 있기 때문에 버전에 따라 답이 다른 경우도 있으며,
개인이 공부하면서 푼 문제이기 때문에 오답일 가능성도 있습니다.
이점 유의하여 공부하시길 바랍니다.

 

A method is passed a list of generic sObjects as a parameter. What should the developer do to determine which object type (Account, Lead, or Contact, for example) to cast each sObject?

A. Use the first three characters of the sObject ID to determine the sObject type.
B. Use the getSObjectType method on each generic sObject to retrieve the sObject token.
C. Use the getSObjectName method on the sObject class to get the sObject name.
D. Use a try-catch construct to cast the sObject into one of the three sObject types.

Answer B

While writing a test class that covers an OpportunityLineItem trigger, a Developer is unable to create a standard PriceBook since one already exists in the org. How should the Developer overcome this problem?

A. Use Test.getStandardPricebookId() to get the standard PriceBook ID.
B. Use @IsTest(SeeAllData=true) and delete the existing standard PriceBook.
C. Use Test.loadData() and a Static Resource to load a standard Pricebook.
D. Use @TestVisible to allow the test method to see the standard PriceBook.

Answer A

A developer encounters APEX heap limit errors in a trigger. Which two methods should the developer use to avoid this error? (Choose two.)

A. Use the transient keyword when declaring variables.
B. Query and store fields from the related object in a collection when updating related objects.
C. Remove or set collections to null after use.
D. Use SOQL for loops instead of assigning large queries results to a single collection and looping through the collection.

Answer A, D

Which approach should be used to provide test data for a test class?

A. Query for existing records in the database.
B. Execute anonymous code blocks that create data.
C. Use a test data factory class to create test data.
D. Access data in @TestVisible class variables.

Answer C

What is the requirement for a class to be used as a custom Visualforce controller?

A. Any top-level Apex class that has a constructor that returns a PageReference
B. Any top-level Apex class that extends a PageReference
C. Any top-level Apex class that has a default, no-argument constructor
D. Any top-level Apex class that implements the controller interface

Answer D

A newly hired developer discovers that there are multiple triggers on the case object. What should the developer consider when working with triggers?

A. Developers must dictate the order of trigger execution.
B. Trigger execution order is based on creation date and time.
C. Unit tests must specify the trigger being tested.
D. Trigger execution order is not guaranteed for the same sObject.

Answer D

What is a capability of the <ltng:require> tag that is used for loading external Javascript libraries in Lightning Component? (Choose three.)

A. Loading files from Documents.
B. One-time loading for duplicate scripts.
C. Specifying loading order.
D. Loading scripts in parallel.
E. Loading externally hosted scripts.

Answer B, C, D

An org has a single account named ‘NoContacts’ that has no related contacts. Given the query:

List<Account> accounts = [Select ID, (Select ID, Name from Contacts) from Account where Name=‘NoContacts’];

What is the result of running this Apex?

A. accounts[0].contacts is invalid Apex.
B. accounts[0].contacts is an empty Apex.
C. accounts[0].contacts is Null.
D. A QueryException is thrown.

Answer B

A platform developer at Universal Containers needs to create a custom button for the Account object that, when clicked, will perform a series of calculations and redirect the user to a custom Visualforce page. Which three attributes need to be defined with values in the <apex:page> tag to accomplish this? (Choose three.)

A. action
B. renderAs
C. standardController
D. readOnly
E. extensions

Answer A, B, C

Using the Schema Builder, a developer tries to change the API name of a field that is referenced in an Apex test class. What is the end result?

A. The API name is not changed and there are no other impacts.
B. The API name of the field and the reference in the test class is changed.
C. The API name of the field is changed, and a warning is issued to update the class.
D. The API name of the field and the reference in the test class is updated.

Answer C

Comments