I am trying to load Attachment info along with Type and Id of its parent. I have used the following query before and it worked fine:
SELECT Id, Name, Parent.Id, Parent.Type FROM Attachment
But now for one of the Salesforce instances Parent
attribute in response stays null for most of the attachments. I also tried doing something like this:
SELECT Id, Name, Parent.Id, Parent.Type FROM Attachment WHERE Parent.Type = 'Task'
And while filtering works correctly, information about parent is not returned. I am not sure what has changed and why this type of query doesn't work any more.
Any pointers what I should be looking at? Thanks!
Update: 22 May 2014
This is not an answer, but as a workaround in my particular case (just need to know Type of the Parent) it is possible to use ParentId value to figure out the Parent Type by getting list of all available SObjects (http://www.salesforce.com/us/developer/docs/api_rest/Content/dome_describeGlobal.htm) and finding the one with correct keyPrefix.