Questions tagged [refreshapex]
The refreshapex tag has no usage guidance.
55
questions
0
votes
0
answers
41
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().
...
0
votes
2
answers
47
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
65
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 ...
1
vote
0
answers
51
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
1k
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
64
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
486
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
26
views
Facing issues while using refreshApex on child component when triggered from parent component
I want to refresh data on child component when a form is submitted in parent component
Parent comp:
handleSuccess(event) {
event.preventDefault();
this.template.querySelector('c-...
0
votes
0
answers
21
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
604
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
414
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
<...
0
votes
0
answers
26
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){
...
1
vote
1
answer
100
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
943
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
938
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
230
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
64
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 (...
0
votes
1
answer
587
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
1k
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
347
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 ...
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 ...
0
votes
1
answer
362
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
900
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
300
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
521
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
912
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
2k
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
2
answers
2k
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 ...
1
vote
2
answers
4k
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
1
answer
491
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
158
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 ...
1
vote
0
answers
1k
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
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
0
answers
312
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
314
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 ...
3
votes
3
answers
5k
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
1
answer
767
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
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
184
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
469
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 : ...
2
votes
1
answer
381
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'...
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' ...
2
votes
1
answer
960
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 ...
0
votes
2
answers
1k
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';
...
0
votes
1
answer
506
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 ...
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 ...