You need to sign in to do that
Don't have an account?
irfan aziz
How to query a lookup field?
I have a field owner(data type lookup(user)) in the opportunity table.
SELECT createddate,closedate,owner from Opportunity limit 10
The above select query fails and says there is no such column owner. Can anyone help.
SELECT createddate,closedate,owner from Opportunity limit 10
The above select query fails and says there is no such column owner. Can anyone help.
Your query will be like
I have a similar situation, and I am not positive I understand the answer given here. I am setting up Talkdesk for Salesforce so that a call coming in will route to the account manager. I can successfully input the phone number to SF, and I can return fields that are not of a lookup type, but I fail to return wwith lookup field types. To make it simple, let's look up the account owner and a few other pieces of info:
SELECT OwnerID,AnnualRevenue,CreatedDate FROM Account WHERE Phone LIKE {input from Talkdesk from Salesforce}
I can set up an audio output in Talkdesk to give me the results, but right now it only returns the values for annual revenue and reated date. When it tries to return the OwnerID, it's just selence.
Once this query successfully returns the OwnerID, I need to run a second query to lookup that OwnerID in the Contact object, and return their email address.
I need to get the owner ID out of the first query such that I can use it again to search in the second query. What am I missing here? Why are all the lookup type fields failing to return results for me?