Hi,
Is there any way to clear cache via javascrip
@makarand_b thanks but is not working with my requirement
my requirement is when i submit a doctype xyz i wrote a code for updating value of field abc in doctype mno
and i is updating sucessfully but it when go to doctype mno i was getiing a non updated but when i refresh i will get updated value
can u help me to find the better solution
Hello @shahid_ecit,
You can you location.reload(); to reload form view.
reload will automatically clear the cache.
Thanks
@yogendrasinh
thanks
but when i use location.reload on onload or refresh browser get refreshes infinitly
Hello @shahid_ecit,
Here is the example:
frappe.ui.form.on(‘Delivery Note’, {
on_submit: function(frm) {
location.reload();
}
});
for more clarification, can you share the code here?
Thanks
Please tell me how to make the page refresh before opening the document?
found the solution myself, added custom script:
frappe.ui.form.on(‘doctype_custom’, {
refresh(frm) {
frappe.ui.form.on (‘Stock Entry’, {
refresh:function (frm) {
location.reload ();
}
});
}
})