You need to sign in to do that
Don't have an account?
kapil p
Multiple child-parent lookup relationship in SOQL-APEX
Hello Devs,
I want to access data from below child parent dependencies:
Object tnw_invoice__InvoiceItem__c connected with Object OrderItem and OrderItems connected with Orders
I'm trying to add WHERE condition like Order.Status != 'Closed Lost' in below query:
SELECT Id, tnw_invoice__Order_Item__c FROM tnw_invoice__InvoiceItem__c WHERE tnw_invoice__Product_Code__c = 'xxxxxxxxx8989'
But it's give me error of "Didn't understand relationship......." on developer console query editor.
Thanks for help :)
Kapil
I want to access data from below child parent dependencies:
Object tnw_invoice__InvoiceItem__c connected with Object OrderItem and OrderItems connected with Orders
I'm trying to add WHERE condition like Order.Status != 'Closed Lost' in below query:
SELECT Id, tnw_invoice__Order_Item__c FROM tnw_invoice__InvoiceItem__c WHERE tnw_invoice__Product_Code__c = 'xxxxxxxxx8989'
But it's give me error of "Didn't understand relationship......." on developer console query editor.
Thanks for help :)
Kapil
please check relationship name first before you proceed and apply properly
The required WHERE clause will be
WHERE tnw_invoice__Order_Item__r. tnw_invoice__Order__r.Status != 'Closed Lost' .
Thanks.
Regards
Sharad