You need to sign in to do that
Don't have an account?
Leslie Stacey
Triggering Thanks badge (is this a feeditem?)
Hi,
We would like to trigger a "Thanks Badge" everytime a record is created that meets a specific criteria (i.e score = 10 out of 10).
Any idea what the Feeditem is within Apex ? How do I specify the badge?
appreciate everyones insight.
Kind regards,
Leslie
Ok, it's solved.
FeedItem post = new FeedItem();
post.ParentId='005w00000036KTMAA2'; //userId
post.Type='RypplePost'; //constant
post.Body='This is my successful test'; //any text
post.RelatedRecordId='0W0w0000000CaaaCAC'; //this controls picture
//post.CreatedById,
//post.ContentData='/services/data/v29.0/sobjects/FeedItem/0D5w0000013qopICAQ/ContentData';
//post.InsertedById='00520000002nmehAAA';
insert post;
Thanks to my internal team and a bit of delving through the documentation.
All Answers
Ok, it's solved.
FeedItem post = new FeedItem();
post.ParentId='005w00000036KTMAA2'; //userId
post.Type='RypplePost'; //constant
post.Body='This is my successful test'; //any text
post.RelatedRecordId='0W0w0000000CaaaCAC'; //this controls picture
//post.CreatedById,
//post.ContentData='/services/data/v29.0/sobjects/FeedItem/0D5w0000013qopICAQ/ContentData';
//post.InsertedById='00520000002nmehAAA';
insert post;
Thanks to my internal team and a bit of delving through the documentation.
Try these 2 documents :
in the "ConnectApi.FeedItemType" section @ http://www.salesforce.com/us/developer/docs/apexcode/Content/connectAPI_enums.htm
Page 304 on http://www.salesforce.com/us/developer/docs/chatterapi/salesforce_chatter_rest_api.pdf
We are just trying to implement that @mention tag within the Post to ensure that the email is generated to the end user.
Can you tell me what's meant to go in here: post.RelatedRecordId='0W0w0000000CaaaCAC'; //this controls picture ?
I assumed it was the ID of the badge I wanted, but it's coming up with an error for me.
Thanks.