[Event Request] OnBeforeSendEmail (DocumentMailing.Codeunit.al) source record missing
referring #4349
We are missing the needed info to identify the source record correctly. We could use ReportUsage and PostedDocNo, but this doesn't work for not posted documents. The ReportUsage for invoices and credit memos is for both invoice. We see the following options to solve this: Provide a different ReportUsage for credit memos or adding the RecordVariant context to the event.
Do you have any status update on this, please?
Any timeline on this?
@wdet, @daansaveyn, we haven't forgotten your issue!
We are just discussing the best solution.
Can you help us by providing more context? Why do you need to access the record before sending it?
We are using the OnBeforeSendEmail event to override the default mailing behaviour. Here we compose an email message based on some own setup tables, but we are missing the source record to add the correct content to the email.
I'm interesting too by this change and possibility to use the RecordVariant. Any update on this ?
We were busy getting the new email module fit and finished. Now that it is out, we are looking into adding a link from the mails to the source records. We do have quite a few requests and these "mini feature requests" hence do take some time to get processed. But on this particular issue, we do have a developer investigating our options :-) We hope to be able to get back to you with a solution for the next major release (no promises though).
This is indeed going to ship with the next major :-) If the new implementation doesn't fully meet your requirements, please create a new issue for us - or even better, create a pull request for us.