You need to sign in to do that
Don't have an account?
mousetrap
Update Opportunity: Trying to add Owner.Name field
Hi,
I'm trying to add the Opportunity Owners Name to the columns available in the Update Opportunity Control. OwnerId works fine but the control locks up as soon as I try adding Owner.Name - which appears to be perfectly workable SOQL.
Any ideas?
i don't think the owner object has a name member
Spanning objects is currently not supported. Using SOQL is the workaround.
I found the Owner.Name field under the Opportunity.OwnerId which is listed as a reference field.
When I run the query SELECT Owner.LastName FROM Opportunity using Apex Explorer 8.0 I actually get a [drill down] hit which enables me to see the full name.
However, the following code hangs when I include the field reference Owner.LastName:
var showFields = new Array('Owner.Name','AccountId', 'Name','StageName', 'ForecastCategory', 'CloseDate', 'Amount', 'Id');
var queryStr = "select "+showFields.join(", ")+" from opportunity where isclosed = false";
I'm thinking that the reference through the field OwnerId somehow "breaks" the query within the code, even when the SOQL is valid...
var queryStr = "select "+showFields.join(", ")+" from opportunity where isclosed = false";