I'm trying to receive some fields from Owner in a custom object.
Some of the standard fields are retrieving perfectly and some throws me an error.
Example:
[SELECT Name, Fields__c,Field2__C Owner.Name, Owner.Phone, Owner.MobilePhone, Owner.Email FROM CustomObject__c];
All fields are retrieving except Owner.mobilePhone - and I got the next Error:
No such column 'MobilePhone' on entity 'Name'.
Which mobile phone is a standard field in the User object.
I saw this post : https://ipfs-sec.stackexchange.cloudflare-ipfs.com/salesforce/A/question/47467.html
But it 5+ years ago.. something changed?
I prefer not creating a new field as a formula to fix it and use this custom Field in the SOQL query.
Any other solutions?
Thanks.
WHERE Owner.Type = 'User'
to filter, that would only get records where owner is a user and not a queue. – Raul Nov 17 '19 at 14:54