You need to sign in to do that
Don't have an account?
Cesar Leon
Help, I want to find the id of the parent object doing a where to the child object
I have a parent-child ObjectA(parent) and ObjectB(child), I want to find the id of the parent object doing a WHERE to the child object
Use __r instead of __c
Mark it as the best answer if it resolves your error.
Try this Soql:
Here ObjectA__C is the field Api of look field or ObjectA is the name of look up field with parent:
SELECT ObjectA__C FROM ObjectB__c WHERE ObjectA__C != Null;
In other way:
SELECT lookupfieldApi FROM ChildObjectApi WHERE lookupfieldApi != Null;
Thanks
Akshay