Take the 2-minute tour ×
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It's 100% free, no registration required.

Simple question. How can I get the opportunity owner label name?

I tried the following code but it isn't working. An error occurred.

{!$ObjectType.Opportunity.fields.Owner.label}

I cannot use the following code because I want 'Opportunity Owner,' not 'Full Name' nor 'OwnerId.'

{!$ObjectType.User.fields.Name.label}
{!$ObjectType.Opportunity.fields.OwnerId.label}

I googled for awhile but nothing practical came up. But if there is a label, there should be a way to acquire the label...

If anybody knows the workaround please tell me. Any help would be very appreciated.

share|improve this question
add comment

1 Answer 1

Owner isn't a field per se - its a relationship that allows you to access fields on the related object, so you can't query it back from the database for example.

The concrete field associated with the owner is ownerid, which is the identifier of the related record, so that is the only one you can get hold of. If you need something different I think you'll need to use a custom label.

share|improve this answer
    
I see... It must be good if we could just use the existing label instead of creating a custom label which requires maintenance. Thank you very much. –  lw29 Jul 10 at 8:57
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.