I have a custom object that gets created via a Flow, in that Custom Object I have a 'Type'
and if Type is "A"
then it allows users to UploadFiles, these files then end up in Related Files.
I need to grab this file and put it into an email to do that I first need to have a Unified Name for that File so I can Query and grab it, in order for that to happen I need to be able to change the file name to 'Error Wow ' or anything so when I am doing an Email send process I can Query [SELCT File from Attachments where Name = 'Error WOW']
or something like that.
Is there a way of doing this, I been reading all over I found a great code in this post but it didn't work it kept on giving me errors.
Please let me know what else I can do or if there is another way of sending an Email from Apex and grab every attached file related to that record without having to know the name of the file.
Thanks in Advance!