Certified Platform Developer II Exam QuestionsBrowse all questions from this exam

Certified Platform Developer II Exam - Question 171


A developer must perform a complex SOQL query that joins two objects in a Lightning component.

How can the Lightning component execute the query?

Show Answer
Correct Answer: AD

To perform a complex SOQL query that joins two objects in a Lightning component, the best approach is to invoke an Apex class with a method annotated as @AuraEnabled. Apex is specifically designed to interact with Salesforce database objects and can handle complex queries efficiently. Once the data is retrieved, it can be sent back to the Lightning component for further processing or display.

Discussion

5 comments
Sign in to comment
hujiafanOption: A
Nov 7, 2021

Why not A

OmShantiVegOption: A
Jul 20, 2022

Ans is A you can not perform SOQL query directly from lwc

BruceParkOption: D
Aug 16, 2023

D is correct. A doesn't have any strategy to do for join query. Wrapper can be technique to transfer joined data. A is just about AuraEnabled method.

aregas
May 21, 2024

https://www.sfdcpoint.com/salesforce/wrapper-class-in-lwc/

SegreOption: A
Mar 13, 2023

D doesn't make any sense

Ike300Option: A
Apr 7, 2023

D makes no senses indeed. We do @AuraEnabled(cacheable=true) in Apex Still surprised only 3 fellow saw this