Auto Refresh page not working

Hi Team,
I want to create one script on customer doc ,(For example: when user enters a new customer, then the customer list page doesn’t reload automatically)

Thanks & Regards

Sharing the code would make us able to help you!

1 Like

frappe.ui.form.on(“Customer”, “after_save”, function(frm) {



this code i use but not work

this code will reload the customer doc. customer list view is separate. Try searching list view customization

Can you please help me for the list ?

I added for list but it is not working

frappe.ui.form.on(“Customer”, “after_save”, function(frm) {

Try this and see if it solves your problem. It will route to list view after you save the customer.

frappe.ui.form.on("Customer", {
	after_save: function(frm) {
		frappe.set_route("List", "Customer");

no this is not working .I think the custom script is not working for the list view.??

window.location.reload(); on .js file.

which .js file ?

Where you are facing this problem?
If its on customer, it should be on customer.js file.
Note: You can’t directly make changes in core, you have to customize it.

Refer this Customize ERPNext