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
hhuiehhuie 

Possible to use Today's date in a link on a Visualforce Template?

First time using Visualforce to send out emails and running into a little issue.  We're sending out an Visualforce email on a custom object where we want the recepient to clicks on a link to approve the order and to automatically enters today's date into a field.  The issue I'm running into is that the date that is being populated seems to be the date of when the email has been generated.  Can someone the best way to enter today's date when the recepient clicks on the link?

 

Code:

 

<a href="https://cs3.salesforce.com/{!relatedTo.id}/e?retURL=%2F{!relatedTo.id}&00N50000001y9gY={!month(TODAY())}/{!day(TODAY())}/{!year(TODAY())}&save=1"><b>Approve</b></a></center>

 

Thanks

Best Answer chosen by Admin (Salesforce Developers) 
hhuiehhuie
We've created a workaround for this by linking to a button that's sitting on this custom object which would enter today's date into the field.