Take the 2-minute tour ×
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It's 100% free, no registration required.

We have a case where our users create tasks. When they create tasks, they also check the "Send Email Notification" checkbox present on the task. As a result the owner of the task, receives an email containing task details and a link to the task. However, when the user clicks on the link received in the email, he is redirected to the homepage instead of the task record detail page. I did notice one difference in the link present in the email and the actual URL that is required to navigate to the task record.

The atual URL needed to navigate to the records is as below:

https://mycompanydomain----dev-cs3-my-salesforce-com- gatewayinfo/recordId

Wheras the URL recieved in the mail is:

https://mycompanydomain--dev.cs3.my.salesforce.com/recordId

I dont understand why this difference in the URL. We are using SSO in our org. Is it the reason? We are also using Cipher Cloud to encrypt/decrypt our data. Can this be one of the reason?

I also tried this for other objects by using Workflow Email Alerts (Using Object.Link merge field). But the difference in the URL still persists.

What can be done so that the proper URL is sent in the mail?

UPDATE:

  1. Though this option is not feasible, since it would require us to do the same on all the objects, I thought I will create a formula field and get the server URL dynamically and append it with the record Id. BUT even the formula field returns the URL that we receve in the email and not the one which is seen in the browser address bar.

  2. I thought of creating a custom setting that will store the hardcoded URL and use it in E-mail template. But it appears we cant refer the custom setting in the Email Template.

  3. FOR OTHER OBJECTS: I created a formula field for few(not all) objects. The formula refers the custom setting I created as mentioned in point 2 . And I am referring this formula in the mail alert. This works for those objects.

  4. FOR TASKS: As workflow email alerts are not allowed. I had to write a trigger for tasks(in this case I am simply referring the custom setting). This also works.

SO now at this point I have a working solution but one which is not a good solution I think. The reason I say its not a good solution is because I would need to do the same thing for all objects involving email alerts.

Hence, I want to know if there is something generic by which I can pass the proper link.

share|improve this question
2  
Given this is standard functionality, I'd recommend creating a case with Salesforce support to get this addressed –  Ralph Feb 19 '13 at 16:26
    
Thanks Ralph. I think I wont be able to do that as our company has compliance issues. Usually when we raise a case, most of the times, salesforce admins ask to grant them access to the org. My company wont allow me to do that. –  Shailesh Deshpande Feb 21 '13 at 14:10
    
If that is the case @ShaileshDeshpande, I would not post that information anywhere on the internet, including a Salesforce site where Salesforce employees frequently visit... –  Jesse Altman Feb 21 '13 at 14:20
    
Thats the reason for not mentioning the domain name and the gatewayinfo :) . Tried my best to make the question understandable without giving those details. Can't do anything much. –  Shailesh Deshpande Feb 21 '13 at 14:30
    
Yikes, that's a bear of a policy. If that's the case I'd try emulating your companies setup in a developer or trial org and granted them login access there. Alternatively you can do a developer sandbox, which given it doesn't have any data in there might be okay with compliance to grant access to. –  Ralph Feb 21 '13 at 18:21
show 1 more comment

4 Answers

up vote 3 down vote accepted
+50

As a couple commenters have pointed out, this is a bug. The only people who can help you is Salesforce support.

Given the compliance issues you've mentioned you have a couple options. First, is to do it in brand new dev org, and then get it setup so you can reproduce the issue there. Second, create a developer sandbox which will only have your config and none of your data (with some exceptions, like the user table) and then ask your compliance team to grant an exception given your lack of options and the fact no data will be accessible to Salesforce support.

Best of luck with this. You're going to have a lot of challenges down the road with that policy.

share|improve this answer
    
Thanks Ralph. I shall try this. –  Shailesh Deshpande Feb 22 '13 at 17:05
    
Happy to help and best of luck –  Ralph Feb 23 '13 at 22:11
    
Havent resolved the issue yet, but granting you the bounty. Shall update once I get the solution. Thanks again for your help. –  Shailesh Deshpande Mar 1 '13 at 5:39
    
Sorry I couldn't be of better guidance, hope you're able to bring in support on this –  Ralph Mar 2 '13 at 1:46
add comment

My suggestion would be to contact Salesforce support and raise a case with them. This is built in functionality of the platform. They should be able to resolve it for you.

share|improve this answer
add comment

Yeah it sounds like this is a bug, as I'm not able to reproduce it myself. This is definitely a hack workaround, but have you tried creating a text field on the Task object that has a default value of whatever value you need, and then pass that value into the Email Template?

share|improve this answer
    
Yes. I did try this. I did not create a text field, but I created a formula field and a custom setting. The formula refers this setting. And I am referring this formula in the mail alert. But the problem I have here is this works for other objects, but not tasks as workflow email alerts are not allowed. I had to write a trigger for tasks(in this case I am simply referring the custom setting). Secondly, as I said in my update no. 1, I would need to do the same thing for all objects involving email alerts which I believe is not feasible. Hence, I want to know if there is something generic. –  Shailesh Deshpande Feb 22 '13 at 6:04
add comment

I suggest you create a utility class that performs your email formula operation to create correct email address links for any objects you intend to send email notices about (be sure to include validation in the class too). You can then call the class from any trigger, other class, etc that needs to use it in order to send an email based on a URL and object that the org has. That should automate the the entire process for you across all of your objects throughout your complete org.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.