You need to sign in to do that
Don't have an account?

Update field in salesforce , when clicking on a Link sent in Email
I want to update a salefsorce field based upon User's Response. Basically a Link is sent To user via Email, if user clicks on that a link, then a field in salesforce should get updated, and display a VF Page message "Thanks for your response".
Hi SK_Singh,
A DML Statement on Page display is frowned apon by Salesforce.com and it is disallowed in the controller (Page Display) method in your Customer Controller Class however it's still technically possible via the VF page action.
As you have given us no actual sample use case, I will make one up for you.
USE CASE
I have an email that will be emailed to a customer with 2 links. Issue Solved and Issue Not Solved. I require this to update the field Status__c of a single record in my custom object Customer_Issue__c.
1) Create an email template on the Customer_Issue__c and merge the Id of the record into 2 links below.
2) Create a Visualforce Page named MyCustomVFPage and show this on your default website (Setup | Develop | Sites | Default website | Site Visualforce Pages )
VF Page
Apex Class
Hi zachbarkley, I wanted to impliment this feature into our Salesforce.
I currently have a workflow setup that when triggered it sends an email to my recipient (lookup list), This email template has account information and dates to book the job. I want the recipent to be able to click a link from that email template "Confirm" or "Cannot Do" and in turn, have this automatically update a field with the response.
CAn you please advise?
Thanks,
Clayton
Hello HappyPics,
The above approach suggested by zachbarkley should work.
If you have ant question then let me know.
Thanks,
Sumit Kuamr Singh
I am not a developer so I need to know how to go about implimenting this?
You need to create a site/ public page.
send the link in "href" attribule while sending the email.
When the user will click on the link it will get redirected to the "thank you" page , where update will be done.
If you have any further doubt , add me on skype sumit3887, I would be happy to help you.
Thanks,
Sumit Kumar Singh
Hi Sumit,
I have followed the process as above and everything seems to be working in my Sandbox but once I deployed to Production I am now getting the following error:
Authorization Required
You must first log in or register before accessing this page.
If you have forgotten your password, click Forgot Password to reset it.
As far as I can tell the Site User has all the right permission and field level security has been set to make the field editable by the profile. Do you have any suggestions as to why I might be getting this error?
Thanks,
Rach
Thank you for posting the instructions. I'm trying to accomplish something very similar but ran into an issue with the apex class:
__________
"Error: Compile Error: Non-void method might not return a value or might have statement after a return statement. at line 10 column 9"
__________
I have the site, email template, and visual force page setup - no problems.
Any help is greatly appreciated.
Thank you,
Alex
was there any solution on this problem?
I run into the same problem: If I try to invoke the "update" of the contact right away when I open the URL, I get this error:
Authorization Required
You must first log in or register before accessing this page.
If you have forgotten your password, click Forgot Password to reset it.
If I place a button on the website, that starts the UPDATE method, it works just fine.
Kind regards
Alexandra