0

Could someone, please, help with this. Below is my field label, name and data type:

Field Label Field name Data Type Owner Owner Lookup(User,Queue)

I wrote this SOQL

SELECT Owner__r.Queue FROM BMCServiceDesk__Incident__c

The fields as decribed in my wsdl is below:

SOQL is saying that it does not understand the relationship. How can I get this working?

Many thanks.

Regards, Holla

1 Answer 1

1

OwnerId is a standard field and therefore does not require the __r suffix. When using a standard lookup field as a relationship just drop the Id from the API name.

SELECT OwnerId, Owner.Name FROM BMCServiceDesk__Incident__c

In this case OwnerId will be the record Id of the User or Queue, while Owner.Name will the the record's Name.

1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .