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
Giancarlo AmatiGiancarlo Amati 

HTML Email link change case status

Dear Team,
I am creating a email template in VF and I would like to include a link at the bottom. 
The link will ask the customer if the case is resolved or not. Something similar to the bottom of the shot. However, we'd like to ask the customer if the chase is "Resolved" or "not resolved". If the case is "Resolved" is there a way to automatically change the case status to "Need to close" or "Closed" or something which updates a case field.

Thank you.User-added image
Khan AnasKhan Anas (Salesforce Developers) 
Hi Giancarlo,

Greetings to you!

Please refer to the below links which might help you further with the above requirement.

https://developer.salesforce.com/forums/?id=906F00000009496IAA

https://success.salesforce.com/answers?id=90630000000hNY4AAM

I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.

Thanks and Regards,
Khan Anas
Giancarlo AmatiGiancarlo Amati
Hi Khan,
thank you I'm gonna review the links. At first sight, what I am implementing is not a full visualforce page, but an email template that is visualforce and it kind of looks like below:

so my understanding is that I need to create a 'controller' that is a javascript. However, <messaging:emailTemplate> tag does not have that parameter in the tag. 
 
<messaging:emailTemplate subject="{!relatedTo.Subject} {!relatedTo.E2CP__Case_Thread_Id__c}" recipientType="Contact" relatedToType="Case">
<messaging:plainTextEmailBody >
{!relatedTo.E2CP__Most_Recent_Public_Comment__c}

{!$User.FirstName} {!$User.LastName}


{!relatedTo.E2CP__HistoryText__c}

***************************
Case: {!relatedTo.CaseNumber}
Status: {!relatedTo.Status}
Priority Level: {!relatedTo.Priority}

{!relatedTo.E2CP__Case_Thread_Id__c}
</messaging:plainTextEmailBody>
<messaging:htmlEmailBody >
<apex:outputField value="{!relatedTo.E2CP__Most_Recent_Public_Comment_HTML__c}"/>
<br/>

Below you can see how the links are created in my template:
 
<br/> Tells how how we are doing: 
<apex:outputLink id="caseResolvedLink" value="https://google.co.uk" >THIS CASE IS RESOLVED </apex:outputLink>
<a href="https://google.co.uk"> Good </a>, <a href="https://google.co.uk"> ok </a>, bad
<br/>

is the controller something I should put in the apex:outputLink, it doesn't look the 'controller' is one of the parameters available.

Thank you for your help.
GC