You need to sign in to do that
Don't have an account?

VF Page outputField function help
Hello,
I'm fairly new to VF development and am running into a small issue. I have a custom object that has a lookup to an account and a lookup to a contact (+ other custom fields).
I built a VF page to pull these fields and overall page is rendered as PDF. The problem I have is that the account and contact fields both show up as links (and therefore underlined and in blue). Is there a way I can just make them come out as normal text? I tried using outputText function, but then the IDs come out, instead of the account and contact name.
Any help is highly appreciated. Thank you x 100 in advance.
Try using the name field on the parent object instead of the lookup field on your custom object.
For example, I have a custom object called "object" with lookup fields to account and opportunity called account__c and opportunity__c, respectively. I can access the fields on those objects like this:
All Answers
Try using the name field on the parent object instead of the lookup field on your custom object.
For example, I have a custom object called "object" with lookup fields to account and opportunity called account__c and opportunity__c, respectively. I can access the fields on those objects like this:
Oh perfect!! Thanks Jill. Cheers
Hi,
thanks for this post, I'd have a couple of questions :
does this work only for emails and/or pdf output ? or also for standard VF pages ?
would it work only for field NAME or also other fields ? (description, desk__c) I'm asking this 'cause I did try and came up with some strange errors.
what I'd like to achieve is, I think, pretty simple.
I have two custom objects (Software__c and Tests__c) and a third custom object (test2run__c) with lookup relation to the first two objects.
I just wish to have a VF page for test2run__c showing the fields of one single record of the (test2run__c) and some of the fields of the related 'parent' objects
I did try
and the fields for the related objects :
and
but getting errors on the VF page
thanks for any help
Alex