I'm having peculiar trouble with the following query:
SELECT Id, Name, RecordType.Name FROM ts2__Placement__c WHERE RecordTypeId IN (SELECT Id FROM RecordType WHERE Name = 'Contract' AND SObjectType = 'ts2__Placement__c')
For some reason, this doesn't return any records although I've checked and know they exist such as below:
If I change the query to look for 'Temp' record types, they pull through. I noticed that although on records it says 'Contract', but in the object itself it says Contractor as below.
Even when I change the query to look for "Contractor", it still pulls nothing through.
On a list view, I see that it pulls through record types with the name "Contract" and when I search for record types see that "Contract" and "Contractor" are both there although this doesn't appear on the object itself.
I'm confused here but even if I search for records where RecordTypeId = '###' I still get nothing returned.
Am I missing something obvious here?
Thanks for any help.