We have a requirement, after leads are converted, we are sending data to a partner about them. We have a batch process which will periodically look for newly converted leads, send the data to the partner in bulk, and then save ConvertedAccount.Was_Sent_to_Partner__c was true for each of the saved leads.
Our query looks like this:
Database.getQueryLocator([ SELECT Id, External_Id__c FROM Lead WHERE IsConverted = TRUE AND ConvertedAccountId != NULL AND ConvertedAccount.Was_Sent_to_Partner__c != TRUE ]);
But the problem is, that some values have never been set, so when queried with the Developer Console's Query Editor, their value shows as
(null ConvertedAccount) .... which aparrently is not equal to either false or null.
Is there a way I can filter on this value?