Hello everyone,
When I attach file in my custom doctype, it triggers the save event automatically.
and i created a notification for job interview like when we click on save it sends notifications,
This leads to unwated notification sent, This is creating inconvenience. Please help.
i want to stop auto save after attaching a document.
Using Frappe Version 14
@NCP
can you please elaborate where and how to do that, i saw your link but confused.
this.frm.doc.docstatus == 1 ? this.frm.save("Update") : this.frm.save();
i don’t know much about code.
do i need to add this code somewhere ?
Thank You
NCP
May 17, 2024, 11:11am
4
To stop the auto-save when attaching an attachment, comment out the specific line in the attach.js file.
so i need to open the attach.js file and modify these lines ?
this.frm.doc.docstatus == 1 ? this.frm.save("Update") : this.frm.save();
Please correct me
and i need to open the attach.js file via terminal or vs studio right ?
can you share the path of attach.js file.
Much appreciated.
Thank YOU
NCP
May 17, 2024, 11:15am
8
How many times do I have to explain it to you
The path is already given in the reference above. Look carefully and apply. I explained the same thing to you twice.
1 Like
@NCP brother sorry to bother you i’m on learning phase,
is this the correct command to stop save- // this.frm.doc.docstatus == 1 ? this.frm.save(“Update”) : this.frm.save();
Thank YOU
NCP
May 17, 2024, 11:19am
10
It’s not a command, it’s a js code. You just have to comment out that line.
// this.frm.doc.docstatus == 1 ? this.frm.save("Update") : this.frm.save();
Then reload Ctrl +Shift +R and check it.
@NCP
oh i need to remove that line you mean right ?
@NCP hi,
the js code is working fine in the local development mode, but when i tried the same in the production mode it’s not working.
NCP
May 20, 2024, 8:51am
16
In production mode, you have to restart the bench or migrate the site.
Also run the bench build --force
okay will try and update you, thank you .
where i can learn about these commands and meanings ? any reference .
Thank you
Thanks alot , will check the save issue and update you