I have 2 custom objects. Let's name it to object 1 and object 2. Both of these objects have their own field.
Object 1 have fields: Customer name, item, quantity, total, .....
object 2 have fields: Customer name, credit limit balance, .....
Both objects have customer name field, where both of them are lookup fields (to account object-standard object).
So now I want to display item, quantity, total, from object 1 to object 2 based on customer name, but I don't know how to query it. Anyone can help me?
Select Customername__c, item__c, quantity__c, total__c,
(Select Customername__c, creditlimitbalance__c From Object2__r)
from Object1__c
I got this error:
Didn't understand relationship 'From Object2__r' in FROM part of query call.
I think because object 1 and object 2 don't have any relation. But they have field lookup to the same object (account with customer name)
I really appreciate it if you guys can help me. Do let me know if need more information. Thank you