function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Ravi sastriRavi sastri 

How to embed Account owner Id with VIsualforce email template

Hello Developers,
I have some email templates which will be sent to end users by account owners. These email templates are of Visualforce type. They contains links which will be redirected to outside of salesforce. Everything is working fine here. But, when the user clicks the URL and when it moves outside of salesforce, it does not store any of account owner information. Due to this, the account owner is not able to recieve his/her credits.
Can anyone of you help me with how to store(embed) account owner information along with the URL so that the account owners can recieve their credits.

Thank you in advance
Ravi
GhanshyamChoudhariGhanshyamChoudhari
in visualforce template, when you are creating link let say https://www.google.co.in/search?q=salesforce
you can use '&' and pass key and value to URL.The value you can create dynamically like https://www.google.co.in/search?q=salesforce&owner={!Account.Owner.name}
 
Ravi sastriRavi sastri
Thank you very much for your concern. I've tried your solution, but it is throwing following error "Error: Unknown property 'core.email.template.EmailTemplateComponentController.Account'"
P.S: The email template is of visualforce template format
Can you please help me with this
GhanshyamChoudhariGhanshyamChoudhari
Please try below
https://www.google.co.in/search?q=salesforce&owner={!relatedTo.Owner.name}
Ravi sastriRavi sastri
HI Ghanshyam,
I've keep it simple here. I have a variable "User-DistId" which pulls Text field from Account. It is working fine when it is placed in the page. But when I render it in the URL, it is showing as a text. How to pass this value in URL?
Can you please help me with this?

Thanks,
Ravi