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:
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.
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.
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.
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.