You need to sign in to do that
Don't have an account?
Make URL content source not automatically encode merge fields?
Is there a way to make the URL content source (for links/buttons) not automatically encode the data coming from merge fields?
For example, if I have a field Foo__c that contains a URL 'http://developer.force.com' and I try to insert that into the URL content as a merge field:
{!MyObject__c.Foo__c}
The result is:
http%3A%2F%2Fdeveloper.force.com
Which causes a "URL No Longer Exists" error because salesforce is unable to redirect properly.
So, I'm wondering if there's a way to just treat the data literally in a URL content source.
Obviously there's workarounds to this by using OnClick Javascript as the content source instead of URL content source.
Try out the sample code given below to get the right URL path link :
{!REQUIRESCRIPT("/soap/ajax/15.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/15.0/apex.js")}
var acc = '{!Employee__c.foo__c}';
window.location.href= acc;
You're suggesting what I said already is the obvious workaround, which is to not use URL content source, but instead make it OnClick Javascript.
This is not very convenient, plus for items such as Custom Tabs, the only options are URL or S-Control content sources.