3

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.

4

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.

1
  • 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 '14 at 8:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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