I am creating notes manually on a before relationship save hook of an email. So the note's information gets populated from the email. The problem now is that how to I get the attachments from the email and then put that information into a note. So far what I've gathered is that the file_url is a not db type value so its not as simple as writing some sql and then writing the result to the note bean. So the url must be generated either somewhere in the underlying sugar php libraries or sidecar.
I've also learned that the attachment information is stored in a note if that make sense. So every time an attachment is added another note is created. Notes are apparently a very reusable module in sugar.
Any information on this subject would be very helpful