Skip to main content

Questions tagged [refreshapex]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
6 votes
0 answers
2k views

How to refresh LWC component using getRelatedListRecords when related record edited

I have a component rendering a list of records related to the record on which the component is displayed using getRelatedListRecords (Beta). //Get Related List Records Info @wire(...
MooseAteJack's user avatar
4 votes
1 answer
3k views

Working with refreshApex in LWC

I have one wire method in JS, when it finishes processing it sets this.showSpinner = false, everything is working as expected. @track showSpinner = true; @wire(getApexStudyData, { objectId: '$objId' ...
gs650x's user avatar
  • 2,680
4 votes
1 answer
659 views

lwc wired variable in refreshApex throws "resolved configuration is not available"

I have worked myself through several topics here on StackExchange already, finding this one to be the most helpful: working with the refreshApex feature in LWC However, the proposed solution does ...
dschib's user avatar
  • 128
3 votes
3 answers
6k views

How to clear draft values in LWC datatable after save

I am working on an LWC datatable application in which I must call an Apex method imperatively, passing it the JSON string of the event.detail.draftValues which it uses to add or update some Sobject ...
Kent Lichty's user avatar
3 votes
1 answer
343 views

@wired method not detecting reactive parameter change when calling refreshApex

I have observed something really weird for which I haven’t found an explanation yet. I have a component (parentComponent) containing a subcomponent (childComponent). The childComponent subcomponent ...
Danny Marfil's user avatar
2 votes
1 answer
466 views

How to use refreshApex on Parent Components?

what i am trying to achieve is, when i edit an account to active = 'Yes'. My LWC component show refresh dynamically and show that active account when i click show active accounts button, but its not ...
Naveen's user avatar
  • 65
2 votes
2 answers
2k views

LWC - apex refresh of data table from data retrieved using @wire

I have a lighting web component datatable that is populated from and @wire call. Below are the key snippets from my code import { LightningElement, api, wire, track } from 'lwc'; import ...
Amul Shah's user avatar
  • 133
2 votes
1 answer
1k views

refreshApex not always working

I have a parent LWC with a list of records and a child LWC which allows the user to perform actions on the record. The child uses dispatchEvent and CustomEvent to notify the parent after changes have ...
Robs's user avatar
  • 9,386
2 votes
1 answer
393 views

refreshApex in Lightning Web Components is not working

In Custom Object i have new tab with lightning Input, On Save the Form value we need to Display the data in data table. Data is saving in my object, But Data-table is not refreshing with new data. I'...
SFDC_Beginner's user avatar
2 votes
0 answers
2k views

Refresh datatable using RefreshApex in LWC

I am new to LWC. I have questions regarding refreshApex. I was not able to find answers in the official documentation or other sites. 1) How does refreshApex know which datatable to refresh if there ...
Koustubh's user avatar
  • 1,173
1 vote
1 answer
3k views

LWC Apex data not getting the latest data from backend in SF Communities

I suppose there are two pages in Communities namely, Page A and Page B. Page A has an LWC component which has @wire method. This wire method gets the Account details of the particular user. The wire ...
Rahul Allada's user avatar
1 vote
1 answer
328 views

LWC - How to make refreshApex work with public property passing from parent

Is there any way to use refreshApex to refresh data passing from Parent to Child? I have 2 components: Parent & Child. The parent will perform logic to make the data clean then pass to Child (list ...
Pam's user avatar
  • 107
1 vote
1 answer
1k views

ILLEGAL_QUERY_PARAMETER_VALUE -- Expected '.' in all qualified names: RecordTypeId is invalid

Usecase is to get the picklist values according to the record type of the Record. selectedCaseId; caseRecordTypeId; wiredCaseRecordTypeId; @wire(getRecord, { recordId: "$selectedCaseId",...
Muskan Agarwal's user avatar
1 vote
2 answers
5k views

reload data table records after an imperative apex call in lwc

Below is just an example to showcase what I am trying to solve. I have data table that displays accounts with Active__c = 'No'. I can select the records and click Activate Account to make Active__c = '...
SfdcBat's user avatar
  • 4,811
1 vote
1 answer
1k views

Error: Refresh failed because resolved configuration is not available

I am trying to clear the cache of my wire method. But I have added refreshApex in my code but I am getting error Error: Refresh failed because resolved configuration is not available. My Code ...
Anu's user avatar
  • 3,857
1 vote
2 answers
3k views

How to refresh Data table after creating record through NavigationMixin [LWC]

I have facilitated a button to create a record through a button with help of navigation Mixin. I need to refresh my data table with a record that has been created. I am trying to refresh the data, but ...
Rahul Allada's user avatar
1 vote
1 answer
1k views

RefreshApex not working after OnSave Event in Lightning-Datatable

I'm using an apex method to update related records in a custom Related List LWC using the onsave method on Lightning-Datatable. The Apex Method is updating the records correctly, however the "...
cloudcap's user avatar
  • 187
1 vote
0 answers
64 views

Inconsistent wire service cache refresh

I have a parent component with the following html structure: Parent.html <template> <template if:true> <lightning-tabset> <lightning-tab> <lightning-...
BaronVonKissAlot's user avatar
1 vote
1 answer
176 views

How to tell if refreshApex has new data?

I am using refreshApex to get the latest data with a button. There is a possibility that there are no new changes and I want to display a message indicating there are no new changes. Question How can ...
usernameabc's user avatar
1 vote
1 answer
1k views

How to refresh only the combobox using LWC when new record is created?

I want to put the created value as a default value in Combobox using LWC So when i create new record i want it to be set a default value in Combobox JS: @wire(retrieveFields) getUserListViews({...
user avatar
1 vote
0 answers
2k views

Refresh Parent LWC on button Submit

Please read me out before marking my question as duplicate :pray I have a situation where I want to refresh my parent LWC on submit button. I have created an event to communicate from my child ...
Nupur Bhagat's user avatar
0 votes
1 answer
3k views

@AuraEnabled(cacheable=true) is not working as expected

Apex Controller: public with sharing class RefreshApexController { @AuraEnabled(cacheable=true) public static String getLabels(){ System.debug('I am inside getLabels() method'); ...
Saicharan Reddy Kasireddy's user avatar
0 votes
2 answers
2k views

Why is does refreshApex need to return the method?

Given the below LWC JavaScript: import { LightningElement, wire } from "lwc"; import getRecords from '@salesforce/apex/MyController.getRecords'; import { refreshApex } from '@salesforce/apex'; ...
Robs's user avatar
  • 9,386
0 votes
1 answer
1k views

Refresh lwc without button click or reload of page when a different record is updated

I have the following lwc, myComponent that will query related objects and display some fields when someone visits the record page of the Account record. I want to refresh the data without the click of ...
usernameabc's user avatar
0 votes
1 answer
75 views

LWC delay refreshApex until batch job completes

I have a datatable in an LWC where rows can be selected for deletion. The delete process is done via a batch job due to multiple triggers running for the object being deleted. Once I've kicked off the ...
Irene's user avatar
  • 1,849
0 votes
1 answer
568 views

Triggering Wire from Platform Event

I have an LWC that has a list of records from a custom object. I inserted this LWC on my standard Account page layout. I then created a platform event and on my trigger for the custom object I ...
Frank's user avatar
  • 435
0 votes
1 answer
380 views

Best Practice on Salesforce Refresh Integration

This is a question on best practices for Salesforce orgs that have a lot of data dependent processes (i.e. dev boxes need a lot of standard records inserted post-refresh ). I have this scenario at my ...
thinker's user avatar
  • 1,442
0 votes
1 answer
680 views

LWC performative way to use refreshApex()

its everything ok? I'd would like to know if the way that i'm using the refreshApex is the correct.... I've a lot of callback in my Apex Classes from my org datas. See in the images below: Before all ...
Matheus Coelho Campos's user avatar
0 votes
1 answer
1k views

LWC apexrefresh not updating the latest values

I'm working with simple LWC component in community which is basically a form where user can update information. During page load, wire service fetches data from apex and once user submit the form, ...
wink's user avatar
  • 17
0 votes
1 answer
338 views

RefreshApex - Dependent on Apex Method Conclusion?

I've been able to get my RefreshApex method to work correctly - however it appears the issue is that the Refresh occurs before the records are created (which unfortunately has to happen on the Server ...
cloudcap's user avatar
  • 187
0 votes
1 answer
668 views

I want to refresh the lightning-datatable automatically, if any record is edited

After editing the handleSubmit actually saves the data as shown: handleSubmit(){ var dataList = {}; //newData is records the updated data. updateMapFieldData({mapFieldData : ...
sfdcLearner's user avatar
0 votes
1 answer
111 views

Refreshing iterated Lightning Datatables

I'm having an issue getting my LWC component with multiple datatables to refresh. Background: I'm displaying lectures in multiple data tables, organized by date the lecture was created. So, if there ...
learnerforlife's user avatar
0 votes
1 answer
1k views

lwc refresh not working as expected

refreshApex isn't working for me. I'm calling it at the end of my submit and onsuccess functions but I guess I have it configured incorrectly. After I submit/save on the lightning-record-edit-form my ...
mackmama's user avatar
  • 709
0 votes
1 answer
827 views

Why is Refresh Apex not working while Inline Edit in LWC datatable?

Why is refresh Apex not working during Inline Edit? When I edit the record, even though the new value gets updated, but in the datatable the old value gets displayed. How can I fix this? .html <...
user275494's user avatar
0 votes
1 answer
2k views

Working with rereshApex async call in LWC

I am trying to work with refreshApex call in LWC to get the refreshed values for the wired data. @track records; @wire(getRecords) wiredRecords({error, data}) { if (data) { this.records = ...
Yogesh D's user avatar
  • 590
0 votes
1 answer
544 views

refreshApex in lwc is now working -- datatable

I have a custom page with vertical tab iterating the values, On click of each Tab, will display the data in data table based on the tab. In my data table i have custom button in a column, On clicking ...
SK2889's user avatar
  • 921
0 votes
1 answer
1k views

Refresh Apex not working on Lightning Record Form Save [duplicate]

I'm not able to understand how refreshApex works in LWC. Here is what i'm trying to achieve: On a web component show - Show most recent 10 records of Account a form (I used a lightning record form ...
Sagnik's user avatar
  • 615
0 votes
0 answers
74 views

i am not getting the updated record in datatable after saving the inline edits in lwc

import { LightningElement, track, wire } from 'lwc'; import getAccountNames from '@salesforce/apex/fetchKidsClubsName.getAccountNames'; import getKidsClubRecords from '@salesforce/apex/...
Sridhar Nikhil's user avatar
0 votes
0 answers
281 views

getrelatedlistrecords is not getting refreshed

@wire(getRelatedListRecords, { parentRecordId: '$recordId', relatedListId: 'Histories', fields: '$fieldHistory', }) wiredFieldHistory({data, error}){ if (data) {...
shruti rawat's user avatar
0 votes
0 answers
201 views

refreshApex() is refreshing the data but is not invoking the function decorated with wire

An LWC component uses wire service to make a callout to an external system during page load. Users are able to refresh the data by clicking the Refresh button on the UI, which invokes handleRefresh(). ...
Akif's user avatar
  • 15
0 votes
2 answers
371 views

Why wire adapted doesn't retrieve data?

@wire(fetchCustomSettings) wiredData; renderedCallback() { if (this.wiredData) { console.log('this.wiredData ##', this.wiredData.data); refreshApex(this.wiredData); ...
Fark's user avatar
  • 27
0 votes
1 answer
4k views

Refresh data table in lwc after showToast

I have an lwc which has lightning-dataTable that displays the files related list for a particular case record. As part of the 'Delete" action, I am calling apex method which deletes the selected ...
Suhasini's user avatar
  • 307
0 votes
0 answers
661 views

Trying to use Spring '23 RefreshView API from an Aura component to refresh wire data in LWC

I'm trying to use the new RefreshView API introduced in Spring '23 to fire a refresh event from an Aura component to refresh a related list wire in an LWC component (very similar scenario to this ...
Trevor Gill's user avatar
0 votes
0 answers
22 views

two lwc on record flexipage - need second to refresh when changes occur in first [duplicate]

I have two individual LWC's on a record page. From one, I can create records that I the second separate LWC to update. I am able to achieve a refresh for the LWC from which the changes are made. But ...
mackmama's user avatar
  • 709
0 votes
0 answers
30 views

refreshApex not updating datatable [duplicate]

wire method retrieves values for datatable - @track wrapperList; @track error; @wire(getQuestions,{userId:Id}) wiredQuestions{(data,error)}{ // i already tried this.wrapperList = data; if(data){ ...
swat's user avatar
  • 5
0 votes
0 answers
88 views

refreshApex not working

I have a custom lwc that needs to refreshApex once a certain button is clicked but it's not working for me. It also doesn't get recalled when I change some of its parameters: LWC: wiredZC; @wire (...
molinet's user avatar
  • 925
0 votes
0 answers
1k views

LWC Apex Refresh not working

I have been struggling to understand why my HTML is not rendering Fresh Stream of Data using Apex Refresh. I've used the cacheable method in Apex. @AuraEnabled(cacheable = true) public static ...
wink's user avatar
  • 17
0 votes
0 answers
31 views

refreshApex: can't make it work [duplicate]

Okay so I am using a lightning datatable and I want to update or more rows of a specific field. The problem is that the table is not refreshing after the records are updating so I feel like I'm ...
devoid_of_chill's user avatar
0 votes
1 answer
481 views

LWC @wire works only if page is refreshed, not when I use navigation arrows

I have a checkbox that updates another field in another page. I got a problem with @wire. To get refreshed data I need to refresh the whole page manually pressing F5. If I switch to another navigation ...
Igor Oliveira's user avatar
0 votes
1 answer
1k views

How to refresh the LWC after using createRecord

I'm creating a custom object record using uiRecordApi's createRecord method. Record creation is successful, but after that it's not refreshing the lwc to display the updated results. Below is my code. ...
sfMon's user avatar
  • 49