You need to sign in to do that
Don't have an account?
JohnDTheMaven
Bug with ConnectApi.FeedSortOrder - Invalid Type
Based on the documentation seen here (http://www.salesforce.com/us/developer/docs/apexcode/Content/connectAPI_enums.htm#FeedSortOrder_enum), ConnectApi.FeedSortOrder is a valid Apex Enum. However when I try to save this simple class with v28.0 through v31.0, I get the followin error "Compilation error: Invalid type: ConnectApi.FeedSortOrder". Here is the Apex class to reproduce the error
public with sharing class scratch
{
private ConnectApi.FeedSortOrder fso = ConnectApi.FeedSortOrder.LastModifiedDateDesc;
}
Chatter is enabled in this org and other ConnectApi.ChatterFeeds related classes are working.
It would appear that the Apex compiler doesn't recognize ConnectApi.FeedSortOrder enum as a valid Apex object.
public with sharing class scratch
{
private ConnectApi.FeedSortOrder fso = ConnectApi.FeedSortOrder.LastModifiedDateDesc;
}
Chatter is enabled in this org and other ConnectApi.ChatterFeeds related classes are working.
It would appear that the Apex compiler doesn't recognize ConnectApi.FeedSortOrder enum as a valid Apex object.
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_ConnectAPI_ChatterFeeds_static_methods.htm#apex_ConnectAPI_ChatterFeeds_getFeedElementsFromFeed_6
so, you could do the following for example .. ConnectApi.FeedItemPage feedItemPage = ConnectApi.ChatterFeeds.getFeedItemsFromFeed(null, ConnectApi.FeedType.Bookmarks, 'me', null, null, ConnectApi.FeedSortOrder.CreatedDateDesc);
All Answers
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_ConnectAPI_ChatterFeeds_static_methods.htm#apex_ConnectAPI_ChatterFeeds_getFeedElementsFromFeed_6
so, you could do the following for example .. ConnectApi.FeedItemPage feedItemPage = ConnectApi.ChatterFeeds.getFeedItemsFromFeed(null, ConnectApi.FeedType.Bookmarks, 'me', null, null, ConnectApi.FeedSortOrder.CreatedDateDesc);