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
- :
- Chatter Development
- :
- Cannot insert FeedItem to a Chatter Group
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Cannot insert FeedItem to a Chatter Group
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
09-07-2012 06:13 PM
I am using Java with the SOAP api to transfer Chatter records. I cannot post messages to existing Chatter groups.
The code below is simple Java code that tries to create a new FeedItem, add it to a group and insert the record. I have confirmed that the userID is correct, the groupId is correct AND the user belongs to the group. The user account I am using to do the transfer has the "Manage Chatter Messages" enabled. I am using API v 25.
Why is my attempt to post to a group failing?
The error message I get is: The Insert failed because: insufficient access rights on cross-reference id
String userID = "005E0000001JywAIAS";
String groupId = "0F9E0000000Tp2mKAC";
FeedItem newFeed = new FeedItem();
Calendar greg = Calendar.getInstance();
greg.add(Calendar.HOUR, -48);
//newFeed.setId(feed.getId());
newFeed.setBody("Faked ITEM GROUP test");
newFeed.setParentId(groupId);
newFeed.setCreatedDate(greg);
newFeed.setCreatedById(userID);
List<FeedItem> list = new ArrayList<FeedItem>();
list.add(newFeed);
loginCentral();
SObject[] objs = new SObject[1];
objs[0]=newFeed;
uploadRecords(objs);
logout();
Solved! Go to Solution.
Re: Cannot insert FeedItem to a Chatter Group
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
09-08-2012 06:30 AM

