You need to sign in to do that
Don't have an account?
tofertek
HYPERLINK function field
I am having trouble displaying a simple hyperlink. I have a custom object called "someobject". it has a field called "some_url" of type Formula. The formula is below.
HYPERLINK('http://www.google.com', 'google' , '_blank')
the field outputs "Text".
So i have a custom controller/visualforce page for someobject. It has a public member var with an instance of someobject that gets referenced all over the page with no problems. I try to add this:
<apex:outputText value="{!someobject.some_url__c}" />
hoping to see a hyperlink that says "google". Instead I get nothing.
Can someone lead me on the path here? Much thanks.
Hi Suresh. I discovered my problem.
It turns out those HYPERLINK Formula fields showed up properly on the detail page, but not my visual force edit page. So what I did is used the Formula fields for the detail page, moving them into the appropriate section, and in the edit page i dynamically create a new link using the apex:outputLink
This gives me the functionality that I am looking for.
Thank you for all of your help here.
All Answers
Try this
When I do that, I get a label that says "google", but no hyperlink.
It is in a pageBlockSectrion that is in a pageBlock that is in "edit" mode. Dont know if that has anything to do with it.
Try with this
-Suresh
when i go to outputField to outputText, then add escape="false", i get nothing at all, no label, no value, no hyperlink.
using outputField, i get the label i assigned originally ("google"), but no link. outputField has no "escape" feature.
Is there just an example in the tutorials/documentation somewhere as to how to use a formula custom object field with the HYPERLINK function?
Hello tofertek
It's work in my environment can you create another formula field(formula type should be text) ant checkout it.Did you pass the id value for record?.
salesforce_useful_formula_fields.pdf
-Suresh
Hi Suresh. I discovered my problem.
It turns out those HYPERLINK Formula fields showed up properly on the detail page, but not my visual force edit page. So what I did is used the Formula fields for the detail page, moving them into the appropriate section, and in the edit page i dynamically create a new link using the apex:outputLink
This gives me the functionality that I am looking for.
Thank you for all of your help here.
What I am trying to do is. I have a customer object named "Inventory" and then I have a custom field name "Invoice" which is a URL field. What I want to do is post a link in that field that will be do the document that is attached to the inventory record. I don't want my end users to see the link I want them to see just the name of the file. How can I do this?
Thank you,
Manisha