function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Vanitha ManiVanitha Mani 

How to refresh the lightning component page

Hi,

I have lightning component which opens when the button is clicked from case page as a modal..i got progressive indicator steps..i created a form to add the record ..when it is created the page comes with recent records ..I need to refresh it to view the newly added record.

User-added imageUser-added image<h1 class="slds-text-heading--small">Below are the 5 most recent work time entries</h1>
            <br/>
        </div>
                </div>
                             
                            <table class="slds-table slds-table_bordered slds-table_cell-buffer">
        <thead>
            <tr class="slds-text-title--caps">
                
                <th scope="col"><div class="slds-truncate" title="Id">S.No</div></th>
               
                <th scope="col"><div class="slds-truncate" title="Work Date">Work Date</div></th>
                <th scope="col"><div class="slds-truncate" title="User">User</div></th>
                <th scope="col"><div class="slds-truncate" title="Minutes">Minutes</div></th>
                <th scope="col"><div class="slds-truncate" title="After Hours">After Hours</div></th>
                <th scope="col"><div class="slds-truncate" title="Reason">Reason</div></th>
                
                
            </tr>
        </thead>          
        <tbody>
    
               <aura:iteration items="{!v.timeList}" var="time" indexVar="sNo"  >
              
                       
             
                   <c:Inlinechildtime single="{!time}"  sNo="{!sNo + 1}"/>
                   
            </aura:iteration>
            </tbody>
            </table>
                            <br/>
                            <br/>
                            <center>

This table should get refreshed when new record is added..
Nisar AhmadNisar Ahmad
If you are using the wire method for fetching records for this variable "timeList". Then call refreshApex after saving a record.
Refresh Apex More Details: https://www.salesforcepoint.com/2020/08/lwc-refresh-apex-Example.html

else you are using the apex imperative method for fetching records for this variable "timeList". Then call again apex method after saving a record.

Thank You
- Nisar Ahmad