This is returning an error.[SELECT id, owner.Any_Custom_Field_on_User__c
FROM Task]
답변 2개

Hi Akash Greetings to you!No, you can not use the custom field of the owner in Query. Also, you can not use all the standard field of the owner in Query. Only limit fields which are global like Owner.Id, Owner.Username, Owner.LastName ,Owner.FirstName ,Owner.Name, Owner. Title, Owner. Email etc can be used in Query.If you required those field in the query you can create Formula field like Owner:User.custom_field__c .So I added a custom formula field named Owner_Primary_Functions__c to Task object to represent the field value from related User objects for Task records. In my case, the formula was TEXT(Owner:User.Primary_Functions__c).Now, this query works for me:SELECT Id, Subject, Owner.Name, Owner_Primary_Functions__c FROM TaskThanks I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.Thanks and Regards,Deepali Kulshresthawww.kdeepali.com