You need to sign in to do that
Don't have an account?
Shamil
BUG in SOQL? Invalid SOQL to get Task Owner information
I am trying to get Task Owner's Mobile Phone number using the following SOQL:
Select t.Owner.MobilePhone from Task t
When I try to execute it I get an error message: "No such column 'MobilePhone' on entity 'Name'"
The error shows up for some other columns too, e.g. CallCenterId (of User object), while some I am able to get data for some other columns, such as Name, LastName, etc.
Why is that?
All Answers
It normally works from apex or VF Class. i am not sure check out. but it definitely not works from apex explorer or salesforce
schema in eclipse
Try this:
Select t.Owner.Phone From Task t
Thanks
The thing is that there are 2 fields on User object: Phone and MobilePhone.
I need MobilePhone.
Oops...No luck for me too
I could see the field "Cell" (for Mobile phone), but query does not work.
Ron, thanks for looking into this. What you're saying makes sense, but there are couple of things I don't undertand:
1. Phone and MobilePhone fields have exactly the same attributes:
- createable
- filterable
- nillable
- updateable
... and the following SOQL works:
Select t.Owner.Phone from Task t
that is Phone is queryable
2.Some other fields, such as 'Name', 'LastName' having the following attributes:
- filterable
- sortable
are still queryable with SOQL queries, such as:
Select t.Owner.Name from Task t
3. Side question - not really for you, but still - why would Apex Explorer and Schema browser in the IDE let a user create invalid SOQL statements?
Thanks,
Shamil
hey shamil,
did you resolve this?
regards,
Sandip