You need to sign in to do that
Don't have an account?
koti91
Help for a SOQL Query
I had two objects . Lead__c and Oppurtunity__c.
Oppurtunity__c has a look up to Lead__c . Lead__c has many oppurtunities related to it.
I need to find if Lead__c has one oppurtuntiy or more.
can any one help
Hi,
Try the below code snippet as reference:
lead__c []leadobj=[select id,(select id from Oppurtunity__c) from lead__c]; //use Plural name of Oppurtunity__c object
for(lead__c ll:leadobj)
{
if(ll.Oppurtunity__c.size()>0)
{
//your logic
}
}
Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.