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
jjcrownerjjcrowner 

Convert Owner ID to Owner Name?

Hello!
 
I am using a field update to record the previous account owner when an ownership change is made, but I can only get it to return the Owner ID, rather than the name.  Is there a way to get the Owner name instead?  Thanks in advance for your help!
 
-- Julie
Chris_627Chris_627
When you reference a Lookup in a formula it will only return the ID. The only way I know for sure to get the name instead of the ID is to use a s-control but I have no idea how it would be written.

Have you thought about turning on Field History Tracking on the Account Owner field? That may be easier. Click Setup | Customize | Accounts | Fields and click "Set History Tracking" button. Then check the "enable..." checkbox and select the fields you want to track changes on. (You may need to add the Account History reated list to your page layout once you enable the field tracking).
jjcrownerjjcrowner
Very helpful -- thank you for responding!
 
Do you know if there is a way to access this information in an e-mail template?  One of my users would like to be notified when account ownership changes, and would like to see the previous owner in the e-mail.
 
-- Julie
Chris_627Chris_627
No..field history can't be pulled by an email template (at least not without an s-control). You could put a link to the record in the email (use the "Detail Link" merge field in the template) but beyond that I think you will need custom code.
Lady_PirateLady_Pirate

This is something I did...

named the field Opportunity Alias with the data type as a formula.

(IF(CreatedById="00570000000mnO0","John Doe",
(IF(CreatedById="00570000000mnNw","Jane Doe",
(IF(CreatedById="00570000000mcCl","Jack Doe",
(IF( CreatedById="00570000000mnNx","Jill Doe",
(IF(CreatedById="00570000000mnO2","MG",
(IF(CreatedById="00570000000mnO3","RB",
(IF(CreatedById="00570000000n4cI","JA",
(IF(CreatedById="00570000000n3ab","TW",
(IF(CreatedById="00570000000mnO4","TA",""))))))))))))))))))

Hope this might help.