AnswerBun.com

Issue with Custom URL reverting to standard Salesforce domain URL

I have a site with a custom url set up so that if http://mycustomdomain.com is entered into the browser then the CNAME record for that domain redirects to the underlying Salesforce domain for my site http://mysalesforcedomain.force.com/mysite.

Some of the links on a page in my site call a JavaScript function that does either of the following:

 window.location.href = "http://" + window.location.host + "/mysite/mypage?param="+param

or

 window.open(http://" + window.location.host + "/mysite/mypage?param=param", "_blank");

I notice that when the window.location.href is set then when the page changes the url in the browser is simply http://mycustomdomain.com without any parameter information. But when I use the window.open() function to open a new tab in the browser, the url set in that new tab is http://mysalesforcedomain.force.com/mysite?param=value.

I find it odd that the url would remain the custom domain with one method, but would revert to the Salesforce domain name in the other.

Is there a reason this is happening, or any way to prevent it without hard-coding the custom domain name?

I’d also be interested to know why, when the custom domain name, is showing, there are no parameters showing.

Many thanks

Salesforce Asked on December 30, 2020

1 Answers

One Answer

Answered by CloudHugger on December 30, 2020

Add your own answers!

Related Questions

Relationship between account and contact

7  Asked on December 28, 2021 by mnz

 

SocialPage Data Extension

0  Asked on December 26, 2021 by cmbob

     

Ask a Question

Get help from others!

© 2022 AnswerBun.com. All rights reserved.