You need to sign in to do that
Don't have an account?
Charline Mitchener
add custom field to hyperlink
I have a image hyperlink in site.com where I am trying to make the end of the URL the value of a custom field in the User Object.
The idea is that the code looks up the custom field from the current User - there is a custom user field which displays the salesforce id.
The code I am using is -
<a href="/samplesite/Advisor_Profile?id={!CurremtUser.salesforceid__c}"><img src="https://ap1.salesforce.com/resource/1436458247000/FS1C" height="35" width="164">
salesforceid__c holds the Salesforce Contact ID. Once it's working, it would create a link like this - /samplesite/Advisor_Profile?id=348432934234djf (salesforce id on the end)
I must be doing something wrong within the code - when I test it the URL just keeps the custom field name - https://sitepreview.ap1.force.com/samplesite/Advisor_Profile?id={!User.salesforceid__c}
Any help would be appreciated
The idea is that the code looks up the custom field from the current User - there is a custom user field which displays the salesforce id.
The code I am using is -
<a href="/samplesite/Advisor_Profile?id={!CurremtUser.salesforceid__c}"><img src="https://ap1.salesforce.com/resource/1436458247000/FS1C" height="35" width="164">
salesforceid__c holds the Salesforce Contact ID. Once it's working, it would create a link like this - /samplesite/Advisor_Profile?id=348432934234djf (salesforce id on the end)
I must be doing something wrong within the code - when I test it the URL just keeps the custom field name - https://sitepreview.ap1.force.com/samplesite/Advisor_Profile?id={!User.salesforceid__c}
Any help would be appreciated
You can use this code
<a href="/samplesite/Advisor_Profile?id="{!$User.salesforceid__c}><img src="https://ap1.salesforce.com/resource/1436458247000/FS1C" height="35" width="164">
If this is help you then please select best answer.
Thanks
Thank you for your replies. Unfortunately neither of these work.
Jitendra, this is what the URL looks like with yours -
http://ausure.force.com/AusureFSG/Advisor_Profile?id= (not picking up the field at the end)
Dillip this is what it looks like with yours -
https://SAMPLESITE/s/HYPERLINK(%22https://ausure.force.com/samplesiteAdvisor_Profile?id=%22&salesforceid__c,%22Linked%22)
Thanks for your help.