Email Doc Automatically Add Attachments

I’ve set up an automatic email to go off when a purchase order is submitted. A part of that is that I want to attach some documents to the email, which I know can be done by attaching them to the doc before submitting. However, is there a way to automatically force the system to check off the Add Attachments checkboxes for each attachment?

Right now, it lists them all but doesn’t check them off. This could be a bit of a pain as I’m expecting to have some emails with dozens of attachments, and I also don’t want anyone to forget to check them off. I’ve got a custom app going, so I can use hooks, custom scripts, etc.

You can do this by customization. See doc_events in

Yes - I know I need to customize and I know that is a possible route, but I am looking for more specific information.

Anyways, it appears to me that this is a client side screen, so I think the fix might be client side driven. I’ve tried to figure out how this popup gets called so that I can see how to best trigger these boxes but haven’t had any luck.

I’ve done a fair bit of investigation and gotten nowhere, so I’m looking to the forum for specific suggestions on how to have these checkboxes physically checked off when the email dialog loads.

I have the same request one the client side.

Did you ever have any luck? I’m trying to make ‘Send me a copy’ auto checked but can’t figure it out.

There is a way to do it by editing the code for that pop up to load with the button checked, but it means editing the base code of erpnext, which isn’t ideal. If you want I can look up how I did it and post.