I have a custom object called "Department" and the following custom fields
- Department_Head__c - Lookup(User)
- Department_Name_cc - Text (80)
I'm trying to query out the department head's user information via the following query
select Department__c.Id, Department.User.Id from Department__c
select Department__c.Id, (select User.Id, User.Username from Users) from Department__c
Both return the following error message:
Didn't understand relationship 'Department__c' in field path. If you are attempting to use a custom relationship, be sure to append the '__r' after the custom relationship name. Please reference your WSDL or the describe call for the appropriate names.