exam questions

Exam Certified Platform Developer II All Questions

View all questions & answers for the Certified Platform Developer II exam

Exam Certified Platform Developer II topic 1 question 289 discussion

Actual exam question from Salesforce's Certified Platform Developer II
Question #: 289
Topic #: 1
[All Certified Platform Developer II Questions]

A developer is building a Lightning web component that retrieves data from Salesforce and assigns it to the record property.



What must be done in the component to get the data from Salesforce?

  • A. Add the following code above record;
    @wire(getRecord, { recordId: ‘$recordId’, fields: ‘$fields’ })
  • B. Add the following code above record;
    @wire(getRecord, { recordId: ‘$recordId’ })
    Get the fields in renderedCallback() and assign them to record.
  • C. Add the following code above record;
    @api(getRecord, { recordId: ‘$recordId’ })
    Get the fields in renderedCallback() and assign them to record.
  • D. Add the following code above record;
    @api(getRecord, { recordId: ‘$recordId’, fields: ‘$fields’ })
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
RegNav
3 months, 1 week ago
A. https://developer.salesforce.com/docs/component-library/documentation/en/lwc/lwc.data_wire_example
upvoted 2 times
...
AppleDash
5 months, 4 weeks ago
https://developer.salesforce.com/docs/component-library/documentation/en/lwc/lwc.apex_wire_method
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago