Skip to main content

Questions tagged [refreshapex]

The tag has no usage guidance.

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

Using LWC refreshApex after component is rendered

Do you have any idea if there is a way to call refreshApex after component was rendered? Let's say we will have a mobile page in the app and I want to have the newest data everytime I open the page on ...
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 ...
0 votes
1 answer
72 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 ...
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 ...
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/...
3 votes
1 answer
338 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 ...
0 votes
0 answers
280 views

getrelatedlistrecords is not getting refreshed

@wire(getRelatedListRecords, { parentRecordId: '$recordId', relatedListId: 'Histories', fields: '$fieldHistory', }) wiredFieldHistory({data, error}){ if (data) {...
0 votes
0 answers
199 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(). ...
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 = '...
0 votes
2 answers
370 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); ...
1 vote
1 answer
327 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 ...
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 ...
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-...
0 votes
1 answer
110 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 ...
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 ...
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 ...
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 ...
0 votes
1 answer
824 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 <...
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 ...
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){ ...
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 ...
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 ...
1 vote
1 answer
175 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 ...
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 ...
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({...
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 ...
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 (...
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",...
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(...
0 votes
1 answer
564 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 ...
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 ...
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 ...
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 ...
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. ...
0 votes
1 answer
379 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 ...
0 votes
1 answer
678 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 ...
0 votes
0 answers
1k views

refreshApex not working in lwc datatable after update

I am using lwc datatable to get task records which are related to Account and Lead. Then i am using row action to display task details and update the task. Once i am updating the task, i am marking ...
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 ...
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 "...
0 votes
1 answer
591 views

Retrieving an Updated Read-Only Value (Case.IsClosed) In OnSuccess of LWC - refreshApex, event payload unsuccessful

I am writing a LWC to replace the Case Close screen which is not available in Lightning if Case Tracking is on. In the lightning-record-edit-form the user sets the Case Status field. Some of the ...
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, ...
0 votes
1 answer
178 views

Refresh a Lightning Web Component when fields of a lead record are edited [duplicate]

Is there a way to refresh a lightning web component after a record has been edited? I have a LWC on a lead record layout, and I want the LWC to be refreshed when I edit fields in that lead record ...
0 votes
0 answers
349 views

Updating lightning web component on record update

I have a lightning web component added to a custom object's lightning record page.That lightning record page also has standard record detail as one of the components.Whenever record is updated using ...
0 votes
1 answer
337 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 ...
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'); ...
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 = ...
0 votes
1 answer
231 views

refreshcapex in LWC is not triggered when I am calling it from child component

<c-datatablelwc config={config} onrowaction={handleRowAction} > </c-datatablelwc> datatablelwc is a utility LWC which holds the standard datatable component, actually it is also has one ...
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 ...
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 : ...
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'; ...