I have created a lookup between two custom objects. Object A is an existing object that has a new lookup to object B, a new object.
For the next few months I need to have a scheduled batchjob to keep the new lookup field populated on new records of object A
In order to find all records that do not have a lookup to B I have tried the following SOQL:
SELECT Id, LookupB__c FROM A__c
WHERE LookupB__c= NULL
It returns zero records. I get the same result if I try with an empty string ('')
If I run the query without the WHERE clause and then print the content of lookupB__c, it tells me it is null
So what should I use to find the records where the lookup is not set?