function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Mike @ BlackTabMike @ BlackTab 

Query "My Unresolved Items" Records

Hello, 

 

I'm looking to query all "My Unresolved Items" records. I looked under the tasks object and didn't really see anything...

 

I also looked through this documentation: http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_objects_list.htm but couldn't seem to find anything useful. 

 

Thanks

Best Answer chosen by Admin (Salesforce Developers) 
Mike @ BlackTabMike @ BlackTab
SELECT Subject FROM Task WHERE WhoID = null AND Subject LIKE 'Unresolved Email%'

 

All Answers

Mike @ BlackTabMike @ BlackTab

Nevermind...I found a solution:

 

querying for Tasks where WhoID = null and Subject startsWith "Unresolved Email" -- not perfect, but a pretty good work-around for the time being.

Mike @ BlackTabMike @ BlackTab
SELECT Subject FROM Task WHERE WhoID = null AND Subject LIKE 'Unresolved Email%'

 

This was selected as the best answer
ChrisB760ChrisB760

Hey Mike,

 

Did you by chance also figure out where the Unresolved Contacts records are stored (that would contain the "Outlook Company" field value)?  I've been looking for the answer to this for a while and you're the first person I've encountered who seems to have played around with the inner-workings of the Unresolved Items structure.

 

Thanks!

Mike @ BlackTabMike @ BlackTab

Did you have any luck using the Schema Browser in the Force.com IDE? Another good resource is to use the Salesforce API documentation for a full list object field descriptions: http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_objects_list.htm

Mike @ BlackTabMike @ BlackTab

Also, all unresolved emails are stored as tasks. 

 

You can use the following code to delete unresolved emails:

 

List<task> tasks = [SELECT Subject FROM Task WHERE WhoID = null AND Subject LIKE 'Unresolved Email%'];

delete tasks;

 You can also add more conditions after the WERE section of the query for more specific filtering.