I have an object ProjectDocuments, which is an attribute of Project (multiple allowed), of type ProjectDocument
ProjectDocument has an attribute attachment of type document.
I wish to send emails and include certain attachments (I have a SendToVendorFlag as a YesNo to use as a filter).
So, my outgoing email object GenericVendorEmail has Attach1, attach2, attach3, attach4, and attach5 attributes, of type document.
How do I iterate over ProjectDocument to assign these to attach1-5 in GenericVendorEmail