Is there any way to query for Google Doc Attachments? For instance, the following SOQL queries return all Notes and Attachments whose parent is a Salesforce.com record, but I can't find any equivalent for retrieving Google Doc Attachments:
[SELECT Id, Name FROM Attachment WHERE ParentId=:opportunity.Id] [SELECT Id, Title FROM Note WHERE ParentId=:opportunity.Id]
Here is a dev boards forum post from 2008 that is still unanswered: Apex Google Doc attachment
Google Doc Attachments appear to be one of those "phantom" objects which support some of the Salesforce.com API features, but are not fully exposed. For instance, from what I can tell, this object has the following standard API features:
- It has a Key Prefix (098 in one of my orgs, might be the same everywhere)
- Each record has a detail/edit/delete page
But it does NOT support the following:
- Doesn't show up as a Schema object (e.g. through getGlobalDescribe())
- Doesn't support SOQL
Does anyone have a solution for programmatically (but WITHOUT screen-scraping) retrieving Google Docs attached to a record?
A 'GoogleDoc' object is exposed via Web Services API, supposedly with full CRUD and query permissions! But it is not showing up in SOQLExplorer or AJAX Toolkit. Any gotchas/prerequisites I'm missing?
Also, I can get at the
SObjectType token by taking a GoogleDoc's Id and then calling
docId.getSObjectType(). But doing a
getDescribe() on that token throws an Internal Salesforce System Error: 129447016-92475 (-1350247506).
From AJAX Toolkit, I called
sforce.connection.describeSObject('GoogleDoc'), and retrieved the following:
INVALID_TYPE: sObject type 'GoogleDoc' is not supported. If you are attempting to use a custom object, be sure to append the '__c' after the entity name. Please reference your WSDL or the describe call for the appropriate names.