The RefreshApex implementation in the Lightning Web Component

Webner Solutions
1 min readDec 14, 2021

--

The RefreshApex implementation in the Lightning Web Component
The RefreshApex implementation in the Lightning Web Component

The refreshApex() function is used when we want to refresh the page data in lightning web components. We can update the wire function or parameter data using refreshApex (), and then component values will be rendered. Refresh apex works only when you pass the complete response as the argument.

Syntax to call the refreshApex function -

refreshApex(Argument)

Example to show how to refresh wire function data retrieving the contact list in LWC

Note: A record will be deleted only if there is no associated data linked to it.
If there is a change on the server-side, the refreshApex() only updates the list and the browser cache; otherwise, nothing is changed.

Webner Solutions is a Software Development company focused on developing Insurance Agency Management Systems, Learning Management Systems and Salesforce apps. Contact us at dev@webners.com for your Insurance, eLearning and Salesforce applications.

Originally published at https://blog.webnersolutions.com on December 14, 2021.

--

--

Webner Solutions
Webner Solutions

Written by Webner Solutions

Our team in Salesforce is very strong, with in-depth knowledge of Salesforce classic and Lightning development as well as the Service cloud.

No responses yet