Developer forum

Forum » Templates » Email messaging Tags for Razor code

Email messaging Tags for Razor code

Shiwanka Chathuranga Dynamicweb Employee
Shiwanka Chathuranga
Reply

HI

i Need to create a fully customized Email template for Back to Stock and when i try to get either EmailMessaging:Recipient.Id or EmailMessaging:Recipient.Key only available in placeholder tags.

any idea to get that fileds value into my code block??

String notiId="{{EmailMessaging:Recipient.Id}}";  >>  This one is not working as html render after code block executes

thanks


Replies

 
Nicolai Pedersen
Reply

Hi Shiwanka

When sending emails in Email marketing - which is being used for back in stock notifications, you can use the context of the pageview to get hold of the userid the current page is being generated for:

If Not IsNothing(pageView.Context) Then
                userId = Converter.ToInt32(pageView.Context.GetValue("UserID"))
End If

BR Nicolai

 

You must be logged in to post in the forum