Would someone be willing to review this sample customization and confirm if it’s a bug that needs to be reported, or if I’m not attaching the file correctly?
You can see the screenshots below, showing the UploadFile.Name field in the Database, before and after sending the email. This change to the file name happens during the PXNoteAttribute.AttachFile() method call. The record key fields in the file name are changed to a GUID.


I was able to solve this by programmatically creating a copy of the file, then attaching that to the email. However, we really don’t want to be creating that many duplicate files.
This causes an issue in our production instance: We have a lot of revisions on our sales orders, and with this bug, when new files are uploaded after sending the email, a duplicate is created, rather than a new file revision, because the names don’t match anymore.