You need to sign in to do that
Don't have an account?

Lookup field calling
I have lookup relation in lead,so how to call that field in soql query
You need to sign in to do that
Don't have an account?
I have lookup relation in lead,so how to call that field in soql query
Hi,
Relationship queries traverse parent-to-child and child-to-parent relationships between objects to filter and return results. They are similar to SQL joins.
For example
Basic Child-to-Parent
SELECT Id, LastName, FirstName, Account.Name FROM Contact
Basic Parent-to-Child
SELECT Id, Name, Amount,(SELECT Quantity, UnitPrice, TotalPrice FROM OpportunityLineItems)FROM Opportunity
Use the below link for more detail:
http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_soql_relationships.htm
Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.
thanks sir
actually there are few fields in tasks like who,what
they hav a lookup relation in lead,i am having problem showing them thru my query
Hi,
You can try the below SOQL query on task object:
List<task> t=[select id,subject from task where whoid='00Q90000006dye8'];//pass the leadid
system.debug('#####'+t);
Hi Sunny,
Is your query working fine?
Regards,
Saxon.
@saxon
yup
now 1 more work is there
i have to get those leads who are assigned task along with lead's custom fields
*with the help of ur soln i have obtained the lead names but lead custom fields i hav to do