Discussions
- General Development
- Schema Development
- Apex Code Development
- Visualforce Development
- Formulas & Validation Rules
- Security
- Mobile
- Force.com Sites & Site.com
- Chatter Development
- Java Development
- .NET Development
- Perl, PHP, Python & Ruby
- Desktop Integration
- APIs and Integrations
- Visual Workflow
- Apple, Mac and OS X
- VB and Office Development
- AppExchange Directory & Packaging
- Salesforce Labs & Open Source Projects
- Other Salesforce Applications
- Jobs Board
- Force.com Discussion Boards
- :
- Developer Boards for Force.com and Database.com
- :
- General Development
- :
- Query for open Tasks associated with Opportunities...
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Query for open Tasks associated with Opportunit ies owned by specific user
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
02-13-2013 11:11 AM
Is it possible to construct a SOQL query that will retrieve all of the open Tasks associated with Opportunities owned by a specific user? I tried using the 'What' relationship for the Task like this:
SELECT Id, WhoId, WhatId, Status, Subject FROM Task WHERE IsClosed = 'false' AND What.OwnerId = '<some id>'
but the query fails on the What.OwnerId condition. Apparently only What.Name is valid. Any thoughts?
Re: Query for open Tasks associated with Opportunit ies owned by specific user
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
02-13-2013 12:28 PM
Regards,
J
MicroClouds.in/blogs
Salesforce Certified Developer
Re: Query for open Tasks associated with Opportunit ies owned by specific user
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
02-13-2013 12:44 PM
That just gives me the Id of the associated Opportunity which is already available as WhatId.

