i have to retrieve list of OpenActivities related to a custom object Activities are enabled for custom object .for getting list i am using query like this
public List<OpenActivity> getActivity1(){
return [SELECT Subject from OpenActivities Where WhatId= :ApexPages.currentPage().getParameters().get('id') ];
}
when i save it it is giving me error
Error: Compile Error: sObject type 'OpenActivities' 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. at line 44 column 8
can any one please tell me how to retrieve list of open Activities in salesforce which is related to particular record object??
Best Answer
You should use query as it described here: http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_objects_openactivity.htm
e.g.