nerdexam
Salesforce

PDII · Question #188

A developer is developing a reuseable Aura Component that will reside on an sObject Lightning Page with the following HTML snippet: How can the component's Controller get the context of the…

The correct answer is D. Add force:hasSobjectName to the implements. See the full explanation below for the reasoning.

Question

A developer is developing a reuseable Aura Component that will reside on an sObject Lightning Page with the following HTML snippet:

How can the component's Controller get the context of the Lightning Page that the sObject is on without requiring additional test coverage?

Options

  • AUse the getSObjectType() method in an Apex class
  • BCreate a design attribute and configure via App builder
  • CSet the sObject type as a component attribute
  • DAdd force:hasSobjectName to the implements

How the community answered

(25 responses)
  • A
    16% (4)
  • B
    4% (1)
  • C
    8% (2)
  • D
    72% (18)

Community Discussion

No community discussion yet for this question.

Full PDII Practice