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?

QuestionsCategory: Certified Platform Developer IIA 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?
Admin Staff asked 4 months ago
A developer is building a Lightning web component that retrieves data from Salesforce and assigns it to the record property.
 Image
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’ })








 

Suggested Answer: A





This question is in Certified Platform Developer II Exam
For getting Salesforce Certified Platform Developer II











Disclaimers:
The website is not related to, affiliated with, endorsed or authorized by Salesforce. 
Trademarks, certification & product names are used for reference only and belong to Salesforce.
The website does not contain actual questions and answers from Salesforce's Certification Exams.

Recommended

Welcome Back!

Login to your account below

Create New Account!

Fill the forms below to register

Retrieve your password

Please enter your username or email address to reset your password.