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:


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?


  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.

  • 2
    Given this is standard functionality, I'd recommend creating a case with Salesforce support to get this addressed Commented Feb 19, 2013 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. Commented Feb 21, 2013 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... Commented Feb 21, 2013 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. Commented Feb 21, 2013 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. Commented Feb 21, 2013 at 18:21

4 Answers 4


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.

  • Happy to help and best of luck Commented Feb 23, 2013 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. Commented Mar 1, 2013 at 5:39
  • Sorry I couldn't be of better guidance, hope you're able to bring in support on this Commented Mar 2, 2013 at 1:46

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.


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?

  • 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. Commented Feb 22, 2013 at 6:04

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .