+ Start a Discussion
DatajunkieDatajunkie 

Duplicating Owner Name (not ownerID) on a page

I need to be able to repeat the name of the Opportunity Owner in a second section of the page, but so far, the only field I can merge with is OwnerID - and a string of random letters and numbers isn't exactly what I'm looking for.
 
The idea is that we have "shared sales" where two or three people share credit for a particular sale. We need to store their names and the percentages of credit for each one. I've added fields for the extra two reps (lookups to Users), and for their percentages (defaulting to 0%). But to make things crystal clear, I want the owner's name to appear in the section too - defaulted to 100%, but with a validation rule that makes sure the sum of all 3 percent fields = 100%. Obviously, I don't want them changing the duplicate Owner field. I'm hoping I can make it read-only. But I do want it to show up to make it absolutely clear who has what percentage credit.
 
Is there a way to merge my duplicate field with the Owner's name instead of the ID? It's obviously a two-step link - it starts with the OwnerID on the current object, but then has to link to the Users Object to grab the associated Name. Fancy formula work, maybe?
Jeff TalbotJeff Talbot

As of the Spring '08 release, there's not a way to auto populate a lookup field using a formula.

As a workaround, you could have the user manually select their name in your "Sales Rep 1" field and then use a validation rule to check for a mismatch in the Opportunity Owner ID and the ID of the user entered in your "Sale Rep 1" user lookup field. The formula would look something like this:

OwnerId <> Sales_Rep_1__r.Id

DatajunkieDatajunkie
That's not exactly what I meant. I didn't explain myself very well.
 
I'm not wanting to change a lookup field to a formula field. I just want to create a second field as a formula field that shows the value in the lookup field. The original lookup field shows the owner's name, but the duplicate formula field shows the owner's ID number.
 
I need that second field to show "Jane Doe" a second time, not 00530000010PCy. I *really* don't want someone to have to enter that information twice. The whole point of having it duplicated is so that no one has to scroll to the top of the screen to see who the owner is (which they would have to do to enter it the second time).
 
If I wanted a field that would duplicate a field like "Expected Revenue", I would have no problem getting it to show the same $ amount that is reflected above. It's only when referring to lookup fields that you end up with the ID# instead of the value.
 
Is this possible? Or am I SOL (and headed to post something on Idea Exchange)?
Chris_627Chris_627
Create an s-control of Type "HTML". Name it to match the field names of the 2 User Lookups you already created. The only thing the s-control body needs to contain is the merge field for Opportunity Owner Full Name ( {!Opportunity.OwnerFullName} ). Then add the s-control to your Opportunity Page Layout. (Note: You will need to edit the s-control properties on the Page Layout and set the Hight to 20 instead of the default 200, and select the "Show Label" checkbox).

This technique also works to show data from a parent record (e.g. if you wanted to show the Account Address on the Opportunity page you could use this method).