I am trying to automate the sending of sales invoices generated through financial force. I would like a one click process which fetches the outstanding invoices, bulk emails them and then marks them as sent.
The problem I have run up against is the bulk email service wont let me specify an invoice id for the WhatIds. The TargetObjectIds are a list of contacts and the WhatIds need to be the invoices so the template can successfully generate the attachment.
It seems like I can use the single email service to do this as it doesn't have the same restrictions on the WhatIds but I have hundreds to send at a time.
Does anyone know how this can be achieved or how Financial Force does it with their mass email service?
Thanks
EDIT: The reason I am doing this rather than using the FF bulk sender is because after a successful send I need to have the invoices marked as printed.