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
Ashish Kumar YadavAshish Kumar Yadav 

how to refresh after delete the record from table in vf page

Hello team,

after delete the record table in not refresh please help me regarding this.

below is my vf code
===================

     <div class="slds-col" style="margin-top:10px;">
                    <p style="font-weight:600; padding:10px;">Distributor / Retailer List</p>
                </div>
            </div>
           
            <div style="border:1px solid #ccc; margin-top:0px;" class="slds-scrollable_x"  >
                 <apex:outputPanel id="TablePanel">
                    <table class="slds-table slds-table_cell-buffer slds-table_bordered slds-table_col-bordered slds-table_striped">
                        <thead>
                            <tr class="slds-line-height_reset">
                                <th class="" scope="col">
                                    <div class="slds-truncate" title="">Account Name</div>
                                </th>
                                <th class="" scope="col">
                                    <div class="slds-truncate" title="">SF Customer Code</div>
                                </th>
                                <th class="" scope="col">
                                    <div class="slds-truncate" title="">SAP Customer Code</div>
                                </th>
                                <th class="" scope="col">
                                    <div class="slds-truncate" title="">Action</div>
                                </th>
                                
                            </tr>
                        </thead>
                        <tbody>
                           
                            <apex:repeat value="{!membs}" var="awl" >
                            <tr class="slds-hint-parent">
                                <th scope="row">
                                    <div class="slds-form-element__control">{!awl.Account__r.Name}</div>
                                </th>
                                <td data-label="" class="fromvalue">
                                    <div class="slds-form-element__control">{!awl.Account__r.SF_Customer_Code__c}</div>
                                </td>
                                <td data-label="" class="fromvalue">
                                    <div class="slds-form-element__control">{!awl.Account__r.SAP_Customer_Code__c}</div>
                                </td>
                               
                                <td data-label="">
                                     <apex:commandLink styleClass="slds-button slds-button_destructive"  value="Delete" action="{!showassigndel}" reRender="TablePanel" onclick="if(!confirm('Are you sure?')) return false;"  >
                                       <apex:param name="schemeId" value="{!awl.id}" assignTo="{!showdelId}"/>
                                    </apex:commandLink>
                                </td>
                            </tr>
                            </apex:repeat>
                                
                        </tbody>
                        
                        <tbody>
                            <apex:repeat value="{!searchList }" var="swl" >
                                <tr class="slds-hint-parent">
                                    <th scope="row">
                                        <div class="slds-form-element__control">{!swl.Account__r.Name}</div>
                                    </th>
                                    <td data-label="" class="fromvalue">
                                        <div class="slds-form-element__control">{!swl.Account__r.SF_Customer_Code__c}</div>
                                    </td>
                                    <td data-label="" class="fromvalue">
                                        <div class="slds-form-element__control">{!swl.Account__r.SAP_Customer_Code__c}</div>
                                    </td>
                                    
                                    <td data-label="">
                                        <apex:commandLink styleClass="slds-button slds-button_destructive"  value="Delete" action="{!Remove}" reRender="TablePanel">
                                            <apex:param name="schemeIdParam" value="{!swl.id}" assignTo="{!delId}"/>
                                        </apex:commandLink>
                                        
                                    </td>
                                </tr>
                            </apex:repeat>
                        </tbody>
                    </table>
                </apex:outputPanel>
            </div>
ShirishaShirisha (Salesforce Developers) 
Hi Ashish,

Greetings!

YOu can achieve this using the pageRefresh refreshTable() to refresh the page after deletion.Please find the sample code in the below thread:

https://developer.salesforce.com/forums/?id=906F000000098UkIAI

Please mark it as best answer if it helps you to fix the issue.

Thank you!

Regards,
Shirisha Pathuri
Ashish Kumar YadavAshish Kumar Yadav
already check it.
Dushyant SonwarDushyant Sonwar
Please post your apex controller also , as that will help others to identify the issue you are facing.
Ashish Kumar YadavAshish Kumar Yadav
Hi Dushyant,

find below code-

 public PageReference Remove(){
        System.debug('delId'+delId);
        Scheme_Assign_Master__c  delacc=[select id from Scheme_Assign_Master__c where id =:delId limit 1];
        System.debug('delacc'+delacc);
        if(delacc !=null){
            try{
                delete delacc;
                ApexPages.addmessage(new ApexPages.message(ApexPages.severity.CONFIRM,' Remove Scheme to Distributor / Retailer Successfully.'));
            } catch(DmlException e){
                ApexPages.addMessages(e);
            }
        }else{
            ApexPages.addmessage(new ApexPages.message(ApexPages.severity.Error,'Scheme Assign Master not found !'));
            
        }
        
        
        return null;
    }
Mia JhonMia Jhon
How can you refresh a particular section of a Visualforce page? ReRender is used to refresh a particular section of the visual force page. Thanks if you make a seprate post about this please let me know ill use this tag in my game mobile legend Ml Skin https://thenoobgamerz.com/ml-skin-hack-apk/
Mia JhonMia Jhon
Looking for a website to download free TikTok videos (https://ssstiktok.vip/)? Look no further than SSSTikTok.vip! This website offers a free video downloader that is simple to use and fast. Just enter the URL of the TikTok video you want to download and click the "Download" button. That's it!
Mia JhonMia Jhon
ST Courier Tracking is a feature that allows you to track your courier’s progress as they make their way to your door. You can track your courier’s progress by entering their tracking number into the tracking portal on the ST Courier website https://stctracking.com/. Once you have entered your tracking number, you will be able to see where your courier is and how long it will take them to reach you.
Emma emma12Emma emma12
VRL Tracking is a versatile and affordable GPS tracking (https://vrltracking.net/) solution that can be used for a variety of applications. It is perfect for tracking vehicles, assets, and people. VRL Tracking is easy to use and comes with everything you need to get started.
Emma emma12Emma emma12
DTDC Courier (https://dtdctracking.org/) Tracking is a service that allows you to track the progress of your courier delivery. You can track your courier by entering the tracking number into the tracking system. The tracking system will provide you with the latest information on the status of your courier delivery.
jeryy wickjeryy wick
Amansala resort is best for bootcamp you can boot camp at amansala. (https://www.amansala.com/) everyone can check there and can select the plan for you. you can get yoga classes, beach bootcamp and many more for you.
jeryy wickjeryy wick
Beach bootcamp (https://www.beachbootcamp.com/) visit and book your resort for vacations and yoga classes.
jeryy wickjeryy wick
You can get bikini bootcamp (https://www.bikinibootcamp.com/) service in tulum. Enjoy your wellness vacations.
jeryy wickjeryy wick
silo sanctuary (https://www.silosanctuary.com/)is best for magic mushroom retreat.
jeryy wickjeryy wick
restore and renew (https://www.restoreandrenewtulum.com/) is best resort.
Monotosth SahMonotosth Sah
Well, thanks for the code. That has helped me to build this game Nulls Brawl APK indir (https://storage.googleapis.com/nullsbrawl/index.html" target="_blank).