0

I know custom label is used to store static text but would like to store tableau report link with dynamic Contact Id value or name. Issue is when I read it from VFP without controller then it does not resolve to link. Any help? Thanks.

https://tableau.qa.ampf.com/t/2017Sales?ContactId={!Contact.Contact_ID__c}&ContactName={!Contact.Name}

1 Answer 1

1

Custom Labels do not store dynamic or active content. Their design purpose is to support internationalization and translation. While you can include in a Custom Label substitution points, like {0} and {1}, as used with String.format(), I don't think that's the most suitable solution for building templated links.

You can use this type of templating in a Custom Link or in a formula field using the HYPERLINK() function. Your Visualforce can, of course, reference the content of a custom formula field.

In a Visualforce context, if you prefer not to create a custom formula field to hold such a link, you can construct the link yourself using Apex logic or Visualforce expressions. The URL template itself might best be stored in a Custom Setting.

You must log in to answer this question.

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