Ability to pass in a record to an Email

On our radar
I find it odd that I can't pass in a record to an email.  I can pass in the entity identifier but not the entity record itself.  For example, if I have a customer entity, I can't pass in the customer record to the email but I can pass in the customer identifier.  I already have the record; why would I want to do another fetch in the email preparation?
Created on 11 Mar 2015
Comments (5)
David -

I would like to see this done too, though I suspect we won't see it... under the hood, Emails are fairly different. They get called via an internal Web Service for example (if you ever have an email blow up in its prep you'll see what I mean). I suspect that presents some technical hurdles and it is why Emails act a bit differently.

Another known difference: if you use multi tenancy you'll see that the email's prep doesn't run as the same tenant that you called the email from, you need to pass a tenant ID in and do a tenant switch in prep...

Thanks for the feedback Justin.  What you describe does makes sense.  We are not in a multi-tenancy environment so I haven't had to pass in an ID or seen an email blow up yet.  Actually looking forward to seeing that.

Thanks again Justin,
As a work around (using the ardoJSON component), try converting the record to a JSON string, then pass the string parameter to the email and convert back to a record inside the email preparation. 
Thank you Isak.  Never thought about trying that.
I've always thought the main reason is that e-mail is conceptually a web screen, so it's only possible to pass simple parameters, just like web screens. But it is indeed really a pain that it's not possible to pass data sets. Liked!

P.S. @J.Ja: I've never experienced an exception in an e-mail preparation, but I'm sure to try now :).