List view refresh

I want to refresh List view when i back to lead

It will auto refresh when opening the doc and back to the list.

its working
“When I open the Lead form and refresh it, then return to the list view, the list view does not refresh. Can you help me solve this?”

But what is your problem with that? Do you mind? Let me know if there is any issue. Without issue how can I help you. It’s a basic structure.

"I have a Lead in the Lead list view where I added an href link to the address column (e.g., 38, Ab Rd N). When I click on it, it redirects to Google Maps.

However, when I open the Lead, refresh it, and go back to the list view, than not redirects on google map

I think, you have to use the listview client script and refresh the listview.

listview.refresh();

frappe.listview_settings[‘Lead’] = {
hide_name_column: true, // Hide the last column which shows the name
add_fields: [“street”, “name”], // Fetch street and name fields for the list view

onload: function(listview) {
    console.log('Lead list view loaded');
},

formatters: {
    street(val) {
        // Debug: Log the `street` value
        console.log(val);
        if (val) {
            // Create a Google Maps link using the `street` value
            return `<a href="https://www.google.com/maps?q=${encodeURIComponent(val)}" target="_blank">${val}</a>`;
        } else {
            return '';
        }
    },
}

};
“This is my code, and it’s working properly. However, when I open a Lead, refresh the page, and then go back to the list view, it stops working.”

also add this.

    refresh: function(listview) {
        listview.refresh();
    }