어느 Salesforce Developer의 개발 성장기

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

Salesforce Dump/Platform Developer1 Dump

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

Developer_Foryou 2020. 3. 8. 01:03

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

 

A Platform Developer needs to write an Apex method that will only perform an action if a record is assigned to a specific Record Type. Which two options allow the developer to dynamically determine the ID of the required Record Type by its name? (Choose two.)

A. Make an outbound web services call to the SOAP API.
B. Hardcode the ID as a constant in an Apex class.
C. Use the getRecordTypeInfosByName() method in the DescribeSObjectResult class.
D. Execute a SOQL query on the RecordType object.

Answer C, D

How should a developer make sure that a child record on a custom object, with a lookup to the Account object, has the same sharing access as its associated account?

A. Create a Sharing Rule comparing the custom object owner to the account owner.
B. Create a validation rule on the custom object comparing the record owners on both records.
C. Include the sharing related list on the custom object page layout.
D. Include the sharing related list on the custom object page layout.

Answer 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

The operation manager at a construction company uses a custom object called Machinery to manage the usage and maintenance of its cranes and other machinery. The manager wants to be able to assign machinery to different constructions jobs, and track the dates and costs associated with each job. More than one piece of machinery can be assigned to one construction job. What should a developer do to meet these requirements?

A. Create a lookup field on the Construction Job object to the Machinery object.
B. Create a lookup field on the Machinery object to the Construction Job object.
C. Create a junction object with Master-Detail Relationship to both the Machinery object and the Construction Job object.
D. Create a Master-Detail Lookup on the Machinery object to the Construction Job object.

Answer A

Which two strategies should a developer use to avoid hitting governor limits when developing in a multi-tenant environment? (Choose two.)

A. Use collections to store all fields from a related object and not just minimally required fields.
B. Use methods from the "Limits” class to monitor governor limits.
C. Use SOQL for loops to iterate data retrieved from queries that return a high number of rows.
D. Use variables within Apex classes to store large amounts of data.

Answer B, C

A developer executes the following query in Apex to retrieve a list of contacts for each account: List<account> accounts = [Select ID, Name, (Select ID, Name from Contacts) from Account] ; Which two exceptions may occur when it executes? (Choose two.)

A. CPU limit exception due to the complexity of the query.
B. SOQL query row limit exception due to the number of contacts.
C. SOQL query limit exception due to the number of contacts.
D. SOQL query row limit exception due to the number of accounts.

Answer C, D

A developer needs to display all of the available fields for an object. In which two ways can the developer retrieve the available fields if the variable myObject represents the name of the object? (Choose two.)

A. Use myObject.sObjectType.getDescribe().fieldSet() to return a set of fields.
B. Use mySObject.myObject.fields.getMap() to return a map of fields.
C. Use Schema.describeSObjects(new String[]{myObject})[0].fields.getMap() to return a map of fields.
D. Use getGlobalDescribe().get(myObject).getDescribe().fields.getMap() to return a map of fields.

Answer B, C

Why would a developer consider using a custom controller over a controller extension?

A. To increase the SOQL query governor limits.
B. To implement all of the logic for a page and bypass default Salesforce functionality
C. To leverage built-in functionality of a standard controller
D. To enforce user sharing settings and permissions

Answer B

What are three characteristics of static methods? (Choose three.)

A. Initialized only when a class is loaded
B. A static variable outside of the scope of an Apex transaction
C. Allowed only in outer classes
D. Allowed only in inner classes
E. Excluded from the view state for a Visualforce page

Answer A, C, E

What are two uses for External IDs? (Choose two.)

A. To create relationships between records imported from an external system.
B. To create a record in a development environment with the same Salesforce ID as in another environment
C. To identify the sObject type in Salesforce
D. To prevent an import from creating duplicate records using Upsert

Answer A, D

Comments