My intention is to filter the child records which are != to a field of the master.
Account: Master Application__c : Child
select acc.id,acc.Callista_Org_Unit_Code__c , (select Agent_Org_Unit_Code__c from Applications__r)from Account acc
I would like to add the following filter in the subquery:
This is not allowed in SOQL.
Or alternatively, filter from a child record:
select id,Agent_Org_Unit_Code__c,Agent__r.Callista_Org_Unit_Code__c from Application__c where Agent__r.Callista_Org_Unit_Code__c!=Agent_Org_Unit_Code__c
This also gives an error.
Is there any way I can build out these filters?