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
hhuiehhuie 

Retrieve Role from the Opportunity Owner?

Is there a way to reference the Opportunity Owner Role using a formula field on an Opportunity?
Best Answer chosen by Admin (Salesforce Developers) 
hhuiehhuie
We're trying to force Sales Reps with role X to fill in two fields before their able to move a Opportunity to Pending.  We've found a work around by running the Validation Rule off the User Role which in most cases is correct.

All Answers

Steve :-/Steve :-/

I don't think you can do it using SFDC Formula Language and Fields.  The Opportunity.OwnerID is as far as you can get. 

 

Maybe you can do it with Apex Code (but that's outta my league)

Message Edited by Stevemo on 04-30-2009 02:41 PM
rpr2rpr2
What are you trying to accomplish?  Perhaps there is another way to reach your goal.
hhuiehhuie
We're trying to force Sales Reps with role X to fill in two fields before their able to move a Opportunity to Pending.  We've found a work around by running the Validation Rule off the User Role which in most cases is correct.
This was selected as the best answer
rpr2rpr2

Glad to hear that you came up with a workaround.  If you included a condition to check whether $User.Id  =  OwnerId as part of your validation rule, would that get you closer to what you need?