You need to sign in to do that
Don't have an account?
PremInfo
Insert and Fetch UserStatus Feed by FeedItem.
I am not able to fetch and insert the user status feed into feed item.
1. SELECT Type FROM FeedItem WHERE Type='UserStatus' returning 0 records even though user status feed is available
2. When I try to create a User Status feed of type FeedItem getting error "User status feed cannot be created directly through feeditem"
Please let me know if I am doing any thing wrong here and the right way to get the user status feeds.
system.debug(auser);
auser.CurrentStatus = 'new input';
update auser;
Feeditem fi = [Select Body, Type FROM FeedItem WHERE Type='UserStatus' Order by Createddate Desc limit 1];
System.debug(fi);
doc:
http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_objects_feeditem.htm