A developer is creating a Lightning web component that displays a list of records in a lightning-datatable. After saving a new record to the database, the list is not updating. What should the developer change in the code above for this to happen?

QuestionsCategory: Certified Platform Developer IIA developer is creating a Lightning web component that displays a list of records in a lightning-datatable. After saving a new record to the database, the list is not updating. What should the developer change in the code above for this to happen?
Admin Staff asked 4 months ago
A developer is creating a Lightning web component that displays a list of records in a lightning-datatable. After saving a new record to the database, the list is not updating.
 Image
What should the developer change in the code above for this to happen?

A. Add the @track decorator to the data variable.

B. Create a new variable to store the result and annotate it with @track.

C. Create a variable to store the result and call refreshApex().

D. Call refreshApex() on this.data.








 

Suggested Answer: D

Community Answer: C



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.

Next Post

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.