You need to sign in to do that
Don't have an account?
how to query conditional statements for two different custom fields from two different custom objects
I m trying to query two fields from two different custom objects with 'where' condition.
Scenario:ObjA--> Customer name , customer Code
ObjB--> Invoice Number
Conditon: want to display all the customer names and code who has Invoice number .
Note:ObjB field exist in the quick action of ObjA
So Far i've written the query below
select id,customerName and Customer_code ,(select id,Invoice_number from ObjBs__r) from opportunity --> here all the customername and customer codes are getting displayed . But am looking for only those customer names whose invocie number are attached to this it.
Thanks in advance
ObjA and ObjB have any relationships or not.If yes please let me know which one is parent and child.
Sample query to fetch account having contacts
select id,name from account where id in (select accountid from contact);
Hope it helps you.
Thanks
Varaprasad
I'm quering as
Select Customer_name , customer_Code from ObjA where customer_code in ( select customer_code, inovice number from ObjBs__r)
Its throwing error as unkown parsing