nerdexam
Salesforce

PDII · Question #217

A developer must perform a complex SOQL query that joins two objects in a Lightning component. How can the Lightning component execute the query?

The correct answer is D. Write the query in a custom Lightning web component wrapper and invoke from the Lightning. See the full explanation below for the reasoning.

Question

A developer must perform a complex SOQL query that joins two objects in a Lightning component. How can the Lightning component execute the query?

Options

  • AInvoke an Apex class with the method annotated as @AuraEnabled to perform the query
  • BUse the Salesforce Streaming API to perform the SOQL query
  • CCreate a Process Builder to execute the query and invoke from the Lightning component
  • DWrite the query in a custom Lightning web component wrapper and invoke from the Lightning

How the community answered

(42 responses)
  • A
    7% (3)
  • B
    2% (1)
  • C
    14% (6)
  • D
    76% (32)

Community Discussion

No community discussion yet for this question.

Full PDII Practice