function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Arpita07213434674092248Arpita07213434674092248 

Get Note Objects owner name

Hello,

I want to get the owner name of my Notes object. I did <apex:outputField value="{!note.OwnerId}"/> which gives the Owner name but as hyperlink. I do not want the hyperlink.I tried <apex:outputText but it give the id not the name.
I am sure someone must have faced this issue.

Thanks
Adnubis LLCAdnubis LLC
When you query the note object you can grab the user first name and last name using relationships. Like the following.

list<Note> notes = [SELECT id, Owner.FirstName,Owner.LastName FROM Note];

Instead of {!note.OwnerId}  you can do {!note.Owner.FirstName}  {!note.Owner.LastName}