Hi,
I have a requirement where emails would have a link called "webversion". On clicking this a new tab will be opened on the browser and the screen would show all the email contents - it would be replica of the email.
I created multiple blocks for this and tried to pass them using if condition but this looks like a very bad approach as I have a structure as input for emails and I can't pass them on screen. I read in this post that I should JSON serialize/deserialize the data when passing to screen. But how would I do it when passing data from an email?
I want to understand on how YOU would approach this if you had to.
Thanks,
Aman Devrath
For those variables where the system won't let you pass them directly, you'll need to store the data in the database and do a query in the prep of the email to pull it.
If you have a BinaryDataID, that one will be easy, for the list structure we have built temporary tables that are filled, used, and then deleted periodically via a cleanup timer. You could store the information and just pull it direct as well if you don't need to create or delete it.
RAD Manage
Aman,
In the past we have done this as well.
There are two different directions you can go.
You can create a block/page that is identical to the email and just send the user to it with all the correct inputs. This has the benefit of being interactive.
Alternatively, you could use a component to extract HTML from a page that only the server can hit for displaying the content, and store then use the extracted HTML on the page with javascript or a forge component.
The benefit of this is that the 'pages' become fairly static and more like an email, thus will load much quicker as there would only be a single database call instead of whatever is involved in generating your emails.
Good luck with your project!RAD Manage
Hi @RAD Manage ,
I liked your first approach since it suits me better. But I have a list inside structure (refer image below) and also 1 binary content for map. I can send all other values as separate input parameters, but I'm not able to send these two.
Anu suggestion for this?
Regards,
Aman
Understood.
I had a work around in the service action(BinaryDataToText() and JsonSerialize()) before sending the email, and passed that information to input variables. But I got another issue raised here. Whenever I add a new link with input parameters to the email template, it does not send the data and breaks my email template.
If you have any idea about that, please help me in the other post.
Thanks again,