Salesforce Certified Platform Developer (Plat-Dev-201) PDI Question # 1 Topic 1 Discussion

Salesforce Certified Platform Developer (Plat-Dev-201) PDI Question # 1 Topic 1 Discussion

PDI Exam Topic 1 Question 1 Discussion:
Question #: 1
Topic #: 1

Consider the following code snippet:

public static List obtainAllFields(Set leadIds) {

List result = new List();

for (Id leadId : leadIds) {

result.add([SELECT FIELDS(ALL) FROM Lead WHERE Id = :leadId]);

}

return result;

}

Given the multi-tenant architecture of the Salesforce platform, what is a best practice a developer should implement to ensure successful execution of the method?


A.

Avoid using variables as query filters.


B.

Avoid performing queries inside for loops.


C.

Avoid executing queries without a limit clause.


D.

Avoid returning an empty List of records.


Get Premium PDI Questions

Contribute your Thoughts:


Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.