You need to sign in to do that
Don't have an account?
Board salesforce
Multiple Owners Query
Hi All,
can any one suggest on this
How to retrieve all the owners and i have to display it on the VF page?
can any one suggest on this
How to retrieve all the owners and i have to display it on the VF page?
Thanks
sample query pls?
Thanks ,
Ram
there are three options you may try:
1. Some standard objects support Owner.Name directly in the query. So if you want to show owners of Opportunity, Account, Contact etc in your VF page, you may use "SELECT Owner.Name FROM Opportunity" and show in VF page.
2. Get all the owner ids in to a set, Query in user object and display in Visualforce page (Same as solution from Shaijan Thomas above)
3. Create a formula field in your object as below:
IF(
ISBLANK(Owner:User.Id), /* If blank, it's a queue */
Owner:Queue.QueueName,
Owner:User.FirstName & " " & Owner:User.LastName
)
and show that formula field in your VF page. More details here (https://success.salesforce.com/answers?id=90630000000grNgAAI)
Hope this helps