I remember reading somewhere a way to attach an em...
# suitescript
r
I remember reading somewhere a way to attach an email to multiple transactions at once, while sending it using email.send through relatedRecords, transactionId params. Can someone provide the exact syntax if its possible?
j
email.send({ author: senderId, recipients: recipientId, subject: 'Test Sample Email Module', body: 'email body', attachments: [fileObj], relatedRecords: { entityId: recipientId, customRecord:{ id:recordId, recordType: recordTypeId //an integer value } } });
r
This is for a single transaction, how to do it for more than 1.
j
I dont think is possible to relate multiple transaction with only one call of email.send, probably the best curse of action is relate the message to the transaction with email.send and then use record.attach, however message recordtype an internalid is required, not sure how to found those but I will try to perform a (message?) saved search( or query) or load the record and see if the id is there. Also you can use the already related email and record to tray to do some reverse engineering and see how emails are saved