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
TMangoTMango 

URLENCODE and Email Templates

I am trying to build an email template that will pass across some merge fields to ClickTools for a survey.  Because I want to pass across the Case Owner name and the Request Type name, I need to use the URLENCODE function to ensure that they are sent in the email as a hyperlink.  However, when trying to encode the Request Type, I am getting stuck.  Here is the URL I am using:

 

http://www.clicktools.com/survey?iv=[CLICKTOOLS ID]&q1={!Case.Date_Submitted__c}&q2={!urlencode(Case.OwnerFullName)}&q3={!urlencode(Case.Type)}

 

Here's what gets populated in the email:

 

http://www.clicktools.com/survey?iv=[CLICKTOOLS ID]&q1=1/18/2011&q2=Toni+Mangone&q3=

 

If I take the encode out of the hyperlink, it works --- but cuts off at the space in the Request Type field.  For example, for a Request Type of Enhancement Request, I want to pass the following:

 

http://www.clicktools.com/survey?iv=[CLICKTOOLS ID]&q1=1/18/2011&q2=Toni+Mangone&q3=Enhancement+Request

 

but without the URLENCODE I end up passing

 

http://www.clicktools.com/survey?iv=[CLICKTOOLS ID]&q1=1/18/2011&q2=Toni+Mangone&q3=Enhancement

 

What am I doing wrong with the syntax?  How do I get the case Type field to pass across correctly?