text
stringlengths 24
5.1k
|
---|
feed that match the search criteria. each feed element includes no more than the specified number of comments. searchfeedelementsinfeed(communityid, feedtype, subjectid, q) search up to 5,000 of the most recent feed elements in a feed for a subject id that match the search string. feed elements are returned in order of most recent activity. searchfeedelementsinfeed(communityid, feedtype, subjectid, pageparam, pagesize, sortparam, q) get a page of sorted feed elements from a feed for a record or user that match the search criteria. searchfeedelementsinfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam, q) get a page of sorted feed elements from a feed that match the search criteria. each feed element includes no more than the specified number of comments. searchfeedelementsinfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam, q, filter) get a page of sorted and filtered feed elements from a userprofile feed that match the search criteria. searchfeedelementsinfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam, q, customfilter) get a page of sorted and filtered feed elements from a case feed that match the search criteria. searchfeedelementsinfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam, q, showinternalonly) get a page of sorted feed elements from a feed for a record or user that match the search criteria. each feed element includes no more than the specified number of comments. specify whether to return feed elements posted by internal (non-experience cloud site) users only. searchfeedelementsinfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam, q, showinternalonly, filter) get a page of sorted and filtered feed elements from a feed for a record or user that match the search criteria. each feed element includes no more than the specified number of comments. specify whether to return feed elements posted by internal (non-experience cloud site) users only. searchfeedelementsinfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam, q, showinternalonly, customfilter) get a page of sorted and filtered feed elements from a case feed that match the search criteria. searchfeedelementsinfilterfeed(communityid, subjectid, keyprefix, q) get the feed elements from a feed filtered by a key prefix that match the search criteria. searchfeedelementsinfilterfeed(communityid, subjectid, keyprefix, pageparam, pagesize, sortparam, q) get a page of sorted feed elements from a feed filtered by a key prefix that match the search criteria. searchfeedelementsinfilterfeed(communityid, subjectid, keyprefix, recentcommentcount, density, pageparam, pagesize, sortparam, q) get a page of sorted feed elements from a feed filtered by a key prefix that match the search criteria. each feed element includes no more than the specified number of comments. searchstreams(communityid, q) search the chatter feed streams for the context user. searchstreams(communityid, q, sortparam) search and sort the chatter feed streams for the context user. 467apex reference guide chatterfeeds class searchstreams(communityid, q, pageparam, pagesize) search the chatter feed streams for the context user and return a page of results. searchstreams(communityid, q, pageparam, pagesize, sortparam) search the chatter feed streams for the context user and return a sorted page of results. searchstreams(communityid, q, pageparam, pagesize, sortparam, globalscope) search the chatter feed streams from all experience cloud sites for the context user and return a sorted page of results. setcommentisverified(communityid, commentid, isverified) mark a comment as verified or unverified. setcommentisverifiedbyanonymized(communityid, commentid, isverified, isverifiedbyanonymized) mark a comment as verified by an anonymous user. setcommentvote(communityid, commentid, updownvote) upvote or downvote a comment. setfeedcommentstatus(communityid, commentid, status) set the status of a comment |
. setfeedelementisclosed(communityid, feedelementid, isclosed) set a feed element to closed. setfeedelementvote(communityid, feedelementid, updownvote) upvote or downvote a feed element. setfeedentitystatus(communityid, feedelementid, status) set the status of a feed post. setismutedbyme(communityid, feedelementid, ismutedbyme) mute or unmute a feed element. setisreadbyme(communityid, feedelementid, readby) mark a feed element as read for the context user using an input class. setisreadbyme(communityid, feedelementid, isreadbyme) mark a feed element as read for the context user. updatecomment(communityid, commentid, comment) edit a comment. updatedirectmessage(communityid, feedelementid, directmessage) update the members of a direct message. updatefeedelement(communityid, feedelementid, feedelement) edit a feed element. updatefeedelementbookmarks(communityid, feedelementid, bookmarks) bookmark a feed element or remove a bookmark from a feed element using an input class. updatefeedelementbookmarks(communityid, feedelementid, isbookmarkedbycurrentuser) bookmark a feed element or remove a bookmark from a feed element. updatefeedelementreadbycapabilitybatch(communityid, feedelementids, readby) mark multiple feed elements as read by the context user at the same time using an input class. updatefeedelementreadbycapabilitybatch(communityid, feedelementids, isreadbyme) mark multiple feed elements as read by the context user at the same time. 468apex reference guide chatterfeeds class updatelikeforcomment(communityid, commentid, islikedbycurrentuser) like or unlike a comment. updatelikeforfeedelement(communityid, feedelementid, islikedbycurrentuser) like or unlike a feed element. updatepinnedfeedelements(communityid, feedtype, subjectid, pin) pin or unpin feed elements to a group or topic feed. updatestream(communityid, streamid, streaminput) update a chatter feed stream. voteonfeedelementpoll(communityid, feedelementid, mychoiceid) vote on a poll or change your vote on a poll. createstream(communityid, streaminput) create a chatter feed stream. api version 39.0 requires chatter yes signature public static connectapi.chatterstream createstream(string communityid, connectapi.chatterstreaminput streaminput) parameters communityid type: string id for an experience cloud site, internal, or null. streaminput type: connectapi.chatterstreaminput a connectapi.chatterstreaminput body. return value type: connectapi.chatterstream deletecomment(communityid, commentid) delete a comment. 469apex reference guide chatterfeeds class api version 28.0 requires chatter yes signature public static void deletecomment(string communityid, string commentid) parameters communityid type: string id for an experience cloud site, internal, or null. commentid type: string id for a comment. return value type: void deletefeedelement(communityid, feedelementid) delete a feed element. api version 31.0 requires chatter yes signature public static deletefeedelement(string communityid, string feedelementid) parameters communityid type: string id for an experience cloud site, internal, or null. feedelementid type: string id of the feed element. 470apex reference guide chatterfeeds class return value type: void deletelike(communityid, likeid) delete a like on a comment or post. api version 28.0 requires chatter yes signature public static void deletelike(string communityid, string likeid) parameters communityid type: string id for an experience cloud site, internal, or null. likeid type: string id for a like. return value type: void deletestream(communityid, streamid) delete a chatter feed stream. api version 39.0 requires chatter yes signature public static void deletestream(string communityid, string streamid) 471apex reference guide chatterfeeds class parameters |
communityid type: string id for an experience cloud site, internal, or null. streamid type: string id of the chatter feed stream. return value type: void getcomment(communityid, commentid) get a comment. api version 28.0 available to guest users 31.0 requires chatter yes signature public static connectapi.comment getcomment(string communityid, string commentid) parameters communityid type: string id for an experience cloud site, internal, or null. commentid type: string id for a comment. return value type: connectapi.comment getcommentbatch(communityid, commentids) get a list of comments. 472apex reference guide chatterfeeds class api version 42.0 requires chatter yes signature public static connectapi.batchresult[] getcommentbatch(string communityid, list<string> commentids) parameters communityid type: string id for an experience cloud site, internal, or null. commentids type: list<string> a list of up to 100 comment ids. return value type: connectapi.batchresult[] the connectapi.batchresult.getresult() method returns a connectapi.comment object and errors for comments that didn’t load. getcommentincontext(communityid, commentid, pagesize) get a threaded comment in the context of its parent comments and post. api version 44.0 available to guest users 44.0 requires chatter yes signature public static connectapi.feedelement getcommentincontext(string communityid, string commentid, integer pagesize) 473apex reference guide chatterfeeds class parameters communityid type: string id for an experience cloud site, internal, or null. commentid type: string id of the comment. pagesize type: integer specifies the number of items per page. valid values are from 1 through 100. if you don’t specify a value, the default size is 25. return value type: connectapi.feedelement if the comment doesn’t support the comments capability, the return value is connectapi.notfoundexception. getcommentsforfeedelement(communityid, feedelementid) get comments for a feed element. api version 32.0 available to guest users 32.0 requires chatter yes signature public static connectapi.commentpage getcommentsforfeedelement(string communityid, string feedelementid) parameters communityid type: string id for an experience cloud site, internal, or null. feedelementid type: string id of the feed element. 474apex reference guide chatterfeeds class return value type: connectapi.commentpage if the feed element doesn’t support the comments capability, the return value is connectapi.notfoundexception. getcommentsforfeedelement(communityid, feedelementid, threadedcommentscollapsed) get comments in a threaded style for a feed element. api version 44.0 available to guest users 44.0 requires chatter yes signature public static connectapi.commentpage getcommentsforfeedelement(string communityid, string feedelementid, boolean threadedcommentscollapsed) parameters communityid type: string id for an experience cloud site, internal, or null. feedelementid type: string id of the feed element. threadedcommentscollapsed type: boolean specifies whether to return threaded comments in a collapsed style (true) or not (false). if you pass in null, the default is false. return value type: connectapi.commentpage if the feed element doesn’t support the comments capability, the return value is connectapi.notfoundexception. getcommentsforfeedelement(communityid, feedelementid, pageparam, pagesize) get a page of comments for a feed element. 475apex reference guide chatterfeeds class api version 32.0 available to guest users 32.0 requires chatter yes signature public static connectapi.commentpage getcommentsforfeedelement(string communityid, string feedelementid, string pageparam, integer pagesize) parameters communityid type: string id for an experience cloud site, internal, or null. feedelementid type: string id of the feed element. page |
param type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of comments per page. valid values are from 1 through 100. if you pass null, the default size is 25. return value type: connectapi.commentpage if the feed element doesn’t support the comments capability, the return value is connectapi.notfoundexception. getcommentsforfeedelement(communityid, feedelementid, pageparam, pagesize, threadedcommentscollapsed) get a page of comments in a threaded style for a feed element. api version 44.0 476apex reference guide chatterfeeds class available to guest users 44.0 requires chatter yes signature public static connectapi.commentpage getcommentsforfeedelement(string communityid, string feedelementid, string pageparam, integer pagesize, boolean threadedcommentscollapsed) parameters communityid type: string id for an experience cloud site, internal, or null. feedelementid type: string id of the feed element. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of comments per page. valid values are from 1 through 100. if you pass null, the default size is 25. threadedcommentscollapsed type: boolean specifies whether to return threaded comments in a collapsed style (true) or not (false). if you pass in null, the default is false. return value type: connectapi.commentpage if the feed element doesn’t support the comments capability, the return value is connectapi.notfoundexception. getcommentsforfeedelement(communityid, feedelementid, threadedcommentscollapsed, sortparam) get sorted comments in a threaded style for a feed element. api version 44.0 477apex reference guide chatterfeeds class available to guest users 44.0 requires chatter yes signature public static connectapi.commentscapability getcommentsforfeedelement(string communityid, string feedelementid, boolean threadedcommentscollapsed, connectapi.feedcommentsortorder sortparam) parameters communityid type: string id for an experience cloud site, internal, or null. feedelementid type: string id of the feed element. threadedcommentscollapsed type: boolean specifies whether to return threaded comments in a collapsed style (true) or not (false). if you pass in null, the default is false. sortparam type: connectapi.feedcommentsortorder order of comments. values are: • createddatelatestasc—sorts by most recently created comments in ascending order. • createddateoldestasc—sorts by oldest comments in ascending order. • relevance—sorts by most relevant content. sorting in descending order isn’t supported. return value type: connectapi.commentpage if the feed element doesn’t support the comments capability, the return value is connectapi.notfoundexception. getcommentsforfeedelement(communityid, feedelementid, pageparam, pagesize, threadedcommentscollapsed, sortparam) get a page of sorted comments in a threaded style for a feed element. 478apex reference guide chatterfeeds class api version 44.0 available to guest users 44.0 requires chatter yes signature public static connectapi.commentpage getcommentsforfeedelement(string communityid, string feedelementid, string pageparam, integer pagesize, boolean threadedcommentscollapsed, connectapi.feedcommentsortorder sortparam) parameters communityid type: string id for an experience cloud site, internal, or null. feedelementid type: string id of the feed element. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of comments per page. valid values are from 1 through 100. if you pass null, the default size is 25 |
. threadedcommentscollapsed type: boolean specifies whether to return threaded comments in a collapsed style (true) or not (false). if you pass in null, the default is false. sortparam type: connectapi.feedcommentsortorder order of comments. values are: • createddatelatestasc—sorts by most recently created comments in ascending order. • createddateoldestasc—sorts by oldest comments in ascending order. • relevance—sorts by most relevant content. sorting in descending order isn’t supported. 479apex reference guide chatterfeeds class return value type: connectapi.commentpage if the feed element doesn’t support the comments capability, the return value is connectapi.notfoundexception. getcommentsforfeedelement(communityid, feedelementid, sortparam) get sorted comments for a feed element. api version 41.0 available to guest users 41.0 requires chatter yes signature public static connectapi.commentscapability getcommentsforfeedelement(string communityid, string feedelementid, connectapi.feedcommentsortorder sortparam) parameters communityid type: string id for an experience cloud site, internal, or null. feedelementid type: string id of the feed element. sortparam type: connectapi.feedcommentsortorder order of comments. values are: • createddatelatestasc—sorts by most recently created comments in ascending order. • createddateoldestasc—sorts by oldest comments in ascending order. • relevance—sorts by most relevant content. sorting in descending order isn’t supported. return value type: connectapi.commentscapability if the feed element doesn’t support the comments capability, the return value is connectapi.notfoundexception. 480apex reference guide chatterfeeds class getcommentsforfeedelement(communityid, feedelementid, sortparam, threadedcommentscollapsed) get sorted comments in a threaded style for a feed element. api version 44.0 available to guest users 44.0 requires chatter yes signature public static connectapi.commentscapability getcommentsforfeedelement(string communityid, string feedelementid, connectapi.feedcommentsortorder sortparam, boolean threadedcommentscollapsed) parameters communityid type: string id for an experience cloud site, internal, or null. feedelementid type: string id of the feed element. sortparam type: connectapi.feedcommentsortorder order of comments. values are: • createddatelatestasc—sorts by most recently created comments in ascending order. • createddateoldestasc—sorts by oldest comments in ascending order. • relevance—sorts by most relevant content. sorting in descending order isn’t supported. threadedcommentscollapsed type: boolean specifies whether to return threaded comments in a collapsed style (true) or not (false). if you pass in null, the default is false. return value type: connectapi.commentscapability 481apex reference guide chatterfeeds class if the feed element doesn’t support the comments capability, the return value is connectapi.notfoundexception. getextensions(communityid, pageparam, pagesize) get extensions. api version 40.0 available to guest users 40.0 requires chatter yes signature public static connectapi.extensiondefinitions getextensions(string communityid, string pageparam, integer pagesize) parameters communityid type: string id for an experience cloud site, internal, or null. pageparam type: string specifies the page token to use to view a page of information. page tokens are returned as part of the response class, such as currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of items per page. valid values are from 1 through 100. the default size is 15. return value type: connectapi.extensiondefinitions getfeed(communityid, feedtype) get a feed. api version 28.0 482 |
apex reference guide chatterfeeds class available to guest users 32.0 requires chatter yes signature public static connectapi.feed getfeed(string communityid, connectapi.feedtype feedtype) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype type of feed. valid values are company, directmessagemoderation, directmessages, home, moderation, and pendingreview. return value type: connectapi.feed getfeed(communityid, feedtype, sortparam) get a sorted feed. api version 28.0 available to guest users 32.0 requires chatter yes signature public static connectapi.feed getfeed(string communityid, connectapi.feedtype feedtype, connectapi.feedsortorder sortparam) 483apex reference guide chatterfeeds class parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype type of feed. valid values are company, directmessagemoderation, directmessages, home, moderation, and pendingreview. sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. if you pass in null, the default value createddatedesc is used. if feedtype is directmessages, sortparam must be lastmodifieddatedesc. return value type: connectapi.feed getfeed(communityid, feedtype, subjectid) get a feed for a record or user. api version 28.0 available to guest users 32.0 requires chatter yes signature public static connectapi.feed getfeed(string communityid, connectapi.feedtype feedtype, string subjectid) 484apex reference guide chatterfeeds class parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype type of feed. valid values include every connectapi.feedtype except company, directmessagemoderation, directmessages, filter, home, landing, moderation, and pendingreview. subjectid type: string if feedtype is record, subjectid can be any record id, including a group id. if feedtype is streams, subjectid must be a stream id. if feedtype is topics, subjectid must be a topic id. if feedtype is userprofile, subjectid can be any user id. if the feedtype is any other value, subjectid must be the id of the context user or the alias me. return value type: connectapi.feed getfeed(communityid, feedtype, subjectid, sortparam) get a sorted feed for a record or user. api version 28.0 available to guest users 32.0 requires chatter yes signature public static connectapi.feed getfeed(string communityid, connectapi.feedtype feedtype, string subjectid, connectapi.feedsortorder sortparam) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype 485apex reference guide chatterfeeds class type of feed. valid values include every connectapi.feedtype except company, directmessagemoderation, directmessages, filter, home, landing, moderation, and pendingreview. subjectid type: string if feedtype is record, subjectid can be any record id, including a group id. if feedtype is streams, subjectid must be a stream id. if feedtype is topics, subjectid must be a topic id. if feedtype is userprofile, subjectid can be any user id. if the feedtype is any other value, subjectid must be the id of the context user or the alias |
me. sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. if you pass in null, the default value createddatedesc is used. return value type: connectapi.feed getfeeddirectory(string) get a list of all feeds available to the context user. api version 30.0 requires chatter yes signature public static connectapi.feeddirectory getfeeddirectory(string communityid) parameters communityid type: string id for an experience cloud site, internal, or null. 486apex reference guide chatterfeeds class return value type: connectapi.feeddirectory getfeedelement(communityid, feedelementid) get a feed element. api version 31.0 available to guest users 31.0 requires chatter yes signature public static connectapi.feedelement getfeedelement(string communityid, string feedelementid) parameters communityid type: string id for an experience cloud site, internal, or null. feedelementid type: string id of the feed element. return value type: connectapi.feedelement getfeedelement(communityid, feedelementid, commentsort) get a feed element with sorted comments. api version 41.0 available to guest users 41.0 487apex reference guide chatterfeeds class requires chatter yes signature public static connectapi.feedelement getfeedelement(string communityid, string feedelementid, connectapi.feedcommentsortorder commentsort) parameters communityid type: string id for an experience cloud site, internal, or null. feedelementid type: string id of the feed element. commentsort type: connectapi.feedcommentsortorder order of comments. • createddatelatestasc—sorts by most recently created comments in ascending order. • createddateoldestasc—sorts by oldest comments in ascending order. • relevance—sorts by most relevant content. the default value is createddatelatestasc. sorting in descending order isn’t supported. return value type: connectapi.feedelement getfeedelement(communityid, feedelementid, threadedcommentscollapsed) get a feed element and its comments in a threaded style. api version 44.0 available to guest users 44.0 requires chatter yes 488apex reference guide chatterfeeds class signature public static connectapi.feedelement getfeedelement(string communityid, string feedelementid, boolean threadedcommentscollapsed) parameters communityid type: string id for an experience cloud site, internal, or null. feedelementid type: string id of the feed element. threadedcommentscollapsed type: boolean specifies whether to return threaded comments in a collapsed style (true) or not (false). if you pass in null, the default is false. return value type: connectapi.feedelement getfeedelement(communityid, feedelementid, threadedcommentscollapsed, commentsort) get a feed element and its sorted comments in a threaded style. api version 44.0 available to guest users 44.0 requires chatter yes signature public static connectapi.feedelement getfeedelement(string communityid, string feedelementid, boolean threadedcommentscollapsed, connectapi.feedcommentsortorder commentsort) parameters communityid type: string 489apex reference guide chatterfeeds class id for an experience cloud site, internal, or null. feedelementid type: string id of the feed element. threadedcommentscollapsed type: boolean specifies whether to return threaded comments in a collapsed style (true) or not (false). if you pass in null, the default is false. commentsort type: connectapi.feedcommentsortorder order of comments. • |
createddatelatestasc—sorts by most recently created comments in ascending order. • createddateoldestasc—sorts by oldest comments in ascending order. • relevance—sorts by most relevant content. sorting in descending order isn’t supported. return value type: connectapi.feedelement getfeedelement(communityid, feedelementid, recentcommentcount, elementsperbundle) get a feed element with the specified number of elements per bundle including no more than the specified number of comments per feed element. api version 31.0 available to guest users 31.0 requires chatter yes signature public static connectapi.feedelement getfeedelement(string communityid, string feedelementid, integer recentcommentcount, integer elementsperbundle) parameters communityid type: string 490apex reference guide chatterfeeds class id for an experience cloud site, internal, or null. feedelementid type: string id of the feed element. recentcommentcount type: integer maximum number of comments to return with each feed element. the default value is 3. elementsperbundle type: integer maximum number of feed elements per bundle. the default and maximum value is 10. return value type: connectapi.feedelement getfeedelement(communityid, feedelementid, recentcommentcount, elementsperbundle, threadedcommentscollapsed) get a feed element with its comments in a threaded style with the specified number of elements per bundle and comments per feed element. api version 44.0 available to guest users 44.0 requires chatter yes signature public static connectapi.feedelement getfeedelement(string communityid, string feedelementid, integer recentcommentcount, integer elementsperbundle, boolean threadedcommentscollapsed) parameters communityid type: string id for an experience cloud site, internal, or null. feedelementid type: string id of the feed element. 491apex reference guide chatterfeeds class recentcommentcount type: integer maximum number of comments to return with each feed element. the default value is 3. elementsperbundle type: integer maximum number of feed elements per bundle. the default and maximum value is 10. threadedcommentscollapsed type: boolean specifies whether to return threaded comments in a collapsed style (true) or not (false). if you pass in null, the default is false. return value type: connectapi.feedelement getfeedelement(communityid, feedelementid, recentcommentcount, elementsperbundle, threadedcommentscollapsed, commentsort) get a feed element with its sorted comments in a threaded style with the specified number of elements per bundle and comments per feed element. api version 44.0 available to guest users 44.0 requires chatter yes signature public static connectapi.feedelement getfeedelement(string communityid, string feedelementid, integer recentcommentcount, integer elementsperbundle, boolean threadedcommentscollapsed, connectapi.feedcommentsortorder commentsort) parameters communityid type: string id for an experience cloud site, internal, or null. feedelementid type: string id of the feed element. 492apex reference guide chatterfeeds class recentcommentcount type: integer maximum number of comments to return with each feed element. the default value is 3. elementsperbundle type: integer maximum number of feed elements per bundle. the default and maximum value is 10. threadedcommentscollapsed type: boolean specifies whether to return threaded comments in a collapsed style (true) or not (false). if you pass in null, the default is false. commentsort type: connectapi.feedcommentsortorder order of comments. • createddatelatestasc—sorts by most recently created comments in ascending order. • createddateoldestasc—sorts by oldest comments in ascending order. • relevance—sorts by most relevant content. sorting in descending order isn’t supported. return value type: connectapi.feedelement getfeedelement(communityid, feedelementid, recentcommentcount, elementsperbundle, commentsort) get a feed element with the specified number of elements per bundle including no more than the specified number of sorted comments per feed element. api version 41.0 available to guest users 41.0 requires chatter yes signature |
public static connectapi.feedelement getfeedelement(string communityid, string feedelementid, integer recentcommentcount, integer elementsperbundle, connectapi.feedcommentsortorder commentsort) 493apex reference guide chatterfeeds class parameters communityid type: string id for an experience cloud site, internal, or null. feedelementid type: string id of the feed element. recentcommentcount type: integer maximum number of comments to return with each feed element. the default value is 3. elementsperbundle type: integer maximum number of feed elements per bundle. the default and maximum value is 10. commentsort type: connectapi.feedcommentsortorder order of comments. • createddatelatestasc—sorts by most recently created comments in ascending order. • createddateoldestasc—sorts by oldest comments in ascending order. • relevance—sorts by most relevant content. the default value is createddatelatestasc. sorting in descending order isn’t supported. return value type: connectapi.feedelement getfeedelementbatch(communityid, feedelementids) get a list of feed elements. api version 31.0 available to guest users 32.0 requires chatter yes 494apex reference guide chatterfeeds class signature public static connectapi.batchresult[] getfeedelementbatch(string communityid, list<string> feedelementids) parameters communityid type: string id for an experience cloud site, internal, or null. feedelementids type: list<string> a list of up to 500 feed element ids. return value type: connectapi.batchresult[] the connectapi.batchresult.getresult() method returns a connectapi.feedelement object and errors for feed elements that didn’t load. getfeedelementpoll(communityid, feedelementid) get the poll associated with a feed element. api version 32.0 available to guest users 32.0 requires chatter yes signature public static connectapi.pollcapability getfeedelementpoll(string communityid, string feedelementid) parameters communityid type: string id for an experience cloud site, internal, or null. feedelementid type: string id of the feed element. 495apex reference guide chatterfeeds class return value type: connectapi.pollcapability if the feed element doesn’t support this capability, the return value is connectapi.notfoundexception. note: triggers on feeditem objects run before their attachment and capabilities information is saved, which means that connectapi.feeditem.attachment information and connectapi.feedelement.capabilities information may not be available in the trigger. getfeedelementsfrombundle(communityid, feedelementid) get feed elements from a bundle. api version 31.0 requires chatter yes signature public static connectapi.feedelementpage getfeedelementsfrombundle(string communityid, string feedelementid) parameters communityid type: string id for an experience cloud site, internal, or null. feedelementid type: string id of the feed element. return value type: connectapi.feedelementpage getfeedelementsfrombundle(communityid, feedelementid, pageparam, pagesize, elementsperbundle, recentcommentcount) get a page of feed elements from a bundle. specify the number of elements per bundle and include no more than the specified number of comments per feed element. api version 31.0 496apex reference guide chatterfeeds class requires chatter yes signature public static connectapi.feedelementpage getfeedelementsfrombundle(string communityid, string feedelementid, string pageparam, integer pagesize, integer elementsperbundle, integer recentcommentcount) parameters communityid type: string id for an experience cloud site, internal, or null. feedelementid type: string id of the feed element. pageparam type: string specifies the page token to use to view a page of information. page tokens are returned as part of the response class, such as currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of feed elements per page. valid values are from 1 |
through 100. if you pass in null, the default size is 25. elementsperbundle type: integer maximum number of feed elements per bundle. the default and maximum value is 10. recentcommentcount type: integer maximum number of comments to return with each feed element. the default value is 3. return value type: connectapi.feedelementpage getfeedelementsfromfeed(communityid, feedtype) get feed elements from the company, directmessagemoderation, directmessages, home, moderation, and pendingreview feeds. api version 31.0 497apex reference guide chatterfeeds class available to guest users 31.0 requires chatter yes signature public static connectapi.feedelementpage getfeedelementsfromfeed(string communityid, connectapi.feedtype feedtype) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype type of feed. valid values are company, directmessagemoderation, directmessages, home, moderation, and pendingreview. return value type: connectapi.feedelementpage usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: settestgetfeedelementsfromfeed(communityid, feedtype, result) apex developer guide: testing connectapi code getfeedelementsfromfeed(communityid, feedtype, pageparam, pagesize, sortparam) get a page of sorted feed elements from the company, directmessagemoderation, directmessages, home, moderation, and pendingreview feeds. api version 31.0 available to guest users 31.0 498apex reference guide chatterfeeds class requires chatter yes signature public static connectapi.feedelementpage getfeedelementsfromfeed(string communityid, connectapi.feedtype feedtype, string pageparam, integer pagesize, connectapi.feedsortorder sortparam) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype type of feed. valid values are company, directmessagemoderation, directmessages, home, moderation, and pendingreview. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. if you pass in null, the default value createddatedesc is used. if feedtype is directmessages, sortparam must be lastmodifieddatedesc. return value type: connectapi.feedelementpage 499apex reference guide chatterfeeds class usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: settestgetfeedelementsfromfeed(communityid, feedtype, pageparam, pagesize, sortparam, result) apex developer guide: testing connectapi code getfeedelementsfromfeed(communityid, feedtype, recentcommentcount, density, pageparam, pagesize, sortparam) get a page of sorted feed elements from the company, directmessagemoderation, directmessages, home, moderation, and pendingreview feeds. each feed element contains no more than the specified number of comments. api version 31.0 |
available to guest users 31.0 requires chatter yes signature public static connectapi.feedelementpage getfeedelementsfromfeed(string communityid, connectapi.feedtype feedtype, integer recentcommentcount, connectapi.feeddensity density, string pageparam, integer pagesize, connectapi.feedsortorder sortparam) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype type of feed. valid values are company, directmessagemoderation, directmessages, home, moderation, and pendingreview. recentcommentcount type: integer maximum number of comments to return with each feed item. the default value is 3. density type: connectapi.feeddensity 500apex reference guide chatterfeeds class specify the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. if you pass in null, the default value createddatedesc is used. if feedtype is directmessages, sortparam must be lastmodifieddatedesc. return value type: connectapi.feedelementpage usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: settestgetfeedelementsfromfeed(communityid, feedtype, recentcommentcount, density, pageparam, pagesize, sortparam, result) apex developer guide: testing connectapi code getfeedelementsfromfeed(communityid, feedtype, recentcommentcount, density, pageparam, pagesize, sortparam, filter) get a page of sorted and filtered feed elements from the home feed. each feed element contains no more than the specified number of comments. 501apex reference guide chatterfeeds class api version 32.0 available to guest users 32.0 requires chatter yes signature public static connectapi.feedelementpage getfeedelementsfromfeed(string communityid, connectapi.feedtype feedtype, integer recentcommentcount, connectapi.feeddensity density, string pageparam, integer pagesize, connectapi.feedsortorder sortparam, connectapi.feedfilter filter) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype the type of feed. the only valid value is home. recentcommentcount type: integer maximum number of comments to return with each feed item. the default value is 3. density type: connectapi.feeddensity specify the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string page token to use to view the page. page tokens are returned as |
part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. when the sortparam is mostviewed, you must pass in null for the pageparam. pagesize type: integer specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in null, the default size is 25. 502apex reference guide chatterfeeds class when the sortparam is mostviewed, the pagesize must be a value from 1 to 25. sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. if you pass in null, the default value createddatedesc is used. filter type: connectapi.feedfilter specifies the feed filters. • allquestions—feed elements that are questions. • authoredby—feed elements authored by the user profile owner. this value is valid only for the userprofile feed. • communityscoped—feed elements that are scoped to experience cloud sites. currently, these feed elements have a user or a group parent record. however, other parent record types could be scoped to sites in the future. feed elements that are always visible in all sites are filtered out. this value is valid only for the userprofile feed. • questionswithcandidateanswers—feed elements that are questions that have candidate answers associated with them.this value is valid only for users with the access einstein-generated answers permission. • questionswithcandidateanswersreviewedpublished—feed elements that are questions that have candidate answers that have been reviewed or published. this value is valid only for users with the access einstein-generated answers permission. • read—feed elements that are older than 30 days or are marked as read for the context user. includes existing feed elements when the context user joined the group. this value is valid only for the record feed of a group. • solvedquestions—feed elements that are questions and that have a best answer. • unansweredquestions—feed elements that are questions and that don’t have any answers. • unansweredquestionswithcandidateanswers—feed elements that are questions that don’t have answers but have candidate answers associated with them. this value is valid only for users with the access einstein-generated answers permission. • unread—feed elements that are created in the past 30 days and aren’t marked as read for the context user. this value is valid only for the record feed of a group. • unsolvedquestions—feed elements that are questions and that don’t have a best answer. return value type: connectapi.feedelementpage 503apex reference guide chatterfeeds class usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: settestgetfeedelementsfromfeed(communityid, feedtype, recentcommentcount, density, pageparam, pagesize, sortparam, filter, result) apex developer guide: testing connectapi code getfeedelementsfromfeed(communityid, feedtype, recentcommentcount, density, pageparam, pagesize, sortparam, filter, threadedcommentscollapsed) get a page of filtered and sorted feed elements with comments in a threaded style from the home feed. each feed element contains no more than the specified number of comments. api version 44.0 available to guest users 44.0 requires chatter yes signature public static connectapi.feedelementpage getfeedelementsfromfeed(string communityid, connectapi.feedtype feedtype, integer recentcommentcount, connectapi.feeddensity density, string pageparam, integer pagesize, connectapi.feedsortorder sortparam, connectapi.feedfilter filter, boolean threadedcommentscollapsed) parameters communityid type: string id for an experience cloud site, internal, or null. feed |
type type: connectapi.feedtype the type of feed. the only valid value is home. recentcommentcount type: integer maximum number of comments to return with each feed item. the default value is 3. 504apex reference guide chatterfeeds class density type: connectapi.feeddensity specify the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. when the sortparam is mostviewed, you must pass in null for the pageparam. pagesize type: integer specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in null, the default size is 25. when the sortparam is mostviewed, the pagesize must be a value from 1 to 25. sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. if you pass in null, the default value createddatedesc is used. filter type: connectapi.feedfilter specifies the feed filters. • allquestions—feed elements that are questions. • authoredby—feed elements authored by the user profile owner. this value is valid only for the userprofile feed. • communityscoped—feed elements that are scoped to experience cloud sites. currently, these feed elements have a user or a group parent record. however, other parent record types could be scoped to sites in the future. feed elements that are always visible in all sites are filtered out. this value is valid only for the userprofile feed. • questionswithcandidateanswers—feed elements that are questions that have candidate answers associated with them.this value is valid only for users with the access einstein-generated answers permission. • questionswithcandidateanswersreviewedpublished—feed elements that are questions that have candidate answers that have been reviewed or published. this value is valid only for users with the access einstein-generated answers permission. 505apex reference guide chatterfeeds class • read—feed elements that are older than 30 days or are marked as read for the context user. includes existing feed elements when the context user joined the group. this value is valid only for the record feed of a group. • solvedquestions—feed elements that are questions and that have a best answer. • unansweredquestions—feed elements that are questions and that don’t have any answers. • unansweredquestionswithcandidateanswers—feed elements that are questions that don’t have answers but have candidate answers associated with them. this value is valid only for users with the access einstein-generated answers permission. • unread—feed elements that are created in the past 30 days and aren’t marked as read for the context user. this value is valid only for the record feed of a group. • unsolvedquestions—feed elements that are questions and that don’t have a best answer. threadedcommentscollapsed type: boolean specifies whether to return threaded comments in a collapsed style (true) or not (false). if you pass in null, the default is false. return value type: connectapi.feedelementpage usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: settestgetfeedelementsfromfeed(communityid, feedtype, recentcommentcount, density, pageparam, pagesize, sortparam, filter, thread |
edcommentscollapsed, result) apex developer guide: testing connectapi code getfeedelementsfromfeed(communityid, feedtype, subjectid) get feed elements from any feed other than company, directmessagemoderation, directmessages, filter, home, landing, moderation, and pendingreview for a user or record. api version 31.0 available to guest users 31.0 requires chatter yes 506apex reference guide chatterfeeds class signature public static connectapi.feedelementpage getfeedelementsfromfeed(string communityid, connectapi.feedtype feedtype, string subjectid) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype type of feed. valid values include every connectapi.feedtype except company, directmessagemoderation, directmessages, filter, home, landing, moderation, and pendingreview. subjectid type: string if feedtype is record, subjectid can be any record id, including a group id. if feedtype is streams, subjectid must be a stream id. if feedtype is topics, subjectid must be a topic id. if feedtype is userprofile, subjectid can be any user id. if the feedtype is any other value, subjectid must be the id of the context user or the alias me. return value type: connectapi.feedelementpage usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. example for getting the context user’s news feed connectapi.feedelementpage fep = connectapi.chatterfeeds.getfeedelementsfromfeed(network.getnetworkid(), connectapi.feedtype.news, 'me'); example for getting another user’s profile feed connectapi.feedelementpage fep = connectapi.chatterfeeds.getfeedelementsfromfeed(network.getnetworkid(), connectapi.feedtype.userprofile, '005r0000000hwma'); 507apex reference guide chatterfeeds class example for getting another user’s record feed connectapi.feedelementpage fep = connectapi.chatterfeeds.getfeedelementsfromfeed(network.getnetworkid(), connectapi.feedtype.record, '005r0000000hwma'); see also: settestgetfeedelementsfromfeed(communityid, feedtype, subjectid, result) apex developer guide: testing connectapi code getfeedelementsfromfeed(communityid, feedtype, subjectid, pageparam, pagesize, sortparam) get a page of sorted feed elements from any feed other than company, directmessagemoderation, directmessages, filter, home, landing, moderation, and pendingreview. api version 31.0 available to guest users 31.0 requires chatter yes signature public static connectapi.feedelementpage getfeedelementsfromfeed(string communityid, connectapi.feedtype feedtype, string subjectid, string pageparam, integer pagesize, connectapi.feedsortorder sortparam) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype type of feed. valid values include every connectapi.feedtype except company, directmessagemoderation, directmessages, filter, home, landing, moderation, and pendingreview. subjectid type: string if feedtype is record, subjectid can be any record id, including a group id. if feedtype is streams, subjectid must be a stream id. if feedtype is topics, subjectid must be a topic id. if feedtype is userprofile, subjectid can be any user id. if the feedtype is any other value, subjectid must be the id of the context user or the alias me. 508apex reference guide chatterfeeds class pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer the number of feed elements per page. sortparam type: connectapi.feedsortorder |
values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. if you pass in null, the default value createddatedesc is used. return value type: connectapi.feedelementpage usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: settestgetfeedelementsfromfeed(communityid, feedtype, subjectid, pageparam, pagesize, sortparam, result) apex developer guide: testing connectapi code getfeedelementsfromfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam) get a page of sorted feed elements from any feed other than company, directmessagemoderation, directmessages, filter, home, landing, moderation, and pendingreview. each feed element includes no more than the specified number of comments. api version 31.0 509apex reference guide chatterfeeds class available to guest users 31.0 requires chatter yes signature public static connectapi.feedelementpage getfeedelementsfromfeed(string communityid, connectapi.feedtype feedtype, string subjectid, integer recentcommentcount, connectapi.feeddensity density, string pageparam, integer pagesize, connectapi.feedsortorder sortparam) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype type of feed. valid values include every connectapi.feedtype except company, directmessagemoderation, directmessages, filter, home, landing, moderation, and pendingreview. subjectid type: string if feedtype is record, subjectid can be any record id, including a group id. if feedtype is streams, subjectid must be a stream id. if feedtype is topics, subjectid must be a topic id. if feedtype is userprofile, subjectid can be any user id. if the feedtype is any other value, subjectid must be the id of the context user or the alias me. recentcommentcount type: integer maximum number of comments to return with each feed element. the default value is 3. density type: connectapi.feeddensity specify the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer 510apex reference guide chatterfeeds class specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. if you pass in null, the default value createddatedesc is used. return value type: connectapi.feedelementpage usage |
to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: settestgetfeedelementsfromfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam, result) apex developer guide: testing connectapi code getfeedelementsfromfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam, showinternalonly) get a page of sorted feed elements from a record feed. each feed element includes no more than the specified number of comments. specify whether to return feed elements posted by internal (non-experience cloud site) users only. api version 31.0 available to guest users 31.0 requires chatter yes 511apex reference guide chatterfeeds class signature public static connectapi.feedelementpage getfeedelementsfromfeed(string communityid, connectapi.feedtype feedtype, string subjectid, integer recentcommentcount, connectapi.feeddensity density, string pageparam, integer pagesize, connectapi.feedsortorder sortparam, boolean showinternalonly) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype value must be connectapi.feedtype.record. subjectid type: string any record id, including a group id. recentcommentcount type: integer maximum number of comments to return with each feed item. the default value is 3. density type: connectapi.feeddensity specify the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. 512apex reference guide chatterfeeds class • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. if you pass in null, the default value createddatedesc is used. showinternalonly type: boolean specifies whether to show only feed items from internal (non-experience cloud site) users (true), or not (false). the default value is false. return value type: connectapi.feedelementpage usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: settestgetfeedelementsfromfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam, showinternalonly, result) apex developer guide: testing connectapi code getfeedelementsfromfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam, filter) get a page of sorted and filtered feed elements from the userprofile feed. api version 35.0 available to guest users 35.0 requires chatter yes signature public static connectapi.feedelementpage getfeedelementsfromfeed(string communityid, connectapi.feedtype feedtype, string subjectid, integer recentcommentcount, connectapi.feeddensity density, string page |
param, integer pagesize, connectapi.feedsortorder sortparam, connectapi.feedfilter filter) 513apex reference guide chatterfeeds class parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype value must be connectapi.feedtype.userprofile. subjectid type: string id of any user. to specify the context user, use the user id or the alias me. recentcommentcount type: integer maximum number of comments to return with each feed element. the default value is 3. density type: connectapi.feeddensity specify the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. if you pass in null, the default value createddatedesc is used. filter type: connectapi.feedfilter 514apex reference guide chatterfeeds class value must be connectapi.feedfilter.communityscoped or connectapi.feedfilter.authoredby. return value type: connectapi.feedelementpage usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. example this example gets only community-specific feed elements. connectapi.feedelementpage fep = connectapi.chatterfeeds.getfeedelementsfromfeed(network.getnetworkid(), connectapi.feedtype.userprofile, 'me', 3, connectapi.feeddensity.fewerupdates, null, null, connectapi.feedsortorder.lastmodifieddatedesc, connectapi.feedfilter.communityscoped); see also: settestgetfeedelementsfromfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam, filter, result) apex developer guide: testing connectapi code getfeedelementsfromfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam, filter, threadedcommentscollapsed) get a page of feed elements with comments in a threaded style from the userprofile feed. api version 44.0 available to guest users 44.0 requires chatter yes signature public static connectapi.feedelementpage getfeedelementsfromfeed(string communityid, connectapi.feedtype feedtype, string subjectid, integer recentcommentcount, connectapi.feeddensity density, string pageparam, integer pagesize, connectapi.feedsortorder sortparam, connectapi.feedfilter filter, boolean threadedcommentscollapsed) 515apex reference guide chatterfeeds class parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype value must be connectapi.feedtype.userprofile. subjectid type: string id of any user. to specify the context user, use the user id or the alias me. recentcommentcount type: integer maximum number of |
comments to return with each feed element. the default value is 3. density type: connectapi.feeddensity specify the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. if you pass in null, the default value createddatedesc is used. filter type: connectapi.feedfilter 516apex reference guide chatterfeeds class value must be connectapi.feedfilter.communityscoped or connectapi.feedfilter.authoredby. threadedcommentscollapsed type: boolean specifies whether to return threaded comments in a collapsed style (true) or not (false). if you pass in null, the default is false. return value type: connectapi.feedelementpage usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: settestgetfeedelementsfromfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam, filter, threadedcommentscollapsed, result) apex developer guide: testing connectapi code getfeedelementsfromfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam, customfilter) get a page of sorted and filtered feed elements from the case feed. api version 40.0 available to guest users 40.0 requires chatter yes signature public static connectapi.feedelementpage getfeedelementsfromfeed(string communityid, connectapi.feedtype feedtype, string subjectid, integer recentcommentcount, connectapi.feeddensity density, string pageparam, integer pagesize, connectapi.feedsortorder sortparam, string customfilter) parameters communityid type: string 517apex reference guide chatterfeeds class id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype value must be connectapi.feedtype.record. subjectid type: string the id of a case. recentcommentcount type: integer maximum number of comments to return with each feed element. the default value is 3. density type: connectapi.feeddensity specify the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.feedsortorder values |
are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. if you pass in null, the default value createddatedesc is used. customfilter type: string custom filter that applies only to the case feed. see customfeedfilter in the metadata api developer guide for supported values. 518apex reference guide chatterfeeds class return value type: connectapi.feedelementpage usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: settestgetfeedelementsfromfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam, customfilter, result) apex developer guide: testing connectapi code getfeedelementsfromfeed(communityid, feedtype, subjectid, recentcommentcount, elementsperbundle, density, pageparam, pagesize, sortparam, showinternalonly) get a page of sorted feed elements from a record feed. specify the number of elements per bundle and include no more than the specified number of comments per feed element. specify whether to return feed elements posted by internal (non-experience cloud site) users only. api version 31.0 available to guest users 31.0 requires chatter yes signature public static connectapi.feedelementpage getfeedelementsfromfeed(string communityid, connectapi.feedtype feedtype, string subjectid, integer recentcommentcount, integer elementsperbundle, connectapi.feeddensity density, string pageparam, integer pagesize, connectapi.feedsortorder sortparam, boolean showinternalonly) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype value must be connectapi.feedtype.record. 519apex reference guide chatterfeeds class subjectid type: string any record id, including a group id. recentcommentcount type: integer maximum number of comments to return with each feed item. the default value is 3. elementsperbundle type: integer maximum number of feed elements per bundle. the default and maximum value is 10. density type: connectapi.feeddensity specify the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. if you pass in null, the default value createddatedesc is used. showinternalonly type: boolean specifies whether to show only feed items from internal (non-experience cloud site) users (true), or |
not (false). the default value is false. 520apex reference guide chatterfeeds class return value type: connectapi.feedelementpage usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: settestgetfeedelementsfromfeed(communityid, feedtype, subjectid, recentcommentcount, elementsperbundle, density, pageparam, pagesize, sortparam, showinternalonly, result) apex developer guide: testing connectapi code getfeedelementsfromfeed(communityid, feedtype, subjectid, recentcommentcount, elementsperbundle, density, pageparam, pagesize, sortparam, showinternalonly, filter) get a page of sorted and filtered feed elements from a record feed. specify the number of elements per bundle and include no more than the specified number of comments per feed element. specify whether to return feed elements posted by internal (non-experience cloud site) users only. api version 32.0 available to guest users 32.0 requires chatter yes signature public static connectapi.feedelementpage getfeedelementsfromfeed(string communityid, connectapi.feedtype feedtype, string subjectid, integer recentcommentcount, integer elementsperbundle, connectapi.feeddensity density, string pageparam, integer pagesize, connectapi.feedsortorder sortparam, boolean showinternalonly, connectapi.feedfilter filter) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype 521apex reference guide chatterfeeds class value must be connectapi.feedtype.record. subjectid type: string any record id, including a group id. recentcommentcount type: integer maximum number of comments to return with each feed item. the default value is 3. elementsperbundle type: integer maximum number of feed elements per bundle. the default and maximum value is 10. density type: connectapi.feeddensity specify the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. if you pass in null, the default value createddatedesc is used. showinternalonly type: boolean specifies whether to show only feed items from internal (non-experience cloud site) users (true), or not (false). the default value is false. filter type: connectapi.feedfilter 522apex reference guide chatterfeeds class specifies the feed filters. • allquestions—feed elements that are questions. • authoredby—feed elements authored by the user profile owner. this value is valid only for the userprofile feed. • communityscoped—feed elements that are scoped to experience cloud sites. currently, these feed elements have a user or a group parent record. however, other parent record types could be scoped to sites in the future. feed elements that are always visible in all sites are filtered out. this value is valid only for the userprofile feed. |
• questionswithcandidateanswers—feed elements that are questions that have candidate answers associated with them.this value is valid only for users with the access einstein-generated answers permission. • questionswithcandidateanswersreviewedpublished—feed elements that are questions that have candidate answers that have been reviewed or published. this value is valid only for users with the access einstein-generated answers permission. • read—feed elements that are older than 30 days or are marked as read for the context user. includes existing feed elements when the context user joined the group. this value is valid only for the record feed of a group. • solvedquestions—feed elements that are questions and that have a best answer. • unansweredquestions—feed elements that are questions and that don’t have any answers. • unansweredquestionswithcandidateanswers—feed elements that are questions that don’t have answers but have candidate answers associated with them. this value is valid only for users with the access einstein-generated answers permission. • unread—feed elements that are created in the past 30 days and aren’t marked as read for the context user. this value is valid only for the record feed of a group. • unsolvedquestions—feed elements that are questions and that don’t have a best answer. return value type: connectapi.feedelementpage usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: settestgetfeedelementsfromfeed(communityid, feedtype, subjectid, recentcommentcount, elementsperbundle, density, pageparam, pagesize, sortparam, showinternalonly, filter, result) apex developer guide: testing connectapi code getfeedelementsfromfeed(communityid, feedtype, subjectid, recentcommentcount, elementsperbundle, density, pageparam, pagesize, sortparam, showinternalonly, filter, threadedcommentscollapsed) get a page of sorted and filtered feed elements with comments in a threaded style for a record feed. specify the number of elements per bundle and include no more than the specified number of comments per feed element. specify whether to return feed elements posted by internal (non-experience cloud site) users only. 523apex reference guide chatterfeeds class api version 44.0 available to guest users 44.0 requires chatter yes signature public static connectapi.feedelementpage getfeedelementsfromfeed(string communityid, connectapi.feedtype feedtype, string subjectid, integer recentcommentcount, integer elementsperbundle, connectapi.feeddensity density, string pageparam, integer pagesize, connectapi.feedsortorder sortparam, boolean showinternalonly, connectapi.feedfilter filter, boolean threadedcommentscollapsed) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype value must be connectapi.feedtype.record. subjectid type: string any record id, including a group id. recentcommentcount type: integer maximum number of comments to return with each feed item. the default value is 3. elementsperbundle type: integer maximum number of feed elements per bundle. the default and maximum value is 10. density type: connectapi.feeddensity specify the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string 524apex reference guide chatterfeeds class page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation |
, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. if you pass in null, the default value createddatedesc is used. showinternalonly type: boolean specifies whether to show only feed items from internal (non-experience cloud site) users (true), or not (false). the default value is false. filter type: connectapi.feedfilter specifies the feed filters. • allquestions—feed elements that are questions. • authoredby—feed elements authored by the user profile owner. this value is valid only for the userprofile feed. • communityscoped—feed elements that are scoped to experience cloud sites. currently, these feed elements have a user or a group parent record. however, other parent record types could be scoped to sites in the future. feed elements that are always visible in all sites are filtered out. this value is valid only for the userprofile feed. • questionswithcandidateanswers—feed elements that are questions that have candidate answers associated with them.this value is valid only for users with the access einstein-generated answers permission. • questionswithcandidateanswersreviewedpublished—feed elements that are questions that have candidate answers that have been reviewed or published. this value is valid only for users with the access einstein-generated answers permission. • read—feed elements that are older than 30 days or are marked as read for the context user. includes existing feed elements when the context user joined the group. this value is valid only for the record feed of a group. • solvedquestions—feed elements that are questions and that have a best answer. • unansweredquestions—feed elements that are questions and that don’t have any answers. • unansweredquestionswithcandidateanswers—feed elements that are questions that don’t have answers but have candidate answers associated with them. this value is valid only for users with the access einstein-generated answers permission. • unread—feed elements that are created in the past 30 days and aren’t marked as read for the context user. this value is valid only for the record feed of a group. 525apex reference guide chatterfeeds class • unsolvedquestions—feed elements that are questions and that don’t have a best answer. threadedcommentscollapsed type: boolean specifies whether to return threaded comments in a collapsed style (true) or not (false). if you pass in null, the default is false. return value type: connectapi.feedelementpage usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: settestgetfeedelementsfromfeed(communityid, feedtype, subjectid, recentcommentcount, elementsperbundle, density, pageparam, pagesize, sortparam, showinternalonly, filter, threadedcommentscollapsed, result) apex developer guide: testing connectapi code getfeedelementsfromfeed(communityid, feedtype, subjectid, recentcommentcount, elementsperbundle, density, pageparam, pagesize, sortparam, showinternalonly, customfilter) get a page of sorted and filtered feed elements from a case feed. api version 40.0 available to guest users 40.0 requires chatter yes signature public static connectapi.feedelementpage getfeedelementsfromfeed(string communityid, connectapi.feedtype feedtype, string subjectid, integer recentcommentcount, integer elementsperbundle, connectapi.feeddensity density, string pageparam, integer pagesize, connectapi.feedsortorder sortparam, boolean showinternalonly, string customfilter) 526apex reference guide chatterfeeds class parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype value must be connectapi.feedtype.record. subjectid type: string the id of a case. recentcommentcount type: integer maximum number of comments to return with each feed item. the default value is 3 |
. elementsperbundle type: integer maximum number of feed elements per bundle. the default and maximum value is 10. density type: connectapi.feeddensity specify the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. 527apex reference guide chatterfeeds class if you pass in null, the default value createddatedesc is used. showinternalonly type: boolean specifies whether to show only feed items from internal (non-experience cloud site) users (true), or not (false). the default value is false. customfilter type: string custom filter that applies only to the case feed. see customfeedfilter in the metadata api developer guide for supported values. return value type: connectapi.feedelementpage usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: settestgetfeedelementsfromfeed(communityid, feedtype, subjectid, recentcommentcount, elementsperbundle, density, pageparam, pagesize, sortparam, showinternalonly, customfilter, result) apex developer guide: testing connectapi code getfeedelementsfromfeed(communityid, feedtype, subjectid, recentcommentcount, elementsperbundle, density, pageparam, pagesize, sortparam, showinternalonly, customfilter, threadedcommentscollapsed) get a page of filtered and sorted feed elements with comments in a threaded style from a case feed. api version 44.0 available to guest users 44.0 requires chatter yes signature public static connectapi.feedelementpage getfeedelementsfromfeed(string communityid, connectapi.feedtype feedtype, string subjectid, integer recentcommentcount, integer elementsperbundle, connectapi.feeddensity density, string pageparam, integer pagesize, connectapi.feedsortorder sortparam, boolean showinternalonly, string customfilter, boolean threadedcommentscollapsed) 528apex reference guide chatterfeeds class parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype value must be connectapi.feedtype.record. subjectid type: string the id of a case. recentcommentcount type: integer maximum number of comments to return with each feed item. the default value is 3. elementsperbundle type: integer maximum number of feed elements per bundle. the default and maximum value is 10. density type: connectapi.feeddensity specify the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string page token to use to view the page. page tokens are |
returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. 529apex reference guide chatterfeeds class if you pass in null, the default value createddatedesc is used. showinternalonly type: boolean specifies whether to show only feed items from internal (non-experience cloud site) users (true), or not (false). the default value is false. customfilter type: string custom filter that applies only to the case feed. see customfeedfilter in the metadata api developer guide for supported values. threadedcommentscollapsed type: boolean specifies whether to return threaded comments in a collapsed style (true) or not (false). if you pass in null, the default is false. return value type: connectapi.feedelementpage usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: settestgetfeedelementsfromfeed(communityid, feedtype, subjectid, recentcommentcount, elementsperbundle, density, pageparam, pagesize, sortparam, showinternalonly, customfilter, threadedcommentscollapsed, result) apex developer guide: testing connectapi code getfeedelementsfromfilterfeed(communityid, subjectid, keyprefix) get feed elements from a feed filtered by a key prefix for a user. api version 31.0 requires chatter yes signature public static connectapi.feedelementpage getfeedelementsfromfilterfeed(string communityid, string subjectid, string keyprefix) 530apex reference guide chatterfeeds class parameters communityid type: string id for an experience cloud site, internal, or null. subjectid type: string id of the context user or the alias me. keyprefix type: string a key prefix that specifies record type. a key prefix is the first three characters in the object id, which specifies the object type. for example, user objects have a prefix of 005 and group objects have a prefix of 0f9. return value type: connectapi.feedelementpage usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: settestgetfeedelementsfromfilterfeed(communityid, subjectid, keyprefix, result) apex developer guide: testing connectapi code getfeedelementsfromfilterfeed(communityid, subjectid, keyprefix, pageparam, pagesize, sortparam) get a page of sorted feed elements from a feed filtered by a key prefix for a user. api version 31.0 requires chatter yes signature public static connectapi.feedelementpage getfeedelementsfromfilterfeed(string communityid, string subjectid, string keyprefix, string pageparam, integer pagesize, connectapi.feedsortorder sortparam) 531apex reference guide chatterfeeds class parameters communityid type: string id for an experience cloud site, internal, or null. subjectid type: string id of the context user or the alias me. keyprefix type: string a key prefix that specifies record type. a key prefix is the first three characters in the object id, which specifies the object type. for example, user objects have a prefix of 005 and group objects have a prefix of 0f9. pageparam type: string page token to use to view the page. page tokens are returned as |
part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. if you pass in null, the default value createddatedesc is used. return value type: connectapi.feedelementpage usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: settestgetfeedelementsfromfilterfeed(communityid, subjectid, keyprefix, pageparam, pagesize, sortparam, result) apex developer guide: testing connectapi code 532 |
apex reference guide chatterfeeds class getfeedelementsfromfilterfeed(communityid, subjectid, keyprefix, recentcommentcount, elementsperbundle, density, pageparam, pagesize, sortparam) get a page of sorted feed elements from a feed filtered by a key prefix for a user. each feed element contains no more than the specified number of comments. api version 31.0 requires chatter yes signature public static connectapi.feedelementpage getfeedelementsfromfilterfeed(string communityid, string subjectid, string keyprefix, integer recentcommentcount, integer elementsperbundle, connectapi.feeddensity density, string pageparam, integer pagesize, connectapi.feedsortorder sortparam) parameters communityid type: string id for an experience cloud site, internal, or null. subjectid type: string id of the context user or the alias me. keyprefix type: string a key prefix that specifies record type. a key prefix is the first three characters in the object id, which specifies the object type. for example, user objects have a prefix of 005 and group objects have a prefix of 0f9. recentcommentcount type: integer maximum number of comments to return with each feed element. the default value is 3. elementsperbundle type: integer maximum number of feed elements per bundle. the default and maximum value is 10. density type: connectapi.feeddensity specify the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. 533apex reference guide chatterfeeds class • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. if you pass in null, the default value createddatedesc is used. return value type: connectapi.feedelementpage usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: settestgetfeedelementsfromfilterfeed(communityid, subjectid, keyprefix, recentcommentcount, elementsperbundle, density, pageparam, pagesize, sortparam, result) apex developer guide: testing connectapi code getfeedelementsfromfilterfeedupdatedsince(communityid, subjectid, keyprefix, recentcommentcount, elementsperbundle, density, pageparam, pagesize, updatedsince) get a page of feed elements from a feed filtered by a key prefix for a user. include only feed elements that have been updated since the time specified in the updatedsince parameter. api version 31.0 534apex reference guide chatterfeeds class requires chatter yes signature public static connectapi.feedelementpage getfeedelementsfromfilterfeedupdatedsince(string communityid, string subjectid, string keyprefix, integer recentcommentcount, integer elementsperbundle, connectapi.feeddensity density, string pageparam, integer pagesize, string updatedsince) parameters communityid type: string id for an experience cloud site, internal, or null. subjectid type: string id of the context user or the alias me. |
keyprefix type: string a key prefix that specifies record type. a key prefix is the first three characters in the object id, which specifies the object type. for example, user objects have a prefix of 005 and group objects have a prefix of 0f9. recentcommentcount type: integer maximum number of comments to return with each feed element. the default value is 3. elementsperbundle type: integer maximum number of feed elements per bundle. the default and maximum value is 10. density type: connectapi.feeddensity specify the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in null, the default size is 25. 535apex reference guide chatterfeeds class updatedsince type: string opaque token defining the modification timestamp of the feed and the sort order. the updatedsince parameter doesn’t return feed elements that are created in the same second as the call. return value type: connectapi.feedelementpage usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: settestgetfeedelementsfromfilterfeedupdatedsince(communityid, subjectid, keyprefix, recentcommentcount, elementsperbundle, density, pageparam, pagesize, updatedsince, result) apex developer guide: testing connectapi code getfeedelementsupdatedsince(communityid, feedtype, recentcommentcount, density, pageparam, pagesize, updatedsince) get a page of feed elements from the company, directmessagemoderation, home, and moderation feeds. include only feed elements that have been updated since the time specified in the updatedsince parameter. each feed element contains no more than the specified number of comments. api version 31.0 available to guest users 31.0 requires chatter yes signature public static connectapi.feedelementpage getfeedelementsupdatedsince(string communityid, connectapi.feedtype feedtype, integer recentcommentcount, connectapi.feeddensity density, string pageparam, integer pagesize, string updatedsince) parameters communityid type: string 536apex reference guide chatterfeeds class id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype type of feed. valid values are company, directmessagemoderation, home, and moderation. recentcommentcount type: integer maximum number of comments to return with each feed element. the default value is 3. density type: connectapi.feeddensity specify the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in null, the default size is 25. updatedsince type: string an opaque token containing information about the last modified date of the feed. do not construct this token. retrieve this token from the updatestoken property of the connectapi.feedelementpage response body. the updatedsince parameter doesn’t return feed elements that are created in the same second as the call. return value type: connectapi.feedelementpage usage to test code that uses this method, |
use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: settestgetfeedelementsupdatedsince(communityid, feedtype, recentcommentcount, density, pageparam, pagesize, updatedsince, result) apex developer guide: testing connectapi code 537apex reference guide chatterfeeds class getfeedelementsupdatedsince(communityid, feedtype, recentcommentcount, density, pageparam, pagesize, updatedsince, filter) get a page of filtered feed elements from the home feed. include only feed elements that have been updated since the time specified in the updatedsince parameter. each feed element contains no more than the specified number of comments. api version 32.0 available to guest users 32.0 requires chatter yes signature public static connectapi.feedelementpage getfeedelementsupdatedsince(string communityid, connectapi.feedtype feedtype, integer recentcommentcount, connectapi.feeddensity density, string pageparam, integer pagesize, string updatedsince, connectapi.feedfilter filter) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype the type of feed. the only valid value is home. recentcommentcount type: integer maximum number of comments to return with each feed element. the default value is 3. density type: connectapi.feeddensity specify the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. 538apex reference guide chatterfeeds class pagesize type: integer specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in null, the default size is 25. updatedsince type: string an opaque token containing information about the last modified date of the feed. do not construct this token. retrieve this token from the updatestoken property of the connectapi.feedelementpage response body. the updatedsince parameter doesn’t return feed elements that are created in the same second as the call. filter type: connectapi.feedfilter specifies the feed filters. • allquestions—feed elements that are questions. • authoredby—feed elements authored by the user profile owner. this value is valid only for the userprofile feed. • communityscoped—feed elements that are scoped to experience cloud sites. currently, these feed elements have a user or a group parent record. however, other parent record types could be scoped to sites in the future. feed elements that are always visible in all sites are filtered out. this value is valid only for the userprofile feed. • questionswithcandidateanswers—feed elements that are questions that have candidate answers associated with them.this value is valid only for users with the access einstein-generated answers permission. • questionswithcandidateanswersreviewedpublished—feed elements that are questions that have candidate answers that have been reviewed or published. this value is valid only for users with the access einstein-generated answers permission. • read—feed elements that are older than 30 days or are marked as read for the context user. includes existing feed elements when the context user joined the group. this value is valid only for the record feed of a group. • solvedquestions—feed elements that are questions and that have a best answer. • unansweredquestions—feed elements that are questions and that don’t have any answers. • unansweredquestionswithcandidateanswers—feed elements that are questions that don’t have answers but have candidate answers associated with them. this value is valid only for users with the access einstein-generated answers permission. • unread—feed elements that are created in the past 30 days and aren’t marked as read for the context user. this value is valid only for the record feed of a group. • unsolvedquestions—feed elements that are questions and that don’t have a best |
answer. return value type: connectapi.feedelementpage 539apex reference guide chatterfeeds class usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: settestgetfeedelementsupdatedsince(communityid, feedtype, recentcommentcount, density, pageparam, pagesize, updatedsince, filter, result) apex developer guide: testing connectapi code getfeedelementsupdatedsince(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, updatedsince) get a page of feed elements from the files, groups, news, people, and record feeds. include only feed elements that have been updated since the time specified in the updatedsince parameter. each feed element contains no more than the specified number of comments. api version 31.0 available to guest users 31.0 requires chatter yes signature public static connectapi.feedelementpage getfeedelementsupdatedsince(string communityid, connectapi.feedtype feedtype, string subjectid, integer recentcommentcount, connectapi.feeddensity density, string pageparam, integer pagesize, string updatedsince) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype one of these values: • files • groups • news • people 540apex reference guide chatterfeeds class • record subjectid type: string if feedtype is connectapi.record, subjectid can be any record id, including a group id. otherwise, it must be the context user or the alias me. recentcommentcount type: integer maximum number of comments to return with each feed item. the default value is 3. density type: connectapi.feeddensity specify the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in null, the default size is 25. updatedsince type: string an opaque token containing information about the last modified date of the feed. do not construct this token. retrieve this token from the updatestoken property of the connectapi.feedelementpage response body. the updatedsince parameter doesn’t return feed elements that are created in the same second as the call. return value type: connectapi.feedelementpage usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: settestgetfeedelementsupdatedsince(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, updatedsince, result) apex developer guide: testing connectapi code 541apex reference guide chatterfeeds class getfeedelementsupdatedsince(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, updatedsince, showinternalonly) get a page of feed elements from a record feed. include only feed elements that have been updated since the time specified in the updatedsince parameter. specify whether to return feed elements posted by internal (non-experience cloud site) users only. api version 31.0 available to guest users 31.0 requires chatter yes signature public static connectapi.feedelementpage getfeedelementsupdatedsince(string communityid, connectapi.feedtype feedtype, string subjectid, integer recentcommentcount, connectapi.feeddensity density, string pageparam, integer pagesize, string updatedsince, boolean showinternalonly) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type |
: connectapi.feedtype value must be connectapi.feedtype.record. subjectid type: string any record id, including a group id. recentcommentcount type: integer maximum number of comments to return with each feed element. the default value is 3. density type: connectapi.feeddensity specify the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. 542apex reference guide chatterfeeds class • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in null, the default size is 25. updatedsince type: string an opaque token containing information about the last modified date of the feed. do not construct this token. retrieve this token from the updatestoken property of the connectapi.feedelementpage response body. the updatedsince parameter doesn’t return feed elements that are created in the same second as the call. showinternalonly type: boolean specifies whether to show only feed elements from internal (non-experience cloud site) users (true), or not (false). the default value is false. return value type: connectapi.feedelementpage usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: settestgetfeedelementsupdatedsince(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, updatedsince, showinternalonly, result) apex developer guide: testing connectapi code getfeedelementsupdatedsince(communityid, feedtype, subjectid, recentcommentcount, elementsperbundle, density, pageparam, pagesize, updatedsince, filter) get a page of filtered feed elements from a userprofile feed. include only feed elements that have been updated since the time specified in the updatedsince parameter. api version 35.0 543apex reference guide chatterfeeds class available to guest users 35.0 requires chatter yes signature public static connectapi.feedelementpage getfeedelementsupdatedsince(string communityid, connectapi.feedtype feedtype, string subjectid, integer recentcommentcount, integer elementsperbundle, connectapi.feeddensity density, string pageparam, integer pagesize, string updatedsince, connectapi.feedfilter filter) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype value must be connectapi.feedtype.userprofile. subjectid type: string id of any user. to specify the context user, use the user id or the alias me. recentcommentcount type: integer maximum number of comments to return with each feed element. the default value is 3. elementsperbundle type: integer maximum number of feed elements per bundle. the default and maximum value is 10. density type: connectapi.feeddensity specify the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer 544apex reference guide chatterfeeds class specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in null, the default size is 25. updatedsince type: string opaque token defining the modification |
timestamp of the feed and the sort order. the updatedsince parameter doesn’t return feed elements that are created in the same second as the call. filter type: connectapi.feedfilter value must be connectapi.feedfilter.communityscoped. filters the feed to include only feed elements that are scoped to experience cloud sites. feed elements that are always visible in all sites are filtered out. return value type: connectapi.feedelementpage usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: settestgetfeedelementsupdatedsince(communityid, feedtype, subjectid, recentcommentcount, elementsperbundle, density, pageparam, pagesize, updatedsince, filter, result) apex developer guide: testing connectapi code getfeedelementsupdatedsince(communityid, feedtype, subjectid, recentcommentcount, elementsperbundle, density, pageparam, pagesize, updatedsince, customfilter) get a page of filtered feed elements from a case feed. include only feed elements that have been updated since the time specified in the updatedsince parameter. api version 40.0 available to guest users 40.0 requires chatter yes signature public static connectapi.feedelementpage getfeedelementsupdatedsince(string communityid, connectapi.feedtype feedtype, string subjectid, integer recentcommentcount, integer 545apex reference guide chatterfeeds class elementsperbundle, connectapi.feeddensity density, string pageparam, integer pagesize, string updatedsince, string customfilter) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype value must be connectapi.feedtype.record. subjectid type: string the id of a case. recentcommentcount type: integer maximum number of comments to return with each feed element. the default value is 3. elementsperbundle type: integer maximum number of feed elements per bundle. the default and maximum value is 10. density type: connectapi.feeddensity specify the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in null, the default size is 25. updatedsince type: string opaque token defining the modification timestamp of the feed and the sort order. the updatedsince parameter doesn’t return feed elements that are created in the same second as the call. customfilter type: string custom filter that applies only to the case feed. see customfeedfilter in the metadata api developer guide for supported values. 546apex reference guide chatterfeeds class return value type: connectapi.feedelementpage usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: settestgetfeedelementsupdatedsince(communityid, feedtype, subjectid, recentcommentcount, elementsperbundle, density, pageparam, pagesize, updatedsince, customfilter, result) apex developer guide: testing connectapi code getfeedelementsupdatedsince(communityid, feedtype, subjectid, recentcommentcount, elementsperbundle, density, pageparam, pagesize, updatedsince, showinternalonly) get a page of feed elements from a record feed. include only feed elements that have been updated since the time specified in the updatedsince parameter. specify the maximum number of feed elements in a bundle and whether to return feed elements posted by internal (non-experience cloud site) users only. api version 31.0 available to guest users 31.0 requires chatter |
yes signature public static connectapi.feedelementpage getfeedelementsupdatedsince(string communityid, connectapi.feedtype feedtype, string subjectid, integer recentcommentcount, integer elementsperbundle, connectapi.feeddensity density, string pageparam, integer pagesize, string updatedsince, boolean showinternalonly) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype value must be connectapi.feedtype.record. 547apex reference guide chatterfeeds class subjectid type: string any record id, including a group id. recentcommentcount type: integer maximum number of comments to return with each feed element. the default value is 3. elementsperbundle type: integer maximum number of feed elements per bundle. the default and maximum value is 10. density type: connectapi.feeddensity specify the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in null, the default size is 25. updatedsince type: string an opaque token containing information about the last modified date of the feed. do not construct this token. retrieve this token from the updatestoken property of the connectapi.feedelementpage response body. the updatedsince parameter doesn’t return feed elements that are created in the same second as the call. showinternalonly type: boolean specifies whether to show only feed elements from internal (non-experience cloud site) users (true), or not (false). the default value is false. return value type: connectapi.feedelementpage 548apex reference guide chatterfeeds class usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: settestgetfeedelementsupdatedsince(communityid, feedtype, subjectid, recentcommentcount, elementsperbundle, density, pageparam, pagesize, updatedsince, showinternalonly, result) apex developer guide: testing connectapi code getfeedelementsupdatedsince(communityid, feedtype, subjectid, recentcommentcount, elementsperbundle, density, pageparam, pagesize, updatedsince, showinternalonly, filter) get a page of filtered feed elements from a record feed. include only feed elements that have been updated since the time specified in the updatedsince parameter. specify the maximum number of feed elements in a bundle and whether to return feed elements posted by internal (non-experience cloud site) users only. api version 32.0 available to guest users 32.0 requires chatter yes signature public static connectapi.feedelementpage getfeedelementsupdatedsince(string communityid, connectapi.feedtype feedtype, string subjectid, integer recentcommentcount, integer elementsperbundle, connectapi.feeddensity density, string pageparam, integer pagesize, string updatedsince, boolean showinternalonly, connectapi.feedfilter filter) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype value must be connectapi.feedtype.record. subjectid type: string any record id, including a group id. 549apex reference guide chatterfeeds class recentcommentcount type: integer maximum number of comments to return with each feed element. the default value is 3. elementsperbundle type: integer maximum number of feed elements per bundle. the default and maximum value is 10. density type: connectapi.feeddensity specify the amount of content in a feed. • allupdates—displays all updates from people and records the user |
follows and groups the user is a member of. also displays custom recommendations. • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in null, the default size is 25. updatedsince type: string an opaque token containing information about the last modified date of the feed. do not construct this token. retrieve this token from the updatestoken property of the connectapi.feedelementpage response body. the updatedsince parameter doesn’t return feed elements that are created in the same second as the call. showinternalonly type: boolean specifies whether to show only feed elements from internal (non-experience cloud site) users (true), or not (false). the default value is false. filter type: connectapi.feedfilter specifies the feed filters. • allquestions—feed elements that are questions. • authoredby—feed elements authored by the user profile owner. this value is valid only for the userprofile feed. • communityscoped—feed elements that are scoped to experience cloud sites. currently, these feed elements have a user or a group parent record. however, other parent record types could be scoped to sites in the future. feed elements that are always visible in all sites are filtered out. this value is valid only for the userprofile feed. • questionswithcandidateanswers—feed elements that are questions that have candidate answers associated with them.this value is valid only for users with the access einstein-generated answers permission. 550apex reference guide chatterfeeds class • questionswithcandidateanswersreviewedpublished—feed elements that are questions that have candidate answers that have been reviewed or published. this value is valid only for users with the access einstein-generated answers permission. • read—feed elements that are older than 30 days or are marked as read for the context user. includes existing feed elements when the context user joined the group. this value is valid only for the record feed of a group. • solvedquestions—feed elements that are questions and that have a best answer. • unansweredquestions—feed elements that are questions and that don’t have any answers. • unansweredquestionswithcandidateanswers—feed elements that are questions that don’t have answers but have candidate answers associated with them. this value is valid only for users with the access einstein-generated answers permission. • unread—feed elements that are created in the past 30 days and aren’t marked as read for the context user. this value is valid only for the record feed of a group. • unsolvedquestions—feed elements that are questions and that don’t have a best answer. return value type: connectapi.feedelementpage usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: settestgetfeedelementsupdatedsince(communityid, feedtype, subjectid, recentcommentcount, elementsperbundle, density, pageparam, pagesize, updatedsince, showinternalonly, filter, result) apex developer guide: testing connectapi code getfeedelementsupdatedsince(communityid, feedtype, subjectid, recentcommentcount, elementsperbundle, density, pageparam, pagesize, updatedsince, showinternalonly, customfilter) get a page of filtered feed elements from a case feed. include only feed elements that have been updated since the time specified in the updatedsince parameter. api version 40.0 available to guest users 40.0 requires chatter yes 551apex reference guide chatterfeeds class signature public static connectapi.feedelementpage getfeedelementsupdatedsince(string communityid, connectapi.feedtype feedtype, string subjectid, integer recentcommentcount, integer elementsperbundle, connectapi.feeddensity density, string pageparam, integer pagesize, string updatedsince, boolean showinternalonly, string customfilter) parameters communityid type: string id for an experience cloud site |
, internal, or null. feedtype type: connectapi.feedtype value must be connectapi.feedtype.record. subjectid type: string the id of a case. recentcommentcount type: integer maximum number of comments to return with each feed element. the default value is 3. elementsperbundle type: integer maximum number of feed elements per bundle. the default and maximum value is 10. density type: connectapi.feeddensity specify the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in null, the default size is 25. updatedsince type: string an opaque token containing information about the last modified date of the feed. do not construct this token. retrieve this token from the updatestoken property of the connectapi.feedelementpage response body. the updatedsince parameter doesn’t return feed elements that are created in the same second as the call. 552apex reference guide chatterfeeds class showinternalonly type: boolean specifies whether to show only feed elements from internal (non-experience cloud site) users (true), or not (false). the default value is false. customfilter type: string custom filter that applies only to the case feed. see customfeedfilter in the metadata api developer guide for supported values. return value type: connectapi.feedelementpage usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: settestgetfeedelementsupdatedsince(communityid, feedtype, subjectid, recentcommentcount, elementsperbundle, density, pageparam, pagesize, updatedsince, showinternalonly, customfilter, result) apex developer guide: testing connectapi code getfeedwithfeedelements(communityid, feedtype, pagesize) get information about a feed and a page of feed elements from the feed. api version 40.0 available to guest users 40.0 requires chatter yes signature public static connectapi.feed getfeedwithfeedelements(string communityid, connectapi.feedtype feedtype, integer pagesize) parameters communityid type: string id for an experience cloud site, internal, or null. 553apex reference guide chatterfeeds class feedtype type: connectapi.feedtype the type of feed. valid values are company, directmessagemoderation, directmessages, home, landing, moderation, and pendingreview. landing is valid only when communityid is internal. pagesize type: integer specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in 0, feed elements aren’t returned with the feed. return value type: connectapi.feed getfeedwithfeedelements(communityid, feedtype, pagesize, recentcommentcount) get a page of information about the feed and the feed elements with the specified number of comments per feed element from the feed. api version 40.0 available to guest users 40.0 requires chatter yes signature public static connectapi.feed getfeedwithfeedelements(string communityid, connectapi.feedtype feedtype, integer pagesize, integer recentcommentcount) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype the type of feed. valid values are company, directmessagemoderation, directmessages, home, landing, moderation, and pendingreview. landing is valid only when communityid is internal. pagesize type: integer 554apex reference guide chatterfeeds class specifies the number of feed elements per page. valid values are |
from 1 through 100. if you pass in 0, feed elements aren’t returned with the feed. recentcommentcount type: integer maximum number of comments to return with each feed element. the default value is 3. return value type: connectapi.feed getfilterfeed(communityid, subjectid, keyprefix) get a feed filtered by a key prefix for a user. api version 28.0 requires chatter yes signature public static connectapi.feed getfilterfeed(string communityid, string subjectid, string keyprefix) parameters communityid type: string id for an experience cloud site, internal, or null. subjectid type: string id of the context user or the alias me. keyprefix type: string a key prefix is the first three characters of a record id, which specifies the object type. return value type: connectapi.feed getfilterfeed(communityid, subjectid, keyprefix, sortparam) get a sorted feed filtered by a key prefix for a user. 555apex reference guide chatterfeeds class api version 28.0 requires chatter yes signature public static connectapi.feed getfilterfeed(string communityid, string subjectid, string keyprefix, connectapi.feedtype sortparam) parameters communityid type: string id for an experience cloud site, internal, or null. subjectid type: string id of the context user or the alias me. keyprefix type: string a key prefix that specifies record type. a key prefix is the first three characters in the object id, which specifies the object type. for example, user objects have a prefix of 005 and group objects have a prefix of 0f9. sortparam type: connectapi.feedtype values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. if you pass in null, the default value createddatedesc is used. return value type: connectapi.feed getfilterfeeddirectory(communityid, subjectid) get a feed directory of filter feeds available to the context user. 556apex reference guide chatterfeeds class api version 30.0 requires chatter yes signature public static connectapi.feeddirectory getfilterfeeddirectory(string communityid, string subjectid) parameters communityid type: string id for an experience cloud site, internal, or null. subjectid type: string id of the context user or the alias me. return value type: connectapi.feeddirectory this feed directory contains a list of filter feeds, which are the news feed filtered to include feed items whose parent is a specific entity type. usage call this method to return a directory containing a list of connectapi.feeddirectoryitem objects. each object contains a key prefix associated with an entity type the context user is following. a key prefix is the first three characters of a record id, which specifies the object type. use key prefixes to filter the news feed so that it contains only feed items whose parent is the entity type associated with the key prefix. for example, get all the feed items whose parent is an account. to get the feed items, pass a key prefix to the connectapi.getfeeditemsfromfilterfeed method. the information about filter feeds never contains the key prefixes for users (005) or groups (0f9), but all users can use those key prefixes as filters. the connectapi.feeddirectory.favorites property is always empty when returned by a call to getfilterfeeddirectory because you can’t filter a news feed by favorites. example this example calls getfilterfeeddirectory and loops through the returned feeddirectoryitem objects to find the key prefixes the context user can use to filter their news feed. it then copies each keyprefix value to a list. finally, it passes one of 557apex reference guide chatterfeeds class the key prefixes from the list to the getfeeditemsfromfilterfeed |
method. the returned feed items include every feed item from the news feed whose parent is the entity type specified by the passed key prefix. string communityid = null; string subjectid = 'me'; // create a list to populate with key prefixes. list<string> keyprefixlist = new list<string>(); // prepopulate with user and group record types // which are available to all users. keyprefixlist.add('005'); keyprefixlist.add('0f9'); system.debug(keyprefixlist); // get the key prefixes available to the context user. connectapi.feeddirectory myfeeddirectory = connectapi.chatterfeeds.getfilterfeeddirectory(null, 'me'); // loop through the returned feeds list. for (connectapi.feeddirectoryitem i : myfeeddirectory.feeds) { // grab each key prefix and add it to the list. keyprefixlist.add(i.keyprefix); } system.debug(keyprefixlist); // use a key prefix from the list to filter the feed items in the news feed. connectapi.feeditempage myfeeditempage = connectapi.chatterfeeds.getfeeditemsfromfilterfeed(communityid, subjectid, keyprefixlist[0]); system.debug(myfeeditempage); getlike(communityid, likeid) get a like on a post or comment. api version 28.0 available to guest users 32.0 requires chatter yes signature public static connectapi.chatterlike getlike(string communityid, string likeid) 558apex reference guide chatterfeeds class parameters communityid type: string id for an experience cloud site, internal, or null. likeid type: string id for a like. return value type: connectapi.chatterlike getlikesforcomment(communityid, commentid) get likes for a comment. api version 28.0 available to guest users 31.0 requires chatter yes signature public static connectapi.chatterlikepage getlikesforcomment(string communityid, string commentid) parameters communityid type: string id for an experience cloud site, internal, or null. commentid type: string id for a comment. return value type: connectapi.chatterlikepage 559apex reference guide chatterfeeds class getlikesforcomment(communityid, commentid, pageparam, pagesize) get a page of likes for a comment. api version 28.0 available to guest users 31.0 requires chatter yes signature public static connectapi.chatterlikepage getlikesforcomment(string communityid, string commentid, integer pageparam, integer pagesize) parameters communityid type: string id for an experience cloud site, internal, or null. commentid type: string id for a comment. pageparam type: integer number of the page you want returned. starts at 0. if you pass in null or 0, the first page is returned. pagesize type: integer specifies the number of items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. return value type: connectapi.chatterlikepage getlikesforfeedelement(communityid, feedelementid) get likes for a feed element. api version 32.0 560apex reference guide chatterfeeds class available to guest users 32.0 requires chatter yes signature public static connectapi.chatterlikepage getlikesforfeedelement(string communityid, string feedelementid) parameters communityid type: string id for an experience cloud site, internal, or null. feedelementid type: string id of the feed element. return value type: connectapi.chatterlikepage if the feed element doesn’t support the chatterlikes capability, the return value is connectapi.notfoundexception. getlikesforfeedelement(communityid, feedelementid, pageparam, pagesize) get a page of likes for a feed element. api version 32.0 available to guest users 32.0 requires chatter yes signature public static connectapi.chatterlikepage getlikesforfeedelement(string communityid, string feedelementid, |
integer pageparam, integer pagesize) 561apex reference guide chatterfeeds class parameters communityid type: string id for an experience cloud site, internal, or null. feedelementid type: string id of the feed element. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. return value type: connectapi.chatterlikepage if the feed element doesn’t support the chatterlikes capability, the return value is connectapi.notfoundexception. getlinkmetadata(communityid, urls) get link metadata for urls. api version 42.0 available to guest users 42.0 requires chatter no signature public static connectapi.linkmetadatacollection getlinkmetadata(string communityid, string urls) parameters communityid type: string id for an experience cloud site, internal, or null. 562apex reference guide chatterfeeds class urls type: string comma-separated list of url-encoded urls. return value type: connectapi.linkmetadatacollection getpinnedfeedelementsfromfeed(communityid, feedtype, subjectid) get pinned feed elements from a group or topic feed. api version 41.0 available to guest users 41.0 requires chatter yes signature public static connectapi.pinnedfeedelements getpinnedfeedelementsfromfeed(string communityid, connectapi.feedtype feedtype, string subjectid) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype the type of feed. valid values are record and topics. subjectid type: string if feedtype is record, subjectid must be a group id. if feedtype is topics, subjectid must be a topic id. return value type: connectapi.pinnedfeedelements if the feed doesn’t support this capability, the return value is connectapi.notfoundexception. 563apex reference guide chatterfeeds class usage in the ui, pinned feed elements don’t show all auxiliary information, such as comments, likes, interaction counts, or read by information. as a result, the connectapi.pinnedfeedelements output class doesn’t include all the information for these capabilities. getreadbyforfeedelement(communityid, feedelementid) get information about who read a feed element and when. api version 40.0 requires chatter yes signature public static connectapi.readbypage getreadbyforfeedelement(string communityid, string feedelementid) parameters communityid type: string id for an experience cloud site, internal, or null. feedelementid type: string id of the feed element. return value type: connectapi.readbypage if the feed element doesn’t support this capability, the return value is connectapi.notfoundexception. getreadbyforfeedelement(communityid, feedelementid, pageparam, pagesize) get a page of information about who read a feed element and when. api version 40.0 requires chatter yes 564apex reference guide chatterfeeds class signature public static connectapi.readbypage getreadbyforfeedelement(string communityid, string feedelementid, integer pageparam, integer pagesize) parameters communityid type: string id for an experience cloud site, internal, or null. feedelementid type: string id of the feed element. pageparam type: string specifies the page token to use to view a page of information. page tokens are returned as part of the response class, such as currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. return value type: connectapi.readbypage if the feed element doesn’t support this capability, the return value is connectapi.not |
foundexception. getrelatedposts(communityid, feedelementid, filter, maxresults) get posts related to the context feed element. api version 37.0 available to guest users 37.0 requires chatter yes signature public static connectapi.relatedfeedposts getrelatedposts(string communityid, string feedelementid, connectapi.relatedfeedposttype filter, integer maxresults) 565apex reference guide chatterfeeds class parameters communityid type: string id for an experience cloud site, internal, or null. feedelementid type: string id of the feed element. the feed element must be a question. filter type: connectapi.relatedfeedposttype specifies the type of related post. values are: • answered—related questions that have at least one answer. • bestanswer—related questions that have a best answer. • generic—all types of related questions, including answered, with a best answer, and unanswered. • unanswered—related questions that don’t have answers. generic is the default value. maxresults type: integer the maximum number of results to return. you can return up to 25 results; 5 is the default. return value type: connectapi.relatedfeedposts in version 37.0 and later, related feed posts are questions. each related feed post has a score indicating how closely it’s related to the context feed post. we return related feed posts sorted by score, with the highest score first. usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. getstream(communityid, streamid) get information about a chatter feed stream. api version 39.0 requires chatter yes 566apex reference guide chatterfeeds class signature public static connectapi.chatterstream getstream(string communityid, string streamid) parameters communityid type: string id for an experience cloud site, internal, or null. streamid type: string id of the chatter feed stream. return value type: connectapi.chatterstream getstream(communityid, streamid, globalscope) get information about a chatter feed stream, regardless of experience cloud site. api version 41.0 requires chatter yes signature public static connectapi.chatterstream getstream(string communityid, string streamid, boolean globalscope) parameters communityid type: string id for an experience cloud site, internal, or null. streamid type: string id of the chatter feed stream. globalscope type: boolean specifies whether to get streams from all the context user’s experience cloud sites, regardless of the communityid value. tip: if you know the communityid for the stream, we recommend setting globalscope to false. 567apex reference guide chatterfeeds class return value type: connectapi.chatterstream getstreams(communityid) get the chatter feed streams for the context user. api version 39.0 requires chatter yes signature public static connectapi.chatterstreampage getstreams(string communityid) parameters communityid type: string id for an experience cloud site, internal, or null. return value type: connectapi.chatterstreampage getstreams(communityid, sortparam) get and sort the chatter feed streams for the context user. api version 40.0 requires chatter yes signature public static connectapi.chatterstreampage getstreams(string communityid, connectapi.sortorder sortparam) parameters communityid type: string 568apex reference guide chatterfeeds class id for an experience cloud site, internal, or null. sortparam type: connectapi.sortorder specifies the sort order. values are: • ascending—items are in ascending alphabetical order (a-z). • descending—items are in descending alphabetical order (z-a). • mostrecentlyviewed—items are in descending chronological order by view. this sort order is valid only for chatter feed streams. if not specified, default value is ascending. return value type: connectapi.chatterstreampage getstreams(communityid, pageparam, pagesize) get a page of chatter feed streams for the context user |
. api version 39.0 requires chatter yes signature public static connectapi.chatterstreampage getstreams(string communityid, integer pageparam, integer pagesize) parameters communityid type: string id for an experience cloud site, internal, or null. pageparam type: integer number of the page you want returned. starts at 0. if you pass in null or 0, the first page is returned. pagesize type: integer specifies the number of items per page. valid values are from 1 to 250. the default size is 25. return value type: connectapi.chatterstreampage 569apex reference guide chatterfeeds class getstreams(communityid, pageparam, pagesize, sortparam) get a sorted page of chatter feed streams for the context user. api version 40.0 requires chatter yes signature public static connectapi.chatterstreampage getstreams(string communityid, integer pageparam, integer pagesize, connectapi.sortorder sortparam) parameters communityid type: string id for an experience cloud site, internal, or null. pageparam type: integer number of the page you want returned. starts at 0. if you pass in null or 0, the first page is returned. pagesize type: integer specifies the number of items per page. valid values are from 1 to 250. the default size is 25. sortparam type: connectapi.sortorder specifies the sort order. values are: • ascending—items are in ascending alphabetical order (a-z). • descending—items are in descending alphabetical order (z-a). • mostrecentlyviewed—items are in descending chronological order by view. this sort order is valid only for chatter feed streams. if not specified, default value is ascending. return value type: connectapi.chatterstreampage getstreams(communityid, pageparam, pagesize, sortparam, globalscope) get a sorted page of chatter feed streams from all enterprise cloud sites for the context user. 570apex reference guide chatterfeeds class api version 41.0 requires chatter yes signature public static connectapi.chatterstreampage getstreams(string communityid, integer pageparam, integer pagesize, connectapi.sortorder sortparam, boolean globalscope) parameters communityid type: string id for an experience cloud site, internal, or null. pageparam type: integer number of the page you want returned. starts at 0. if you pass in null or 0, the first page is returned. pagesize type: integer specifies the number of items per page. valid values are from 1 to 250. the default size is 25. sortparam type: connectapi.sortorder specifies the sort order. values are: • ascending—items are in ascending alphabetical order (a-z). • descending—items are in descending alphabetical order (z-a). • mostrecentlyviewed—items are in descending chronological order by view. this sort order is valid only for chatter feed streams. if not specified, default value is ascending. globalscope type: boolean specifies whether to get streams from all the context user’s experience cloud sites, regardless of the communityid value. tip: if you know the communityid for the streams, we recommend setting globalscope to false. return value type: connectapi.chatterstreampage getsupportedemojis() get supported emojis for the org. 571apex reference guide chatterfeeds class api version 39.0 requires chatter yes signature public static connectapi.supportedemojis getsupportedemojis() return value type: connectapi.supportedemojis usage to get the list, emojis must be enabled in your org. getthreadsforfeedcomment(communityid, commentid) get threaded comments for a comment. api version 44.0 available to guest users 44.0 requires chatter yes signature public static connectapi.commentpage getthreadsforfeedcomment(string communityid, string commentid) parameters communityid type: string id for an experience cloud site, internal, or null. commentid type: string id of the comment. 572apex reference guide chatterfeeds class return value type: connect |
api.commentpage if the comment doesn’t support the comments capability, the return value is connectapi.notfoundexception. getthreadsforfeedcomment(communityid, commentid, pageparam, pagesize) get a page of threaded comments for a comment. api version 44.0 available to guest users 44.0 requires chatter yes signature public static connectapi.commentpage getthreadsforfeedcomment(string communityid, string commentid, string pageparam, integer pagesize) parameters communityid type: string id for an experience cloud site, internal, or null. commentid type: string id of the comment. pageparam type: string specifies the page token to use to view a page of information. page tokens are returned as part of the response class, such as currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of items per page. valid values are from 1 through 100. if you pass in null, the default size is 25. return value type: connectapi.commentpage if the comment doesn’t support the comments capability, the return value is connectapi.notfoundexception. 573apex reference guide chatterfeeds class getthreadsforfeedcomment(communityid, commentid, threadedcommentscollapsed) access the comments capability for a comment. api version 44.0 available to guest users 44.0 requires chatter yes signature public static connectapi.commentscapability getthreadsforfeedcomment(string communityid, string commentid, boolean threadedcommentscollapsed) parameters communityid type: string id for an experience cloud site, internal, or null. commentid type: string id of the comment. threadedcommentscollapsed type: boolean specifies whether to return threaded comments in a collapsed style (true) or not (false). if you pass in null, the default is false. return value type: connectapi.commentscapability if the comment doesn’t support the comments capability, the return value is connectapi.notfoundexception. gettopunansweredquestions(communityid) (pilot) get top unanswered questions for the context user in aexperience cloud site. note: we provided top-five unanswered questions to selected customers through a pilot program that required agreement to specific terms and conditions. this pilot program is closed and not accepting new participants. api version 42.0 574apex reference guide chatterfeeds class requires chatter yes signature public static connectapi.feedelementpage gettopunansweredquestions(string communityid) parameters communityid type: string id of the experience cloud site. return value type: connectapi.feedelementpage usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: settestgettopunansweredquestions(communityid, result) (pilot) apex developer guide: testing connectapi code gettopunansweredquestions(communityid, filter) (pilot) get filtered top unanswered questions for the context user in an experience cloud site. note: we provided top-five unanswered questions to selected customers through a pilot program that required agreement to specific terms and conditions. this pilot program is closed and not accepting new participants. api version 42.0 requires chatter yes signature public static connectapi.feedelementpage gettopunansweredquestions(string communityid, connectapi.topunansweredquestionsfiltertype filter) 575apex reference guide chatterfeeds class parameters communityid type: string id of the experience cloud site. filter type: connectapi.feedfilter specifies the filter for the feed. unansweredquestionswithcandidateanswers is the only valid value. return value type: connectapi.feedelementpage usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: settestgettopunansweredquestions(communityid, filter, result) (pilot) apex developer guide: testing connectapi code gettopunansweredquestions(communityid, pagesize) (pilot) get a page of top unanswered questions for the context user in an experience cloud site. |
note: we provided top-five unanswered questions to selected customers through a pilot program that required agreement to specific terms and conditions. this pilot program is closed and not accepting new participants. api version 42.0 requires chatter yes signature public static connectapi.feedelementpage gettopunansweredquestions(string communityid, integer pagesize) parameters communityid type: string id of the experience cloud site. pagesize type: integer 576apex reference guide chatterfeeds class specifies the number of items per page. valid values are from 0 through 10. if you pass in null, the default size is 5. return value type: connectapi.feedelementpage usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: settestgettopunansweredquestions(communityid, pagesize, result) (pilot) apex developer guide: testing connectapi code gettopunansweredquestions(communityid, filter, pagesize) (pilot) get a page of filtered top unanswered questions for the context user in an experience cloud site. note: we provided top-five unanswered questions to selected customers through a pilot program that required agreement to specific terms and conditions. this pilot program is closed and not accepting new participants. api version 42.0 requires chatter yes signature public static connectapi.feedelementpage gettopunansweredquestions(string communityid, connectapi.feedfilter filter, integer pagesize) parameters communityid type: string id of the experience cloud site. filter type: connectapi.feedfilter specifies the filter for the feed. unansweredquestionswithcandidateanswers is the only valid value. pagesize type: integer specifies the number of items per page. valid values are from 0 through 10. if you pass in null, the default size is 5. 577apex reference guide chatterfeeds class return value type: connectapi.feedelementpage usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: settestgettopunansweredquestions(communityid, filter, pagesize, result) (pilot) apex developer guide: testing connectapi code getvotesforcomment(communityid, commentid, vote) get the first page of users who upvoted or downvoted a comment. api version 42.0 available to guest users 42.0 requires chatter yes signature public static connectapi.votepage getvotesforcomment(string communityid, string commentid, connectapi.updownvotevalue vote) parameters communityid type: string id for an experience cloud site, internal, or null. commentid type: string id of the comment. vote type: connectapi.updownvotevalue specifies the value of the vote for the feed element. values are: • down • up 578apex reference guide chatterfeeds class you can’t specify none. return value type: connectapi.votepage if the comment doesn’t support this capability, the return value is connectapi.notfoundexception. getvotesforcomment(communityid, commentid, vote, pageparam, pagesize) get a page of users who upvoted or downvoted a comment. api version 42.0 available to guest users 42.0 requires chatter yes signature public static connectapi.votepage getvotesforcomment(string communityid, string commentid, connectapi.updownvotevalue vote, integer pageparam, integer pagesize) parameters communityid type: string id for an experience cloud site, internal, or null. commentid type: string id of the comment. vote type: connectapi.updownvotevalue specifies the value of the vote for the feed element. values are: • down • up you can’t specify none. pageparam type: integer number of the page you want returned. starts at 0. if you pass in null or 0, the first page is returned. 579apex reference guide chatterfeeds class pagesize type: integer specifies the number of items per page. valid values are from |
1 through 100. if you pass in null, the default size is 25. return value type: connectapi.votepage if the comment doesn’t support this capability, the return value is connectapi.notfoundexception. getvotesforfeedelement(communityid, feedelementid, vote) get the first page of users who upvoted or downvoted a feed element. api version 42.0 available to guest users 42.0 requires chatter yes signature public static connectapi.votepage getvotesforfeedelement(string communityid, string feedelementid, connectapi.updownvotevalue vote) parameters communityid type: string id for an experience cloud site, internal, or null. feedelementid type: string id of the feed element. vote type: connectapi.updownvotevalue specifies the value of the vote for the feed element. values are: • down • up you can’t specify none. 580apex reference guide chatterfeeds class return value type: connectapi.votepage if the feed element doesn’t support this capability, the return value is connectapi.notfoundexception. getvotesforfeedelement(communityid, feedelementid, vote, pageparam, pagesize) get a page of users who upvoted or downvoted a feed element. api version 42.0 available to guest users 42.0 requires chatter yes signature public static connectapi.votepage getvotesforfeedelement(string communityid, string feedelementid, connectapi.updownvotevalue vote, integer pageparam, integer pagesize) parameters communityid type: string id for an experience cloud site, internal, or null. feedelementid type: string id of the feed element. vote type: connectapi.updownvotevalue specifies the value of the vote for the feed element. values are: • down • up you can’t specify none. pageparam type: integer number of the page you want returned. starts at 0. if you pass in null or 0, the first page is returned. pagesize type: integer specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in null, the default size is 25. 581apex reference guide chatterfeeds class return value type: connectapi.votepage if the feed element doesn’t support this capability, the return value is connectapi.notfoundexception. iscommenteditablebyme(communityid, commentid) discover whether the context user can edit a comment. api version 34.0 requires chatter yes signature public static connectapi.feedentityiseditable iscommenteditablebyme(string communityid, string commentid) parameters communityid type: string id for an experience cloud site, internal, or null. commentid type: string id of the comment. return value type: connectapi.feedentityiseditable if the comment doesn’t support the edit capability, the return value is connectapi.notfoundexception. see also: edit a comment isfeedelementeditablebyme(communityid, feedelementid) discover whether the context user can edit a feed element. api version 34.0 582 |
apex reference guide chatterfeeds class requires chatter yes signature public static connectapi.feedentityiseditable isfeedelementeditablebyme(string communityid, string feedelementid) parameters communityid type: string id for an experience cloud site, internal, or null. feedelementid type: string id of the feed element. feed items are the only type of feed element that can be edited. return value type: connectapi.feedentityiseditable if the feed element doesn’t support the edit capability, the return value is connectapi.notfoundexception. see also: edit a feed element edit a question title and post ismodified(communityid, feedtype, subjectid, since) discover whether a news feed has been updated or changed. use this method to poll a news feed for updates. important: this feature is available through a feed polling pilot program. this pilot program is closed and not accepting new participants. api version 28.0 requires chatter yes signature public static connectapi.feedmodifiedinfo ismodified(string communityid, connectapi.feedtype feedtype, string subjectid, string since) 583apex reference guide chatterfeeds class parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype specifies the type of feed. the only supported type is news subjectid type: string id of the context user or the alias me. since type: string an opaque token containing information about the last modified date of the feed. retrieve this token from the feedelementpage.ismodifiedtoken property. return value type: connectapi.feedmodifiedinfo likecomment(communityid, commentid) like a comment for the context user. api version 28.0 requires chatter yes signature public static connectapi.chatterlike likecomment(string communityid, string commentid) parameters communityid type: string id for an experience cloud site, internal, or null. commentid type: string id for a comment. 584apex reference guide chatterfeeds class return value type: connectapi.chatterlike if the context user has already liked the comment, this method is a non-operation and returns the existing like. likefeedelement(communityid, feedelementid) like a feed element. api version 32.0 requires chatter yes signature public static connectapi.chatterlike likefeedelement(string communityid, string feedelementid) parameters communityid type: string id for an experience cloud site, internal, or null. feedelementid type: string id of the feed element. return value type: connectapi.chatterlike if the feed element doesn’t support the chatterlikes capability, the return value is connectapi.notfoundexception. example connectapi.chatterlike chatterlike = connectapi.chatterfeeds.likefeedelement(null, '0d5d0000000kugh'); postcommenttofeedelement(communityid, feedelementid, text) post a plain-text comment to a feed element. api version 32.0 585apex reference guide chatterfeeds class requires chatter yes signature public static connectapi.comment postcommenttofeedelement(string communityid, string feedelementid, string text) parameters communityid type: string id for an experience cloud site, internal, or null. feedelementid type: string id of the feed element. text type: string text of the comment. a comment can contain up to 10,000 characters. return value type: connectapi.comment if the feed element doesn’t support the comments capability, the return value is connectapi.notfoundexception. example connectapi.comment comment = connectapi.chatterfeeds.postcommenttofeedelement(null, '0d5d0000000kugh', 'i agree with the proposal.' ); postcommenttofeedelement(communityid, feedelementid, comment, feedelementfileupload) post a rich-text comment to a feed element. use this method to include mentions and to attach a file. api version 32.0 requires chatter yes 586apex reference guide chatterfeeds class signature public static connectapi.comment post |
commenttofeedelement(string communityid, string feedelementid, connectapi.commentinput comment, connectapi.binaryinput feedelementfileupload) parameters communityid type: string id for an experience cloud site, internal, or null. feedelementid type: string id of the feed element. comment type: connectapi.commentinput the comment body, including text and mentions, and capabilities, such as information about an attached file. a comment can contain up to 10,000 characters. feedelementfileupload type: connectapi.binaryinput a new binary file to attach to the comment, or null. if you specify a binary file, specify the title and description of the file in the comment parameter. return value type: connectapi.comment if the feed element doesn’t support the comments capability, the return value is connectapi.notfoundexception. example for posting a comment with mentions you can post comments with mentions two ways. use the connectapihelper repository on github to write a single line of code, or use this method example. string communityid = null; string feedelementid = '0d5d0000000ktw3'; connectapi.commentinput commentinput = new connectapi.commentinput(); connectapi.mentionsegmentinput mentionsegmentinput = new connectapi.mentionsegmentinput(); connectapi.messagebodyinput messagebodyinput = new connectapi.messagebodyinput(); connectapi.textsegmentinput textsegmentinput = new connectapi.textsegmentinput(); messagebodyinput.messagesegments = new list<connectapi.messagesegmentinput>(); textsegmentinput.text = 'does anyone in this group have an idea? '; messagebodyinput.messagesegments.add(textsegmentinput); mentionsegmentinput.id = '005d00000000oot'; messagebodyinput.messagesegments.add(mentionsegmentinput); 587apex reference guide chatterfeeds class commentinput.body = messagebodyinput; connectapi.comment commentrep = connectapi.chatterfeeds.postcommenttofeedelement(communityid, feedelementid, commentinput, null); example for posting a comment with an existing file string feedelementid = '0d5d0000000ktw3'; connectapi.commentinput commentinput = new connectapi.commentinput(); connectapi.messagebodyinput messagebodyinput = new connectapi.messagebodyinput(); connectapi.textsegmentinput textsegmentinput = new connectapi.textsegmentinput(); textsegmentinput.text = 'i attached this file from salesforce files.'; messagebodyinput.messagesegments = new list<connectapi.messagesegmentinput>(); messagebodyinput.messagesegments.add(textsegmentinput); commentinput.body = messagebodyinput; connectapi.commentcapabilitiesinput commentcapabilitiesinput = new connectapi.commentcapabilitiesinput(); connectapi.contentcapabilityinput contentcapabilityinput = new connectapi.contentcapabilityinput(); commentcapabilitiesinput.content = contentcapabilityinput; contentcapabilityinput.contentdocumentid = '069d00000001rnj'; commentinput.capabilities = commentcapabilitiesinput; connectapi.comment commentrep = connectapi.chatterfeeds.postcommenttofeedelement(network.getnetworkid(), feedelementid, commentinput, null); example for posting a comment with a new file string feedelementid = '0d5d0000000ktw3'; connectapi.commentinput commentinput = new connectapi.commentinput(); connectapi.messagebodyinput messagebodyinput = new connectapi.messagebodyinput(); connectapi.textsegmentinput textsegmentinput = new connectapi.textsegmentinput(); textsegmentinput.text = 'enjoy this new file.'; messagebodyinput.messagesegments = new list<connectapi.messagesegmentinput>(); messagebodyinput.messagesegments.add(textsegmentinput); commentinput.body = messagebodyinput; connectapi.commentcapabilitiesinput commentcapabilitiesinput = new connectapi.commentcapabilitiesinput(); connectapi.contentcapabilityinput contentcapabilityinput = new 588apex reference guide chatterfeeds class connectapi.contentcapabilityinput(); commentcapabilities |
input.content = contentcapabilityinput; contentcapabilityinput.title = 'title'; commentinput.capabilities = commentcapabilitiesinput; string text = 'these are the contents of the new file.'; blob myblob = blob.valueof(text); connectapi.binaryinput bininput = new connectapi.binaryinput(myblob, 'text/plain', 'filename'); connectapi.comment commentrep = connectapi.chatterfeeds.postcommenttofeedelement(network.getnetworkid(), feedelementid, commentinput, bininput); example for posting a rich-text comment with an inline image you can post rich-text comments with inline images and mentions two ways. use the connectapihelper repository on github to write a single line of code, or use this method example. in this example, the image file is existing content that has already been uploaded to salesforce. string communityid = null; string feedelementid = '0d5r0000000sber'; string imageid = '069r00000000igq'; string mentioneduserid = '005r0000000dimz'; connectapi.commentinput input = new connectapi.commentinput(); connectapi.messagebodyinput messageinput = new connectapi.messagebodyinput(); connectapi.textsegmentinput textsegment; connectapi.mentionsegmentinput mentionsegment; connectapi.markupbeginsegmentinput markupbeginsegment; connectapi.markupendsegmentinput markupendsegment; connectapi.inlineimagesegmentinput inlineimagesegment; messageinput.messagesegments = new list<connectapi.messagesegmentinput>(); markupbeginsegment = new connectapi.markupbeginsegmentinput(); markupbeginsegment.markuptype = connectapi.markuptype.bold; messageinput.messagesegments.add(markupbeginsegment); textsegment = new connectapi.textsegmentinput(); textsegment.text = 'hello '; messageinput.messagesegments.add(textsegment); mentionsegment = new connectapi.mentionsegmentinput(); mentionsegment.id = mentioneduserid; messageinput.messagesegments.add(mentionsegment); textsegment = new connectapi.textsegmentinput(); textsegment.text = '!'; messageinput.messagesegments.add(textsegment); 589apex reference guide chatterfeeds class markupendsegment = new connectapi.markupendsegmentinput(); markupendsegment.markuptype = connectapi.markuptype.bold; messageinput.messagesegments.add(markupendsegment); inlineimagesegment = new connectapi.inlineimagesegmentinput(); inlineimagesegment.alttext = 'image one'; inlineimagesegment.fileid = imageid; messageinput.messagesegments.add(inlineimagesegment); input.body = messageinput; connectapi.chatterfeeds.postcommenttofeedelement(communityid, feedelementid, input, null); example for posting a rich-text comment with a code block string communityid = null; string feedelementid = '0d5r0000000sber'; string codesnippet = '<html>\n\t<body>\n\t\thello, world!\n\t</body>\n</html>'; connectapi.commentinput input = new connectapi.commentinput(); connectapi.messagebodyinput messageinput = new connectapi.messagebodyinput(); connectapi.textsegmentinput textsegment; connectapi.markupbeginsegmentinput markupbeginsegment; connectapi.markupendsegmentinput markupendsegment; messageinput.messagesegments = new list<connectapi.messagesegmentinput>(); markupbeginsegment = new connectapi.markupbeginsegmentinput(); markupbeginsegment.markuptype = connectapi.markuptype.code; messageinput.messagesegments.add(markupbeginsegment); textsegment = new connectapi.textsegmentinput(); textsegment.text = codesnippet; messageinput.messagesegments.add(textsegment); markupendsegment = new connecta |
pi.markupendsegmentinput(); markupendsegment.markuptype = connectapi.markuptype.code; messageinput.messagesegments.add(markupendsegment); input.body = messageinput; connectapi.chatterfeeds.postcommenttofeedelement(communityid, feedelementid, input, null); postfeedelement(communityid, subjectid, feedelementtype, text) post a plain-text feed element. api version 31.0 590apex reference guide chatterfeeds class requires chatter yes signature public static connectapi.feedelement postfeedelement(string communityid, string subjectid, connectapi.feedelementtype feedelementtype, string text) parameters communityid type: string id for an experience cloud site, internal, or null. subjectid type: string the id of the parent this feed element is being posted to. this value can be the id of a user, group, or record, or the string me to indicate the context user. feedelementtype type: connectapi.feedelementtype the only possible value is feeditem. text type: string the text of the feed element. a feed element can contain up to 10,000 characters. return value type: connectapi.feedelement example connectapi.feedelement feedelement = connectapi.chatterfeeds.postfeedelement(network.getnetworkid(), '0f9d0000000treh', connectapi.feedelementtype.feeditem, 'on vacation this week.'); postfeedelement(communityid, feedelement) post a rich-text feed element. include mentions and hashtag topics, attach already uploaded files to a feed element, and associate action link groups with a feed element. you can also use this method to share a feed element and add a comment. api version 36.0 requires chatter yes 591apex reference guide chatterfeeds class signature public static connectapi.feedelement postfeedelement(string communityid, connectapi.feedelementinput feedelement) parameters communityid type: string id for an experience cloud site, internal, or null. feedelement type: connectapi.feedelementinput specify rich text, including mentions. optionally, specify a link, a poll, or up to 10 existing files. return value type: connectapi.feedelement example for posting a feed element with a mention you can post feed elements with mentions two ways. use the connectapihelper repository on github to write a single line of code, or use this method example. connectapi.feediteminput feediteminput = new connectapi.feediteminput(); connectapi.mentionsegmentinput mentionsegmentinput = new connectapi.mentionsegmentinput(); connectapi.messagebodyinput messagebodyinput = new connectapi.messagebodyinput(); connectapi.textsegmentinput textsegmentinput = new connectapi.textsegmentinput(); messagebodyinput.messagesegments = new list<connectapi.messagesegmentinput>(); mentionsegmentinput.id = '005rr000000dme9'; messagebodyinput.messagesegments.add(mentionsegmentinput); textsegmentinput.text = 'could you take a look?'; messagebodyinput.messagesegments.add(textsegmentinput); feediteminput.body = messagebodyinput; feediteminput.feedelementtype = connectapi.feedelementtype.feeditem; feediteminput.subjectid = '0f9rr0000004cpw'; connectapi.feedelement feedelement = connectapi.chatterfeeds.postfeedelement(network.getnetworkid(), feediteminput); example for posting a feed element with existing content // define the feediteminput object to pass to postfeedelement connectapi.feediteminput feediteminput = new connectapi.feediteminput(); feediteminput.subjectid = 'me'; connectapi.textsegmentinput textsegmentinput = new connectapi.textsegmentinput(); textsegmentinput.text = 'would you please review these docs?'; 592apex reference guide chatterfeeds class // the messagebodyinput object holds the text in the post connectapi.messagebodyinput messagebodyinput = new connectapi.messagebodyinput(); messagebodyinput.messagesegments = new list<connectapi.messageseg |
mentinput>(); messagebodyinput.messagesegments.add(textsegmentinput); feediteminput.body = messagebodyinput; // the feedelementcapabilitiesinput object holds the capabilities of the feed item. // for this feed item, we define a files capability to hold the file(s). list<string> fileids = new list<string>(); fileids.add('069xx00000000qo'); fileids.add('069xx00000000qt'); fileids.add('069xx00000000qn'); fileids.add('069xx00000000qi'); fileids.add('069xx00000000qd'); connectapi.filescapabilityinput filesinput = new connectapi.filescapabilityinput(); filesinput.items = new list<connectapi.fileidinput>(); for (string fileid : fileids) { connectapi.fileidinput idinput = new connectapi.fileidinput(); idinput.id = fileid; filesinput.items.add(idinput); } connectapi.feedelementcapabilitiesinput feedelementcapabilitiesinput = new connectapi.feedelementcapabilitiesinput(); feedelementcapabilitiesinput.files = filesinput; feediteminput.capabilities = feedelementcapabilitiesinput; // post the feed item. connectapi.feedelement feedelement = connectapi.chatterfeeds.postfeedelement(network.getnetworkid(), feediteminput); example for posting a rich-text feed element with an inline image you can post rich-text feed elements with inline images and mentions two ways. use the connectapihelper repository on github to write a single line of code, or use this method example. in this example, the image file is existing content that has already been uploaded to salesforce. the post also includes text and a mention. string communityid = null; string imageid = '069d00000001ina'; string mentioneduserid = '005d0000001qnpr'; string targetuserorgrouporrecordid = '005d0000001gif0'; connectapi.feediteminput input = new connectapi.feediteminput(); input.subjectid = targetuserorgrouporrecordid; input.feedelementtype = connectapi.feedelementtype.feeditem; connectapi.messagebodyinput messageinput = new connectapi.messagebodyinput(); connectapi.textsegmentinput textsegment; connectapi.mentionsegmentinput mentionsegment; connectapi.markupbeginsegmentinput markupbeginsegment; connectapi.markupendsegmentinput markupendsegment; 593apex reference guide chatterfeeds class connectapi.inlineimagesegmentinput inlineimagesegment; messageinput.messagesegments = new list<connectapi.messagesegmentinput>(); markupbeginsegment = new connectapi.markupbeginsegmentinput(); markupbeginsegment.markuptype = connectapi.markuptype.bold; messageinput.messagesegments.add(markupbeginsegment); textsegment = new connectapi.textsegmentinput(); textsegment.text = 'hello '; messageinput.messagesegments.add(textsegment); mentionsegment = new connectapi.mentionsegmentinput(); mentionsegment.id = mentioneduserid; messageinput.messagesegments.add(mentionsegment); textsegment = new connectapi.textsegmentinput(); textsegment.text = '!'; messageinput.messagesegments.add(textsegment); markupendsegment = new connectapi.markupendsegmentinput(); markupendsegment.markuptype = connectapi.markuptype.bold; messageinput.messagesegments.add(markupendsegment); inlineimagesegment = new connectapi.inlineimagesegmentinput(); inlineimagesegment.alttext = 'image one'; inlineimagesegment.fileid = imageid; messageinput.messagesegments.add(inlineimagesegment); input.body = messageinput; connectapi.chatterfeeds.postfeedelement(communityid, input); example for posting a rich-text feed element with a code block string communityid = null; string targetuserorgrouporrecordid = 'me'; string codesnippet = ' |
<html>\n\t<body>\n\t\thello, world!\n\t</body>\n</html>'; connectapi.feediteminput input = new connectapi.feediteminput(); input.subjectid = targetuserorgrouporrecordid; input.feedelementtype = connectapi.feedelementtype.feeditem; connectapi.messagebodyinput messageinput = new connectapi.messagebodyinput(); connectapi.textsegmentinput textsegment; connectapi.markupbeginsegmentinput markupbeginsegment; connectapi.markupendsegmentinput markupendsegment; messageinput.messagesegments = new list<connectapi.messagesegmentinput>(); markupbeginsegment = new connectapi.markupbeginsegmentinput(); markupbeginsegment.markuptype = connectapi.markuptype.code; messageinput.messagesegments.add(markupbeginsegment); textsegment = new connectapi.textsegmentinput(); 594apex reference guide chatterfeeds class textsegment.text = codesnippet; messageinput.messagesegments.add(textsegment); markupendsegment = new connectapi.markupendsegmentinput(); markupendsegment.markuptype = connectapi.markuptype.code; messageinput.messagesegments.add(markupendsegment); input.body = messageinput; connectapi.chatterfeeds.postfeedelement(communityid, input); example for sharing a feed element (in version 39.0 and later) // define the feediteminput object to pass to postfeedelement connectapi.feediteminput feediteminput = new connectapi.feediteminput(); feediteminput.subjectid = 'me'; connectapi.textsegmentinput textsegmentinput = new connectapi.textsegmentinput(); textsegmentinput.text = 'look at this post i'm sharing.'; // the messagebodyinput object holds the text in the post connectapi.messagebodyinput messagebodyinput = new connectapi.messagebodyinput(); messagebodyinput.messagesegments = new list<connectapi.messagesegmentinput>(); messagebodyinput.messagesegments.add(textsegmentinput); feediteminput.body = messagebodyinput; connectapi.feedentitysharecapabilityinput shareinput = new connectapi.feedentitysharecapabilityinput(); shareinput.feedentityid = '0d5r0000000sebc'; connectapi.feedelementcapabilitiesinput feedelementcapabilitiesinput = new connectapi.feedelementcapabilitiesinput(); feedelementcapabilitiesinput.feedentityshare = shareinput; feediteminput.capabilities = feedelementcapabilitiesinput; // post the feed item. connectapi.feedelement feedelement = connectapi.chatterfeeds.postfeedelement(network.getnetworkid(), feediteminput); example for sending a direct message // define the feediteminput object to pass to postfeedelement connectapi.feediteminput feediteminput = new connectapi.feediteminput(); connectapi.textsegmentinput textsegmentinput = new connectapi.textsegmentinput(); textsegmentinput.text = 'thanks for attending my presentation test run this morning. send me any feedback.'; // the messagebodyinput object holds the text in the post connectapi.messagebodyinput messagebodyinput = new connectapi.messagebodyinput(); messagebodyinput.messagesegments = new list<connectapi.messagesegmentinput>(); messagebodyinput.messagesegments.add(textsegmentinput); feediteminput.body = messagebodyinput; // the feedelementcapabilitiesinput object holds the capabilities of the feed item. // for this feed item, we define a direct message capability to hold the member(s) and the subject. 595apex reference guide chatterfeeds class list<string> memberids = new list<string>(); memberids.add('005b00000016ouq'); memberids.add('005b0000001rin6'); connectapi.directmessagecapabilityinput dminput = new connectapi.directmessagecapabilityinput(); dminput.subject = 'thank you!'; dminput.memberstoadd = memberids; connectapi.feedelementcapabilitiesinput feedelement |
capabilitiesinput = new connectapi.feedelementcapabilitiesinput(); feedelementcapabilitiesinput.directmessage = dminput; feediteminput.capabilities = feedelementcapabilitiesinput; // post the feed item. connectapi.feedelement feedelement = connectapi.chatterfeeds.postfeedelement(network.getnetworkid(), feediteminput); postfeedelementbatch(communityid, feedelements) post a list of feed elements. api version 32.0 requires chatter yes signature public static connectapi.batchresult[] postfeedelementbatch(string communityid, list<connectapi.batchinput> feedelements) parameters communityid type: string id for an experience cloud site, internal, or null. feedelements type: list<connectapi.batchinput> the list can contain up to 500 connectapi.batchinput objects. in the connectapi.batchinput constructor, the input object must be a concrete instance of the abstract connectapi.feedelementinput class. return value type: connectapi.batchresult[] 596apex reference guide chatterfeeds class the connectapi.batchresult.getresult() method returns a connectapi.feedelement object. the returned objects correspond to each of the input objects and are returned in the same order as the input objects. the method call fails only if an error occurs that affects the entire operation (such as a parsing failure). if an individual object causes an error, the error is embedded within the connectapi.batchresult list. usage use this method to post a list of feed elements efficiently. create a list containing up to 500 objects and insert them all for the cost of one dml statement. in version 36.0 and later, you can attach only one already uploaded file to each post. the connectapi.batchinput has three constructors, but the postfeedelementbatch method supports only connectapi.batchinput(object input) in version 35.0 and later. this constructor doesn’t support a binary input. in version 32.0–35.0, this method supports both connectapi.batchinput(object input) and connectapi.batchinput(object input, connectapi.binaryinput binary) constructors. the connectapi.batchinput(object input, connectapi.binaryinput binary) constructor allows for a single binary input. in each constructor, the input object must be an instance of connectapi.feedelementinput. example this trigger bulk posts to the feeds of newly inserted accounts. trigger postfeeditemtoaccount on account (after insert) { account[] accounts = trigger.new; // bulk post to the account feeds. list<connectapi.batchinput> batchinputs = new list<connectapi.batchinput>(); for (account a : accounts) { connectapi.feediteminput input = new connectapi.feediteminput(); input.subjectid = a.id; connectapi.messagebodyinput body = new connectapi.messagebodyinput(); body.messagesegments = new list<connectapi.messagesegmentinput>(); connectapi.textsegmentinput textsegment = new connectapi.textsegmentinput(); textsegment.text = 'let\'s win the ' + a.name + ' account.'; body.messagesegments.add(textsegment); input.body = body; connectapi.batchinput batchinput = new connectapi.batchinput(input); batchinputs.add(batchinput); } connectapi.chatterfeeds.postfeedelementbatch(network.getnetworkid(), batchinputs); } 597apex reference guide chatterfeeds class publishdraftfeedelement(communityid, feedelementid, feedelement) publish a draft feed element. api version 44.0 requires chatter yes signature public static connectapi.feedelement publishdraftfeedelement(string communityid, string feedelementid, connectapi.feedelementinput feedelement) parameters communityid type: string id for an experience cloud site, internal, or null. feedelementid type: string id of the feed element to publish. feedelement type: connectapi.feedelementinput use this optional parameter to edit your draft before publishing. return value type: connectapi.feedelement the |
published feed element has a new id. searchfeedelements(communityid, q) get the first page of feed elements that match the search criteria. api version 31.0 available to guest users 31.0 requires chatter yes 598apex reference guide chatterfeeds class signature public static connectapi.feedelementpage searchfeedelements(string communityid, string q) parameters communityid type: string id for an experience cloud site, internal, or null. q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. return value type: connectapi.feedelementpage usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: settestsearchfeedelements(communityid, q, result) apex developer guide: testing connectapi code searchfeedelements(communityid, q, sortparam) get the first page of sorted feed elements that match the search criteria. api version 31.0 available to guest users 31.0 requires chatter yes signature public static connectapi.feedelementpage searchfeedelements(string communityid, string q, connectapi.feedsortorder sortparam) 599apex reference guide chatterfeeds class parameters communityid type: string id for an experience cloud site, internal, or null. q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. if you pass in null, the default value createddatedesc is used. return value type: connectapi.feedelementpage usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: settestsearchfeedelements(communityid, q, sortparam, result) apex developer guide: testing connectapi code searchfeedelements(communityid, q, threadedcommentscollapsed) get the feed elements and comments that match the search criteria. api version 44.0 available to guest users 44.0 600apex reference guide chatterfeeds class requires chatter yes signature public static connectapi.feedelementpage searchfeedelements(string communityid, string q, boolean threadedcommentscollapsed) parameters communityid type: string id for an experience cloud site, internal, or null. q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. threadedcommentscollapsed type: boolean specifies whether to return threaded comments in a collapsed style (true) or not (false). if you pass in null, the default is false. return value type: connectapi.feedelementpage usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: settestsearchfeedelements(communityid, q, threadedcommentscollapsed, result) apex developer guide: testing connectapi code searchfeedelements(communityid, q, pageparam, pagesize) get a page of feed elements that match the search criteria. api version 31.0 available to guest users 31.0 601apex reference guide chatterfeeds class requires chatter yes signature public static connectapi |
.feedelementpage searchfeedelements(string communityid, string q, string pageparam, integer pagesize) parameters communityid type: string id for an experience cloud site, internal, or null. q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in null, the default size is 25. return value type: connectapi.feedelementpage usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: settestsearchfeedelements(communityid, q, pageparam, pagesize, result) apex developer guide: testing connectapi code searchfeedelements(communityid, q, pageparam, pagesize, sortparam) get a page of sorted feed elements that match the search criteria. api version 31.0 602apex reference guide chatterfeeds class available to guest users 31.0 requires chatter yes signature public static connectapi.feedelementpage searchfeedelements(string communityid, string q, string pageparam, integer pagesize, connectapi.feedsortorder sortparam) parameters communityid type: string id for an experience cloud site, internal, or null. q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. if you pass in null, the default value createddatedesc is used. return value type: connectapi.feedelementpage 603apex reference guide chatterfeeds class usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: settestsearchfeedelements(communityid, q, pageparam, pagesize, sortparam, result) apex developer guide: testing connectapi code searchfeedelements(communityid, q, pageparam, pagesize, threadedcommentscollapsed) get a page of feed elements with comments in a threaded style that match the search criteria. api version 44.0 available to guest users 44.0 requires chatter yes signature public static connectapi.feedelementpage searchfeedelements(string communityid, string q, string pageparam, integer pagesize, boolean threadedcommentscollapsed) parameters communityid type: string id for an experience cloud site, internal, or null. q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null |
, the first page is returned. pagesize type: integer specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in null, the default size is 25. 604apex reference guide chatterfeeds class threadedcommentscollapsed type: boolean specifies whether to return threaded comments in a collapsed style (true) or not (false). if you pass in null, the default is false. return value type: connectapi.feedelementpage usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: settestsearchfeedelements(communityid, q, pageparam, pagesize, threadedcommentscollapsed, result) apex developer guide: testing connectapi code searchfeedelements(communityid, q, recentcommentcount, pageparam, pagesize, sortparam) get a page of sorted feed elements that match the search criteria. each feed element includes no more than the specified number of comments. api version 31.0 available to guest users 31.0 requires chatter yes signature public static connectapi.feedelementpage searchfeedelements(string communityid, string q, integer recentcommentcount, string pageparam, integer pagesize, connectapi.feedsortorder sortparam) parameters communityid type: string id for an experience cloud site, internal, or null. 605apex reference guide chatterfeeds class q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. recentcommentcount type: integer maximum number of comments to return with each feed element. the default value is 3. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. if you pass in null, the default value createddatedesc is used. return value type: connectapi.feedelementpage usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: settestsearchfeedelements(communityid, q, recentcommentcount, pageparam, pagesize, sortparam, result) apex developer guide: testing connectapi code searchfeedelementsinfeed(communityid, feedtype, q) get the feed elements from the company, directmessagemoderation, home, moderation, and pendingreview feeds that match the search criteria. 606apex reference guide chatterfeeds class api version 31.0 available to guest users 31.0 requires chatter yes signature public static connectapi.feedelementpage searchfeedelementsinfeed(string communityid, connectapi.feedtype feedtype, string q) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype type of feed. valid values are company, directmessagemoderation, home, moderation, and pendingreview. q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. return value type: connectapi.feedelementpage usage to test code that uses this method, use the |
matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: settestsearchfeedelementsinfeed(communityid, feedtype, q, result) apex developer guide: testing connectapi code searchfeedelementsinfeed(communityid, feedtype, pageparam, pagesize, sortparam, q) get a page of sorted feed elements from the company, directmessagemoderation, home, moderation, and pendingreview feeds that match the search criteria. 607apex reference guide chatterfeeds class api version 31.0 available to guest users 31.0 requires chatter yes signature public static connectapi.feedelementpage searchfeedelementsinfeed(string communityid, connectapi.feedtype feedtype, string pageparam, integer pagesize, connectapi.feedsortorder sortparam, string q) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype type of feed. valid values are company, directmessagemoderation, home, moderation, and pendingreview. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. if you pass in null, the default value createddatedesc is used. 608apex reference guide chatterfeeds class q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. return value type: connectapi.feedelementpage usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: settestsearchfeedelementsinfeed(communityid, feedtype, pageparam, pagesize, sortparam, q, result) apex developer guide: testing connectapi code searchfeedelementsinfeed(communityid, feedtype, recentcommentcount, density, pageparam, pagesize, sortparam, q) get a page of sorted feed elements from the company, directmessagemoderation, home, moderation, and pendingreview feeds that match the search criteria. each feed element includes no more than the specified number of comments. api version 31.0 available to guest users 31.0 requires chatter yes signature public static connectapi.feedelementpage searchfeedelementsinfeed(string communityid, connectapi.feedtype feedtype, integer recentcommentcount, connectapi.feeddensity density, string pageparam, integer pagesize, connectapi.feedsortorder sortparam, string q) parameters communityid type: string id for an experience cloud site, internal, or null. 609apex reference guide chatterfeeds class feedtype type: connectapi.feedtype type of feed. valid values are company, directmessagemoderation, home, moderation, and pendingreview. recentcommentcount type: integer maximum number of comments to return with each feed element. the default value is 3. density type: connectapi.feeddensity specify the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. • fewerupdates—displays all updates from people and records the |
user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. if you pass in null, the default value createddatedesc is used. q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. return value type: connectapi.feedelementpage 610apex reference guide chatterfeeds class usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: settestsearchfeedelementsinfeed(communityid, feedtype, recentcommentcount, density, pageparam, pagesize, sortparam, q, result) apex developer guide: testing connectapi code searchfeedelementsinfeed(communityid, feedtype, recentcommentcount, density, pageparam, pagesize, sortparam, q, filter) get a page of sorted and filtered feed elements from the home feed that match the search criteria. each feed element includes no more than the specified number of comments. api version 32.0 available to guest users 32.0 requires chatter yes signature public static connectapi.feedelementpage searchfeedelementsinfeed(string communityid, connectapi.feedtype feedtype, integer recentcommentcount, connectapi.feeddensity density, string pageparam, integer pagesize, connectapi.feedsortorder sortparam, string q, connectapi.feedfilter filter) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype the type of feed. the only valid value is home. recentcommentcount type: integer maximum number of comments to return with each feed element. the default value is 3. 611apex reference guide chatterfeeds class density type: connectapi.feeddensity specify the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. when the sortparam is mostviewed, you must pass in null for the pageparam. pagesize type: integer specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in null, the default size is 25. when the sortparam is mostviewed, the pagesize must be a value from 1 to 25. sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most |
viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. if you pass in null, the default value createddatedesc is used. q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. filter type: connectapi.feedfilter specifies the feed filters. • allquestions—feed elements that are questions. • authoredby—feed elements authored by the user profile owner. this value is valid only for the userprofile feed. • communityscoped—feed elements that are scoped to experience cloud sites. currently, these feed elements have a user or a group parent record. however, other parent record types could be scoped to sites in the future. feed elements that are always visible in all sites are filtered out. this value is valid only for the userprofile feed. • questionswithcandidateanswers—feed elements that are questions that have candidate answers associated with them.this value is valid only for users with the access einstein-generated answers permission. 612apex reference guide chatterfeeds class • questionswithcandidateanswersreviewedpublished—feed elements that are questions that have candidate answers that have been reviewed or published. this value is valid only for users with the access einstein-generated answers permission. • read—feed elements that are older than 30 days or are marked as read for the context user. includes existing feed elements when the context user joined the group. this value is valid only for the record feed of a group. • solvedquestions—feed elements that are questions and that have a best answer. • unansweredquestions—feed elements that are questions and that don’t have any answers. • unansweredquestionswithcandidateanswers—feed elements that are questions that don’t have answers but have candidate answers associated with them. this value is valid only for users with the access einstein-generated answers permission. • unread—feed elements that are created in the past 30 days and aren’t marked as read for the context user. this value is valid only for the record feed of a group. • unsolvedquestions—feed elements that are questions and that don’t have a best answer. return value type: connectapi.feedelementpage usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: settestsearchfeedelementsinfeed(communityid, feedtype, recentcommentcount, density, pageparam, pagesize, sortparam, q, filter, result) apex developer guide: testing connectapi code searchfeedelementsinfeed(communityid, feedtype, subjectid, q) search up to 5,000 of the most recent feed elements in a feed for a subject id that match the search string. feed elements are returned in order of most recent activity. api version 31.0 available to guest users 31.0 requires chatter yes 613apex reference guide chatterfeeds class signature public static connectapi.feedelementpage searchfeedelementsinfeed(string communityid, connectapi.feedtype feedtype, string subjectid, string q) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype type of feed. valid values include every connectapi.feedtype except company, directmessages, filter, landing, streams, and topics. subjectid type: string if feedtype is record, subjectid can be any record id, including a group id. if feedtype is userprofile, subjectid can be any user id. if the feedtype is any other value, subjectid must be the id of the context user or the alias me. q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. return value type: connectapi.feedelementpage usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: |
settestsearchfeedelementsinfeed(communityid, feedtype, subjectid, q, result) apex developer guide: testing connectapi code searchfeedelementsinfeed(communityid, feedtype, subjectid, pageparam, pagesize, sortparam, q) get a page of sorted feed elements from a feed for a record or user that match the search criteria. api version 31.0 614apex reference guide chatterfeeds class available to guest users 31.0 requires chatter yes signature public static connectapi.feedelementpage searchfeedelementsinfeed(string communityid, connectapi.feedtype feedtype, string subjectid, string pageparam, integer pagesize, connectapi.feedsortorder sortparam, string q) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype type of feed. valid values include every connectapi.feedtype except company, directmessages, filter, landing, streams, and topics. subjectid type: string if feedtype is record, subjectid can be any record id, including a group id. if feedtype is userprofile, subjectid can be any user id. if the feedtype is any other value, subjectid must be the id of the context user or the alias me. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.feedsortorder order of feed items in the feed. • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. 615apex reference guide chatterfeeds class if you pass in null, the default value createddatedesc is used. q type: string search term. searches keywords in the user or group name. a minimum of one character is required. this parameter doesn’t support wildcards. this parameter is required. return value type: connectapi.feedelementpage usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: settestsearchfeedelementsinfeed(communityid, feedtype, subjectid, pageparam, pagesize, sortparam, q, result) apex developer guide: testing connectapi code searchfeedelementsinfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam, q) get a page of sorted feed elements from a feed that match the search criteria. each feed element includes no more than the specified number of comments. api version 31.0 available to guest users 31.0 requires chatter yes signature public static connectapi.feedelementpage searchfeedelementsinfeed(string communityid, connectapi.feedtype feedtype, string subjectid, integer recentcommentcount, connectapi.feeddensity density, string pageparam, integer pagesize, connectapi.feedsortorder sortparam, string q) parameters communityid type: string 616apex reference guide chatterfeeds class id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype type of feed. valid values include every connectapi.feedtype except company, directmessages, filter, landing, streams, and topics. subjectid type: string if feedtype is record, subjectid can be any record id, including a group id. if feedtype is userprofile, subjectid can be any user id. if the feedtype is any other value |
, subjectid must be the id of the context user or the alias me. recentcommentcount type: integer maximum number of comments to return with each feed element. the default value is 3. density type: connectapi.feeddensity specify the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. if you pass in null, the default value createddatedesc is used. q type: string 617apex reference guide chatterfeeds class required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. return value type: connectapi.feedelementpage usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: settestsearchfeedelementsinfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam, q, result) apex developer guide: testing connectapi code searchfeedelementsinfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam, q, filter) get a page of sorted and filtered feed elements from a userprofile feed that match the search criteria. api version 35.0 available to guest users 35.0 requires chatter yes signature public static connectapi.feedelementpage searchfeedelementsinfeed(string communityid, connectapi.feedtype feedtype, string subjectid, integer recentcommentcount, connectapi.feeddensity density, string pageparam, integer pagesize, connectapi.feedsortorder sortparam, string q, connectapi.feedfilter filter) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype 618apex reference guide chatterfeeds class value must be connectapi.feedtype.userprofile. subjectid type: string id of any user. to specify the context user, use the user id or the alias me. recentcommentcount type: integer maximum number of comments to return with each feed element. the default value is 3. density type: connectapi.feeddensity specify the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in null, the default size is |
25. sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. if you pass in null, the default value createddatedesc is used. q type: string one or more keywords to search for in the feed elements visible to the context user. the search string can contain wildcards and must contain at least two characters that aren’t wildcards. see wildcards. filter type: connectapi.feedfilter value must be connectapi.feedfilter.communityscoped. filters the feed to include only feed elements that are scoped to experience cloud sites. feed elements that are always visible in all sites are filtered out. 619apex reference guide chatterfeeds class return value type: connectapi.feedelementpage usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: settestsearchfeedelementsinfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam, q, filter, result) apex developer guide: testing connectapi code searchfeedelementsinfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam, q, customfilter) get a page of sorted and filtered feed elements from a case feed that match the search criteria. api version 40.0 available to guest users 40.0 requires chatter yes signature public static connectapi.feedelementpage searchfeedelementsinfeed(string communityid, connectapi.feedtype feedtype, string subjectid, integer recentcommentcount, connectapi.feeddensity density, string pageparam, integer pagesize, connectapi.feedsortorder sortparam, string q, string customfilter) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype value must be connectapi.feedtype.record. subjectid type: string 620apex reference guide chatterfeeds class the id of a case. recentcommentcount type: integer maximum number of comments to return with each feed element. the default value is 3. density type: connectapi.feeddensity specify the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. if you pass in null, the default value createddatedesc is used. q type: string one or more keywords to search |
for in the feed elements visible to the context user. the search string can contain wildcards and must contain at least two characters that aren’t wildcards. see wildcards. customfilter type: string custom filter that applies only to the case feed. see customfeedfilter in the metadata api developer guide for supported values. return value type: connectapi.feedelementpage 621apex reference guide chatterfeeds class usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: settestsearchfeedelementsinfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam, q, customfilter, result) apex developer guide: testing connectapi code searchfeedelementsinfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam, q, showinternalonly) get a page of sorted feed elements from a feed for a record or user that match the search criteria. each feed element includes no more than the specified number of comments. specify whether to return feed elements posted by internal (non-experience cloud site) users only. api version 31.0 available to guest users 31.0 requires chatter yes signature public static connectapi.feedelementpage searchfeedelementsinfeed(string communityid, connectapi.feedtype feedtype, string subjectid, integer recentcommentcount, connectapi.feeddensity density, string pageparam, integer pagesize, connectapi.feedsortorder sortparam, string q, boolean showinternalonly) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype value must be connectapi.feedtype.record. subjectid type: string any record id, including a group id. 622apex reference guide chatterfeeds class recentcommentcount type: integer maximum number of comments to return with each feed element. the default value is 3. density type: connectapi.feeddensity specify the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. if you pass in null, the default value createddatedesc is used. q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. showinternalonly type: boolean specifies whether to show only feed elements from internal (non-experience cloud site) users (true), or not (false). the default value is false. return value type: connectapi.feedelementpage 623apex reference guide chatterfeeds class usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: settestsearchfeedelementsinfeed(communityid, feedtype, subjectid |
, recentcommentcount, density, pageparam, pagesize, sortparam, q, showinternalonly, result) apex developer guide: testing connectapi code searchfeedelementsinfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam, q, showinternalonly, filter) get a page of sorted and filtered feed elements from a feed for a record or user that match the search criteria. each feed element includes no more than the specified number of comments. specify whether to return feed elements posted by internal (non-experience cloud site) users only. api version 32.0 available to guest users 32.0 requires chatter yes signature public static connectapi.feedelementpage searchfeedelementsinfeed(string communityid, connectapi.feedtype feedtype, string subjectid, integer recentcommentcount, connectapi.feeddensity density, string pageparam, integer pagesize, connectapi.feedsortorder sortparam, string q, boolean showinternalonly, connectapi.feedfilter filter) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype value must be connectapi.feedtype.record. subjectid type: string any record id, including a group id. 624apex reference guide chatterfeeds class recentcommentcount type: integer maximum number of comments to return with each feed element. the default value is 3. density type: connectapi.feeddensity specify the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. if you pass in null, the default value createddatedesc is used. q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. showinternalonly type: boolean specifies whether to show only feed elements from internal (non-experience cloud site) users (true), or not (false). the default value is false. filter type: connectapi.feedfilter specifies the feed filters. • allquestions—feed elements that are questions. • authoredby—feed elements authored by the user profile owner. this value is valid only for the userprofile feed. 625apex reference guide chatterfeeds class • communityscoped—feed elements that are scoped to experience cloud sites. currently, these feed elements have a user or a group parent record. however, other parent record types could be scoped to sites in the future. feed elements that are always visible in all sites are filtered out. this value is valid only for the userprofile feed. • questionswithcandidateanswers—feed elements that are questions that have candidate answers associated with them.this value is valid only for users with the access einstein-generated answers permission. • questionswithcandidateanswersreviewedpublished—feed elements that are questions that have candidate answers that have been reviewed or published. this value is valid only for users with the access einstein-generated answers permission. • read—feed elements that are |
older than 30 days or are marked as read for the context user. includes existing feed elements when the context user joined the group. this value is valid only for the record feed of a group. • solvedquestions—feed elements that are questions and that have a best answer. • unansweredquestions—feed elements that are questions and that don’t have any answers. • unansweredquestionswithcandidateanswers—feed elements that are questions that don’t have answers but have candidate answers associated with them. this value is valid only for users with the access einstein-generated answers permission. • unread—feed elements that are created in the past 30 days and aren’t marked as read for the context user. this value is valid only for the record feed of a group. • unsolvedquestions—feed elements that are questions and that don’t have a best answer. return value type: connectapi.feedelementpage usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: settestsearchfeedelementsinfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam, q, showinternalonly, filter, result) apex developer guide: testing connectapi code searchfeedelementsinfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam, q, showinternalonly, customfilter) get a page of sorted and filtered feed elements from a case feed that match the search criteria. api version 40.0 available to guest users 40.0 626apex reference guide chatterfeeds class requires chatter yes signature public static connectapi.feedelementpage searchfeedelementsinfeed(string communityid, connectapi.feedtype feedtype, string subjectid, integer recentcommentcount, connectapi.feeddensity density, string pageparam, integer pagesize, connectapi.feedsortorder sortparam, string q, boolean showinternalonly, string customfilter) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype value must be connectapi.feedtype.record. subjectid type: string the id of a case. recentcommentcount type: integer maximum number of comments to return with each feed element. the default value is 3. density type: connectapi.feeddensity specify the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.feedsortorder values are: 627apex reference guide chatterfeeds class • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. if you pass in null, the default value createddatedesc is used. q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. showinternalonly type: boolean specifies whether to show only feed elements from internal (non-experience cloud site) users (true), or not (false). the default |
value is false. filter type: string custom filter that applies only to the case feed. see customfeedfilter in the metadata api developer guide for supported values. return value type: connectapi.feedelementpage usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: settestsearchfeedelementsinfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam, q, showinternalonly, customfilter, result) apex developer guide: testing connectapi code searchfeedelementsinfilterfeed(communityid, subjectid, keyprefix, q) get the feed elements from a feed filtered by a key prefix that match the search criteria. api version 31.0 requires chatter yes 628apex reference guide chatterfeeds class signature public static connectapi.feedelementpage searchfeedelementsinfilterfeed(string communityid, string subjectid, string keyprefix, string q) parameters communityid type: string id for an experience cloud site, internal, or null. subjectid type: string id of the context user or the alias me. keyprefix type: string a key prefix that specifies record type. a key prefix is the first three characters in the object id, which specifies the object type. for example, user objects have a prefix of 005 and group objects have a prefix of 0f9. q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. return value type: connectapi.feedelementpage usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: settestsearchfeedelementsinfilterfeed(communityid, subjectid, keyprefix, q, result) apex developer guide: testing connectapi code searchfeedelementsinfilterfeed(communityid, subjectid, keyprefix, pageparam, pagesize, sortparam, q) get a page of sorted feed elements from a feed filtered by a key prefix that match the search criteria. api version 31.0 requires chatter yes 629apex reference guide chatterfeeds class signature public static connectapi.feedelementpage searchfeedelementsinfilterfeed(string communityid, string subjectid, string keyprefix, string pageparam, integer pagesize, connectapi.feedsortorder sortparam, string q) parameters communityid type: string id for an experience cloud site, internal, or null. subjectid type: string id of the context user or the alias me. keyprefix type: string a key prefix that specifies record type. a key prefix is the first three characters in the object id, which specifies the object type. for example, user objects have a prefix of 005 and group objects have a prefix of 0f9. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. if you pass in null, the default value createddatedesc is used. q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. |
return value type: connectapi.feedelementpage 630apex reference guide chatterfeeds class usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: settestsearchfeedelementsinfilterfeed(communityid, subjectid, keyprefix, pageparam, pagesize, sortparam, q, result) apex developer guide: testing connectapi code searchfeedelementsinfilterfeed(communityid, subjectid, keyprefix, recentcommentcount, density, pageparam, pagesize, sortparam, q) get a page of sorted feed elements from a feed filtered by a key prefix that match the search criteria. each feed element includes no more than the specified number of comments. api version 31.0 requires chatter yes signature public static connectapi.feedelementpage searchfeedelementsinfilterfeed(string communityid, string subjectid, string keyprefix, integer recentcommentcount, connectapi.feeddensity density, string pageparam, integer pagesize, connectapi.feedsortorder sortparam, string q) parameters communityid type: string id for an experience cloud site, internal, or null. subjectid type: string id of the context user or the alias me. keyprefix type: string a key prefix that specifies record type. a key prefix is the first three characters in the object id, which specifies the object type. for example, user objects have a prefix of 005 and group objects have a prefix of 0f9. recentcommentcount type: integer maximum number of comments to return with each feed element. the default value is 3. density type: connectapi.feeddensity 631apex reference guide chatterfeeds class specify the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. if you pass in null, the default value createddatedesc is used. q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. return value type: connectapi.feedelementpage usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: settestsearchfeedelementsinfilterfeed(communityid, subjectid, keyprefix, recentcommentcount, density, pageparam, pagesize, sortparam, q, result) apex developer guide: testing connectapi code 632 |
apex reference guide chatterfeeds class searchstreams(communityid, q) search the chatter feed streams for the context user. api version 40.0 requires chatter yes signature public static connectapi.chatterstreampage searchstreams(string communityid, string q) parameters communityid type: string id for an experience cloud site, internal, or null. q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. return value type: connectapi.chatterstreampage usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: settestsearchstreams(communityid, q, result) apex developer guide: testing connectapi code searchstreams(communityid, q, sortparam) search and sort the chatter feed streams for the context user. api version 40.0 633apex reference guide chatterfeeds class requires chatter yes signature public static connectapi.chatterstreampage searchstreams(string communityid, string q, connectapi.sortorder sortparam) parameters communityid type: string id for an experience cloud site, internal, or null. q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. sortparam type: connectapi.sortorder specifies the sort order. values are: • ascending—items are in ascending alphabetical order (a-z). • descending—items are in descending alphabetical order (z-a). • mostrecentlyviewed—items are in descending chronological order by view. this sort order is valid only for chatter feed streams. if not specified, default value is ascending. return value type: connectapi.chatterstreampage usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: settestsearchstreams(communityid, q, sortparam, result) apex developer guide: testing connectapi code searchstreams(communityid, q, pageparam, pagesize) search the chatter feed streams for the context user and return a page of results. api version 40.0 634apex reference guide chatterfeeds class requires chatter yes signature public static connectapi.chatterstreampage searchstreams(string communityid, string q, integer pageparam, integer pagesize) parameters communityid type: string id for an experience cloud site, internal, or null. q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. pageparam type: integer number of the page you want returned. starts at 0. if you pass in null or 0, the first page is returned. pagesize type: integer specifies the number of items per page. valid values are from 1 to 250. the default size is 25. return value type: connectapi.chatterstreampage usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: settestsearchstreams(communityid, q, pageparam, pagesize, result) apex developer guide: testing connectapi code searchstreams(communityid, q, pageparam, pagesize, sortparam) search the chatter feed streams for the context user and return a sorted page of results. api version 40.0 635apex reference guide chatterfeeds class requires chatter yes signature public static connectapi.chatterstreampage searchstreams(string communityid, string q, integer pageparam, integer pagesize, connectapi.sortorder sortparam) parameters communityid type: string id for an experience cloud site, internal, or null. q type: string required and can’t be null. specifies the string to search. the |
search string must contain at least two characters, not including wildcards. see wildcards. pageparam type: integer number of the page you want returned. starts at 0. if you pass in null or 0, the first page is returned. pagesize type: integer specifies the number of items per page. valid values are from 1 to 250. the default size is 25. sortparam type: connectapi.sortorder specifies the sort order. values are: • ascending—items are in ascending alphabetical order (a-z). • descending—items are in descending alphabetical order (z-a). • mostrecentlyviewed—items are in descending chronological order by view. this sort order is valid only for chatter feed streams. if not specified, default value is ascending. return value type: connectapi.chatterstreampage usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. see also: settestsearchstreams(communityid, q, pageparam, pagesize, sortparam, result) apex developer guide: testing connectapi code 636apex reference guide chatterfeeds class searchstreams(communityid, q, pageparam, pagesize, sortparam, globalscope) search the chatter feed streams from all experience cloud sites for the context user and return a sorted page of results. api version 41.0 requires chatter yes signature public static connectapi.chatterstreampage searchstreams(string communityid, string q, integer pageparam, integer pagesize, connectapi.sortorder sortparam, boolean globalscope) parameters communityid type: string id for an experience cloud site, internal, or null. q type: string required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. pageparam type: integer number of the page you want returned. starts at 0. if you pass in null or 0, the first page is returned. pagesize type: integer specifies the number of items per page. valid values are from 1 to 250. the default size is 25. sortparam type: connectapi.sortorder specifies the sort order. values are: • ascending—items are in ascending alphabetical order (a-z). • descending—items are in descending alphabetical order (z-a). • mostrecentlyviewed—items are in descending chronological order by view. this sort order is valid only for chatter feed streams. if not specified, default value is ascending. globalscope type: boolean specifies whether to get streams from all the context user’s experience cloud sites, regardless of the communityid value. tip: if you know the communityid for the streams, we recommend setting globalscope to false. 637apex reference guide chatterfeeds class return value type: connectapi.chatterstreampage usage to test code that uses this method, use the matching set test method (prefix the method name with settest). use the set test method with the same parameters or the code throws an exception. setcommentisverified(communityid, commentid, isverified) mark a comment as verified or unverified. api version 41.0 requires chatter yes signature public static connectapi.verifiedcapability setcommentisverified(string communityid, string commentid, boolean isverified) parameters communityid type: string id for an experience cloud site, internal, or null. commentid type: string id of the comment on a question post. only one comment on a question post can be marked as verified. isverified type: boolean specifies whether to mark the comment as verified (true) or unverified (false). only verified comments can be marked as unverified, and only unverified comments can be marked as verified. return value type: connectapi.verifiedcapability if the comment doesn’t support this capability, the return value is connectapi.notfoundexception. setcommentisverifiedbyanonymized(communityid, commentid, isverified, isverifiedbyanonymized) mark a comment as verified by an anonymous user. 638apex reference guide chatterfeeds class api version 43.0 requires chatter yes |
signature public static connectapi.verifiedcapability setcommentisverifiedbyanonymized(string communityid, string commentid, boolean isverified, boolean isverifiedbyanonymized) parameters communityid type: string id for an experience cloud site, internal, or null. commentid type: string id of the comment on a question post. only one comment on a question post can be marked as verified. isverified type: boolean specifies whether to mark the comment as verified (true) or unverified (false). only verified comments can be marked as unverified, and only unverified comments can be marked as verified. isverifiedbyanonymized type: boolean specifies whether to mark the comment as verified by an anonymous user (true). if a user previously verified a comment and then requested the activity to be deleted, use isverifiedbyanonymized to maintain the verification and anonymize the value of lastverifiedbyuser. you can’t set isverified and isverifiedbyanonymized to true at the same time. isverifiedbyanonymized can be set to true only if isverified is already set to true. you can’t set isverifiedbyanonymized to false. after isverifiedbyanonymized is set to true, it can be undone only when another user marks the comment as unverified and then reverifies the comment. return value type: connectapi.verifiedcapability if the comment doesn’t support this capability, the return value is connectapi.notfoundexception. setcommentvote(communityid, commentid, updownvote) upvote or downvote a comment. 639apex reference guide chatterfeeds class api version 41.0 requires chatter yes signature public static connectapi.updownvotecapability setcommentvote(string communityid, string commentid, connectapi.updownvotecapabilityinput updownvote) parameters communityid type: string id for an experience cloud site, internal, or null. commentid type: string id of the comment. updownvote type: connectapi.updownvotecapabilityinput a connectapi.updownvotecapabilityinput object that includes your vote. return value type: connectapi.updownvotecapability if the comment doesn’t support this capability, the return value is connectapi.notfoundexception. setfeedcommentstatus(communityid, commentid, status) set the status of a comment. api version 38.0 requires chatter yes signature public static connectapi.statuscapability setfeedcommentstatus(string communityid, string commentid, connectapi.statuscapabilityinput status) 640apex reference guide chatterfeeds class parameters communityid type: string id for an experience cloud site, internal, or null. commentid type: string id of the comment. status type: connectapi.statuscapabilityinput a connectapi.statuscapabilityinput object that includes the status you want to set. return value type: connectapi.statuscapability if the comment doesn’t support this capability, the return value is connectapi.notfoundexception. usage only users with the can approve feed post and comment permission can set the status of a feed post or comment. setfeedelementisclosed(communityid, feedelementid, isclosed) set a feed element to closed. users can’t edit (specifically the feed item body or title), comment on, or delete a closed feed element. if the closed feed element is a poll, users can’t vote on it. users can’t edit (specifically the comment body) or delete a comment on a closed feed element or select or remove it as best answer. admins and moderators can edit and delete closed feed elements and comments on closed feed elements. admins and moderators can select or remove the best answer status on comments on closed feed elements. api version 43.0 requires chatter yes signature public static connectapi.closecapability setfeedelementisclosed(string communityid, string feedelementid, boolean isclosed) parameters communityid type: string id for an experience cloud site, internal, or null. 641apex reference guide chatterfeeds class feedelementid type: string id of the feed element. isclosed type: boolean spec |
ifies whether to set the feed element to closed (true) or not (false). return value type: connectapi.closecapability if the feed element doesn’t support this capability, the return value is connectapi.notfoundexception. setfeedelementvote(communityid, feedelementid, updownvote) upvote or downvote a feed element. api version 41.0 requires chatter yes signature public static connectapi.updownvotecapability setfeedelementvote(string communityid, string feedelementid, connectapi.updownvotecapabilityinput updownvote) parameters communityid type: string id for an experience cloud site, internal, or null. feedelementid type: string id of the feed element. updownvote type: connectapi.updownvotecapabilityinput a connectapi.updownvotecapabilityinput object that includes your vote. return value type: connectapi.updownvotecapability if the feed element doesn’t support this capability, the return value is connectapi.notfoundexception. 642apex reference guide chatterfeeds class setfeedentitystatus(communityid, feedelementid, status) set the status of a feed post. api version 37.0 requires chatter yes signature public static connectapi.statuscapability setfeedentitystatus(string communityid, string feedelementid, connectapi.statuscapabilityinput status) parameters communityid type: string id for an experience cloud site, internal, or null. feedelementid type: string id of the feed element. status type: connectapi.statuscapabilityinput a connectapi.statuscapabilityinput object that includes the status you want to set. return value type: connectapi.statuscapability if the feed element doesn’t support this capability, the return value is connectapi.notfoundexception. usage only users with the can approve feed post and comment permission can set the status of a feed post or comment. setismutedbyme(communityid, feedelementid, ismutedbyme) mute or unmute a feed element. api version 35.0 requires chatter yes 643apex reference guide chatterfeeds class signature public static connectapi.mutecapability setismutedbyme(string communityid, string feedelementid, boolean ismutedbyme) parameters communityid type: string id for an experience cloud site, internal, or null. feedelementid type: string id of the feed element. ismutedbyme type: boolean indicates whether the feed element is muted for the context user. default value is false. return value type: connectapi.mutecapability if the feed element doesn’t support this capability, the return value is connectapi.notfoundexception. setisreadbyme(communityid, feedelementid, readby) mark a feed element as read for the context user using an input class. api version 40.0 requires chatter yes signature public static connectapi.readbycapability setisreadbyme(string communityid, string feedelementid, connectapi.readbycapabilityinput readby) parameters communityid type: string id for an experience cloud site, internal, or null. feedelementid type: string id of the feed element to mark as read. 644apex reference guide chatterfeeds class readby type: connectapi.readbycapabilityinput a connectapi.readbycapabilityinput body indicating to mark the feed elements as read. return value type: connectapi.readbycapability if the feed element doesn’t support this capability, the return value is connectapi.notfoundexception. setisreadbyme(communityid, feedelementid, isreadbyme) mark a feed element as read for the context user. api version 40.0 requires chatter yes signature public static connectapi.readbycapability setisreadbyme(string communityid, string feedelementid, boolean isreadbyme) parameters communityid type: string id for an experience cloud site, internal, or null. feedelementid type: string id of the feed element to mark as read. isreadbyme type: boolean specifies to mark the feed element as read |
(true) for the context user. return value type: connectapi.readbycapability if the feed element doesn’t support this capability, the return value is connectapi.notfoundexception. updatecomment(communityid, commentid, comment) edit a comment. 645apex reference guide chatterfeeds class api version 34.0 requires chatter yes signature public static connectapi.comment updatecomment(string communityid, string commentid, connectapi.commentinput comment) parameters communityid type: string id for an experience cloud site, internal, or null. commentid type: string id of the comment to be edited. comment type: connectapi.commentinput information about the comment to be edited. return value type: connectapi.comment if the comment doesn’t support the edit capability, the return value is connectapi.notfoundexception. example string commentid; string communityid = network.getnetworkid(); // get the last feed item created by the context user. list<feeditem> feeditems = [select id from feeditem where createdbyid = :userinfo.getuserid() order by createddate desc]; if (feeditems.isempty()) { // return null within anonymous apex. return null; } string feedelementid = feeditems[0].id; connectapi.commentpage commentpage = connectapi.chatterfeeds.getcommentsforfeedelement(communityid, feedelementid); if (commentpage.items.isempty()) { // return null within anonymous apex. return null; } 646apex reference guide chatterfeeds class commentid = commentpage.items[0].id; connectapi.feedentityiseditable iseditable = connectapi.chatterfeeds.iscommenteditablebyme(communityid, commentid); if (iseditable.iseditablebyme == true){ connectapi.commentinput commentinput = new connectapi.commentinput(); connectapi.messagebodyinput messagebodyinput = new connectapi.messagebodyinput(); connectapi.textsegmentinput textsegmentinput = new connectapi.textsegmentinput(); messagebodyinput.messagesegments = new list<connectapi.messagesegmentinput>(); textsegmentinput.text = 'this is my edited comment.'; messagebodyinput.messagesegments.add(textsegmentinput); commentinput.body = messagebodyinput; connectapi.comment editedcomment = connectapi.chatterfeeds.updatecomment(communityid, commentid, commentinput); } updatedirectmessage(communityid, feedelementid, directmessage) update the members of a direct message. api version 40.0 requires chatter yes signature public static connectapi.directmessagecapability updatedirectmessage(string communityid, string feedelementid, connectapi.directmessagecapabilityinput directmessage) parameters communityid type: string id for an experience cloud site, internal, or null. feedelementid type: string id of the feed element. directmessage type: connectapi.directmessagecapabilityinput a connectapi.directmessagecapabilityinput body that includes the members to add and remove. 647apex reference guide chatterfeeds class return value type: connectapi.directmessagecapability if the feed element doesn’t support this capability, the return value is connectapi.notfoundexception. updatefeedelement(communityid, feedelementid, feedelement) edit a feed element. api version 34.0 requires chatter yes signature public static connectapi.feedelement updatefeedelement(string communityid, string feedelementid, connectapi.feedelementinput feedelement) parameters communityid type: string id for an experience cloud site, internal, or null. feedelementid type: string id of the feed element to be edited. feed items are the only type of feed element that can be edited. feedelement type: connectapi.feedelementinput information about the feed item to be edited. return value type: connectapi.feedelement if the feed element doesn’t support the edit capability, the return value is connectapi.notfoundexception. example for editing a feed post string communityid = network.getnetworkid(); // get the last feed item created by |
the context user. list<feeditem> feeditems = [select id from feeditem where createdbyid = :userinfo.getuserid() order by createddate desc]; if (feeditems.isempty()) { // return null within anonymous apex. return null; 648apex reference guide chatterfeeds class } string feedelementid = feeditems[0].id; connectapi.feedentityiseditable iseditable = connectapi.chatterfeeds.isfeedelementeditablebyme(communityid, feedelementid); if (iseditable.iseditablebyme == true){ connectapi.feediteminput feediteminput = new connectapi.feediteminput(); connectapi.messagebodyinput messagebodyinput = new connectapi.messagebodyinput(); connectapi.textsegmentinput textsegmentinput = new connectapi.textsegmentinput(); messagebodyinput.messagesegments = new list<connectapi.messagesegmentinput>(); textsegmentinput.text = 'this is my edited post.'; messagebodyinput.messagesegments.add(textsegmentinput); feediteminput.body = messagebodyinput; connectapi.feedelement editedfeedelement = connectapi.chatterfeeds.updatefeedelement(communityid, feedelementid, feediteminput); } example for editing a question title and post string communityid = network.getnetworkid(); // get the last feed item created by the context user. list<feeditem> feeditems = [select id from feeditem where createdbyid = :userinfo.getuserid() order by createddate desc]; if (feeditems.isempty()) { // return null within anonymous apex. return null; } string feedelementid = feeditems[0].id; connectapi.feedentityiseditable iseditable = connectapi.chatterfeeds.isfeedelementeditablebyme(communityid, feedelementid); if (iseditable.iseditablebyme == true){ connectapi.feediteminput feediteminput = new connectapi.feediteminput(); connectapi.feedelementcapabilitiesinput feedelementcapabilitiesinput = new connectapi.feedelementcapabilitiesinput(); connectapi.questionandanswerscapabilityinput questionandanswerscapabilityinput = new connectapi.questionandanswerscapabilityinput(); connectapi.messagebodyinput messagebodyinput = new connectapi.messagebodyinput(); connectapi.textsegmentinput textsegmentinput = new connectapi.textsegmentinput(); messagebodyinput.messagesegments = new list<connectapi.messagesegmentinput>(); textsegmentinput.text = 'this is my edited question.'; messagebodyinput.messagesegments.add(textsegmentinput); feediteminput.body = messagebodyinput; 649apex reference guide chatterfeeds class feediteminput.capabilities = feedelementcapabilitiesinput; feedelementcapabilitiesinput.questionandanswers = questionandanswerscapabilityinput; questionandanswerscapabilityinput.questiontitle = 'where is my edited question?'; connectapi.feedelement editedfeedelement = connectapi.chatterfeeds.updatefeedelement(communityid, feedelementid, feediteminput); } updatefeedelementbookmarks(communityid, feedelementid, bookmarks) bookmark a feed element or remove a bookmark from a feed element using an input class. api version 32.0 requires chatter yes signature public static connectapi.bookmarkscapability updatefeedelementbookmarks(string communityid, string feedelementid, connectapi.bookmarkscapabilityinput bookmarks) parameters communityid type: string id for an experience cloud site, internal, or null. feedelementid type: string id of the feed element. bookmarks type: connectapi.bookmarkscapabilityinput information about a bookmark. return value type: connectapi.bookmarkscapability if the feed element doesn’t support this capability, the return value is connectapi.notfoundexception. updatefeedelementbookmarks(communityid, feedelementid, isbookmarkedbycurrentuser) bookmark a feed element or remove a bookmark from a feed element. 650apex reference guide chatterfeeds class api version 32.0 requires chatter yes signature public static connecta |
pi.bookmarkscapability updatefeedelementbookmarks(string communityid, string feedelementid, boolean isbookmarkedbycurrentuser) parameters communityid type: string id for an experience cloud site, internal, or null. feedelementid type: string id of the feed element. isbookmarkedbycurrentuser type: boolean specify whether to bookmark the feed element (true) or not (false). return value type: connectapi.bookmarkscapability if the feed element doesn’t support this capability, the return value is connectapi.notfoundexception. example connectapi.bookmarkscapability bookmark = connectapi.chatterfeeds.updatefeedelementbookmarks(null, '0d5d0000000kugh', true); updatefeedelementreadbycapabilitybatch(communityid, feedelementids, readby) mark multiple feed elements as read by the context user at the same time using an input class. api version 40.0 requires chatter yes 651apex reference guide chatterfeeds class signature public static connectapi.batchresult[] updatefeedelementreadbycapabilitybatch(string communityid, list<string> feedelementids, connectapi.readbycapabilityinput readby) parameters communityid type: string id for an experience cloud site, internal, or null. feedelementids type: list<string> up to 500 feed element ids to mark as read. readby type: connectapi.readbycapabilityinput a connectapi.readbycapabilityinput body indicating to mark the feed elements as read. return value type: connectapi.batchresult[] if the feed element doesn’t support this capability, the return value is connectapi.notfoundexception. the returned objects correspond to each of the input objects and are returned in the same order as the input objects. the method call fails only if an error occurs that affects the entire operation (such as a parsing failure). if an individual object causes an error, the error is embedded within the connectapi.batchresult list. updatefeedelementreadbycapabilitybatch(communityid, feedelementids, isreadbyme) mark multiple feed elements as read by the context user at the same time. api version 40.0 requires chatter yes signature public static connectapi.batchresult[] updatefeedelementreadbycapabilitybatch(string communityid, list<string> feedelementids, boolean isreadbyme) parameters communityid type: string 652apex reference guide chatterfeeds class id for an experience cloud site, internal, or null. feedelementids type: list<string> up to 500 feed element ids to mark as read. isreadbyme type: boolean specifies to mark the feed element as read (true) for the context user. return value type: connectapi.batchresult[] if the feed element doesn’t support this capability, the return value is connectapi.notfoundexception. updatelikeforcomment(communityid, commentid, islikedbycurrentuser) like or unlike a comment. api version 39.0 requires chatter yes signature public static connectapi.chatterlikepage updatelikeforcomment(string communityid, string commentid, boolean islikedbycurrentuser) parameters communityid type: string id for an experience cloud site, internal, or null. commentid type: string id of the comment. islikedbycurrentuser type: boolean specifies if the context user likes (true) or unlikes (false) the comment. return value type: connectapi.chatterlikepage 653apex reference guide chatterfeeds class updatelikeforfeedelement(communityid, feedelementid, islikedbycurrentuser) like or unlike a feed element. api version 39.0 requires chatter yes signature public static connectapi.chatterlikepage updatelikeforfeedelement(string communityid, string feedelementid, boolean islikedbycurrentuser) parameters communityid type: string id for an experience cloud site, internal, or null. feedelementid type: string id of the feed element. islikedbycurrentuser type: boolean specifies if the context user likes (true) or unlikes (false) the feed element. return value type: |
connectapi.chatterlikepage if the feed element doesn’t support the chatterlikes capability, the return value is connectapi.notfoundexception. updatepinnedfeedelements(communityid, feedtype, subjectid, pin) pin or unpin feed elements to a group or topic feed. api version 41.0 available to guest users 41.0 requires chatter yes 654apex reference guide chatterfeeds class signature public static connectapi.pincapability updatepinnedfeedelements(string communityid, connectapi.feedtype feedtype, string subjectid, connectapi.pincapabilityinput pin) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype the type of feed. valid values are record and topics. subjectid type: string if feedtype is record, subjectid must be a group id. if feedtype is topics, subjectid must be a topic id. pin type: connectapi.pincapabilityinput a connectapi.pincapabilityinput object indicating the feed element to pin or unpin. return value type: connectapi.pincapability if the feed doesn’t support this capability, the return value is connectapi.notfoundexception. updatestream(communityid, streamid, streaminput) update a chatter feed stream. api version 39.0 requires chatter yes signature public static connectapi.chatterstream updatestream(string communityid, string streamid, connectapi.chatterstreaminput streaminput) parameters communityid type: string id for an experience cloud site, internal, or null. 655apex reference guide chatterfeeds class streamid type: string id of the chatter feed stream. streaminput type: connectapi.chatterstreaminput a connectapi.chatterstreaminput object. return value type: connectapi.chatterstream voteonfeedelementpoll(communityid, feedelementid, mychoiceid) vote on a poll or change your vote on a poll. api version 32.0 requires chatter yes signature public static connectapi.pollcapability voteonfeedelementpoll(string communityid, string feedelementid, string mychoiceid) parameters communityid type: string id for an experience cloud site, internal, or null. feedelementid type: string id of the feed element. mychoiceid type: string id of the poll item you’re voting for. the key prefix for poll items is 09a. return value type: connectapi.pollcapability if the feed element doesn’t support this capability, the return value is connectapi.notfoundexception. 656apex reference guide chatterfeeds class example connectapi.pollcapability poll = connectapi.chatterfeeds.voteonfeedelementpoll(null, '0d5d0000000xzaukaw', '09ad000000000tkmay'); chatterfeeds test methods the following are the test methods for chatterfeeds. all methods are static. for information about using these methods to test your connectapi code, see testing connectapi code. in this section: settestgetfeedelementsfromfeed(communityid, feedtype, result) register a connectapi.feedelementpage object to be returned when getfeedelementsfromfeed is called with matching parameters in a test context. use the get feed method with the same parameters or the code throws an exception. settestgetfeedelementsfromfeed(communityid, feedtype, pageparam, pagesize, sortparam, result) register a connectapi.feedelementpage object to be returned when getfeedelementsfromfeed is called with matching parameters in a test context. use the get feed method with the same parameters or the code throws an exception. settestgetfeedelementsfromfeed(communityid, feedtype, recentcommentcount, density, pageparam, pagesize, sortparam, result) register a connectapi.feedelementpage object to be returned when getfeedelementsfromfeed is called with matching parameters in a test context. use the get feed method with the same parameters or the code throws an exception. settestgetfeedelementsfromfeed(communityid, feedtype, recentcommentcount, density, pageparam, pagesize, sortparam, filter, result) |
register a connectapi.feedelementpage object to be returned when getfeedelementsfromfeed is called with matching parameters in a test context. use the get feed method with the same parameters or the code throws an exception. settestgetfeedelementsfromfeed(communityid, feedtype, recentcommentcount, density, pageparam, pagesize, sortparam, filter, threadedcommentscollapsed, result) register a connectapi.feedelementpage object to be returned when the matching connectapi.getfeedelementsfromfeed method is called in a test context. use the method with the same parameters or you receive an exception. settestgetfeedelementsfromfeed(communityid, feedtype, subjectid, result) register a connectapi.feedelementpage object to be returned when getfeedelementsfromfeed is called with matching parameters in a test context. use the get feed method with the same parameters or the code throws an exception. settestgetfeedelementsfromfeed(communityid, feedtype, subjectid, pageparam, pagesize, sortparam, result) register a connectapi.feedelementpage object to be returned when getfeedelementsfromfeed is called with matching parameters in a test context. use the get feed method with the same parameters or the code throws an exception. settestgetfeedelementsfromfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam, result) register a connectapi.feedelementpage object to be returned when getfeedelementsfromfeed is called with matching parameters in a test context. use the get feed method with the same parameters or the code throws an exception. settestgetfeedelementsfromfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam, showinternalonly, result) register a connectapi.feedelementpage object to be returned when getfeedelementsfromfeed is called with matching parameters in a test context. use the get feed method with the same parameters or the code throws an exception. 657apex reference guide chatterfeeds class settestgetfeedelementsfromfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam, filter, result) register a connectapi.feedelementpage object to be returned when getfeedelementsfromfeed is called with matching parameters in a test context. use the method with the same parameters or the code throws an exception. settestgetfeedelementsfromfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam, filter, threadedcommentscollapsed, result) register a connectapi.feedelementpage object to be returned when the matching connectapi.getfeedelementsfromfeed method is called in a test context. use the method with the same parameters or you receive an exception. settestgetfeedelementsfromfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam, customfilter, result) register a connectapi.feedelementpage object to be returned when getfeedelementsfromfeed is called with matching parameters in a test context. use the get feed method with the same parameters or the code throws an exception. settestgetfeedelementsfromfeed(communityid, feedtype, subjectid, recentcommentcount, elementsperbundle, density, pageparam, pagesize, sortparam, showinternalonly, result) register a connectapi.feedelementpage object to be returned when getfeedelementsfromfeed is called with matching parameters in a test context. use the get feed method with the same parameters or the code throws an exception. settestgetfeedelementsfromfeed(communityid, feedtype, subjectid, recentcommentcount, elementsperbundle, density, pageparam, pagesize, sortparam, showinternalonly, filter, result) register a connectapi.feedelementpage object to be returned when getfeedelementsfromfeed is called with matching parameters in a test context. use the get feed method with the same parameters or the code throws an exception. settestgetfeedelementsfromfeed(communityid, feedtype, subjectid, recentcommentcount, elementsperbundle, density, pageparam, pagesize, sortparam, showinternalonly, filter, threadedcommentscollapsed, result) register a connectapi.feedelementpage object to be returned when getfeedelementsfromfeed is called with matching parameters in a test context. use |
the get feed method with the same parameters or the code throws an exception. settestgetfeedelementsfromfeed(communityid, feedtype, subjectid, recentcommentcount, elementsperbundle, density, pageparam, pagesize, sortparam, showinternalonly, customfilter, result) register a connectapi.feedelementpage object to be returned when getfeedelementsfromfeed is called with matching parameters in a test context. use the get feed method with the same parameters or the code throws an exception. settestgetfeedelementsfromfeed(communityid, feedtype, subjectid, recentcommentcount, elementsperbundle, density, pageparam, pagesize, sortparam, showinternalonly, customfilter, threadedcommentscollapsed, result) register a connectapi.feedelementpage object to be returned when the matching connectapi.getfeedelementsfromfeed method is called in a test context. use the method with the same parameters or you receive an exception. settestgetfeedelementsfromfilterfeed(communityid, subjectid, keyprefix, result) register a connectapi.feedelementpage object to be returned when the matching getfeedelements fromfilterfeed method is called in a test context. use the method with the same parameters or the code throws an exception. settestgetfeedelementsfromfilterfeed(communityid, subjectid, keyprefix, pageparam, pagesize, sortparam, result) register a connectapi.feedelementpage object to be returned when the matching getfeedelements fromfilterfeed method is called in a test context. use the method with the same parameters or the code throws an exception. settestgetfeedelementsfromfilterfeed(communityid, subjectid, keyprefix, recentcommentcount, elementsperbundle, density, pageparam, pagesize, sortparam, result) register a connectapi.feedelementpage object to be returned when the matching getfeedelements fromfilterfeed method is called in a test context. use the method with the same parameters or the code throws an exception. 658apex reference guide chatterfeeds class settestgetfeedelementsfromfilterfeedupdatedsince(communityid, subjectid, keyprefix, recentcommentcount, elementsperbundle, density, pageparam, pagesize, updatedsince, result) register a connectapi.feedelementpage object to be returned when the getfeedelementsfromfilterfeedupdatedsince method is called in a test context. settestgetfeedelementsupdatedsince(communityid, feedtype, recentcommentcount, density, pageparam, pagesize, updatedsince, result) register a connectapi.feedelementpage object to be returned when getfeedelementsupdatedsince is called with matching parameters in a test context. use the method with the same parameters or the code throws an exception. settestgetfeedelementsupdatedsince(communityid, feedtype, recentcommentcount, density, pageparam, pagesize, updatedsince, filter, result) register a connectapi.feedelementpage object to be returned when getfeedelementsupdatedsince is called with matching parameters in a test context. use the method with the same parameters or the code throws an exception. settestgetfeedelementsupdatedsince(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, updatedsince, result) register a connectapi.feedelementpage object to be returned when getfeedelementsupdatedsince is called with matching parameters in a test context. use the method with the same parameters or the code throws an exception. settestgetfeedelementsupdatedsince(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, updatedsince, showinternalonly, result) register a connectapi.feedelementpage object to be returned when getfeedelementsupdatedsince is called with matching parameters in a test context. use the method with the same parameters or the code throws an exception. settestgetfeedelementsupdatedsince(communityid, feedtype, subjectid, recentcommentcount, elementsperbundle, density, pageparam, pagesize, updatedsince, filter, result) register a connectapi.feedelementpage object to be returned when getfeedelementsupdatedsince is called with matching parameters in a test context. use the method with the same parameters or the code throws an exception. settestgetfeedelementsupdatedsince(communityid, feedtype, subjectid, recentcommentcount, elementsperbundle, density, pageparam, pagesize, updatedsince, customfilter, result) register a connectapi.feedelement |
page object to be returned when getfeedelementsupdatedsince is called with matching parameters in a test context. use the method with the same parameters or the code throws an exception. settestgetfeedelementsupdatedsince(communityid, feedtype, subjectid, recentcommentcount, elementsperbundle, density, pageparam, pagesize, updatedsince, showinternalonly, result) register a connectapi.feedelementpage object to be returned when getfeedelementsupdatedsince is called with matching parameters in a test context. use the method with the same parameters or the code throws an exception. settestgetfeedelementsupdatedsince(communityid, feedtype, subjectid, recentcommentcount, elementsperbundle, density, pageparam, pagesize, updatedsince, showinternalonly, filter, result) register a connectapi.feedelementpage object to be returned when getfeedelementsupdatedsince is called with matching parameters in a test context. use the method with the same parameters or the code throws an exception. settestgetfeedelementsupdatedsince(communityid, feedtype, subjectid, recentcommentcount, elementsperbundle, density, pageparam, pagesize, updatedsince, showinternalonly, customfilter, result) register a connectapi.feedelementpage object to be returned when getfeedelementsupdatedsince is called with matching parameters in a test context. use the method with the same parameters or the code throws an exception. settestgetrelatedposts(communityid, feedelementid, filter, maxresults, result) register a connectapi.relatedfeedposts object to be returned when the matching connectapi.getrelatedposts(communityid, feedelementid, filter, maxresults) method is called in a test context. use the method with the same parameters or you receive an exception. 659apex reference guide chatterfeeds class settestgettopunansweredquestions(communityid, result) (pilot) register a connectapi.feedelementpage object to be returned when the matching connectapi.gettopunansweredquestions method is called in a test context. use the method with the same parameters or you receive an exception. settestgettopunansweredquestions(communityid, filter, result) (pilot) register a connectapi.feedelementpage object to be returned when the matching connectapi.gettopunansweredquestions method is called in a test context. use the method with the same parameters or you receive an exception. settestgettopunansweredquestions(communityid, pagesize, result) (pilot) register a connectapi.feedelementpage object to be returned when the matching connectapi.gettopunansweredquestions method is called in a test context. use the method with the same parameters or you receive an exception. settestgettopunansweredquestions(communityid, filter, pagesize, result) (pilot) register a connectapi.feedelementpage object to be returned when the matching connectapi.gettopunansweredquestions method is called in a test context. use the method with the same parameters or you receive an exception. settestsearchfeedelements(communityid, q, result) register a connectapi.feedelementpage object to be returned when the matching connectapi.searchfeedelements method is called in a test context. use the method with the same parameters or you receive an exception. settestsearchfeedelements(communityid, q, sortparam, result) register a connectapi.feedelementpage object to be returned when the matching connectapi.searchfeedelements method is called in a test context. use the method with the same parameters or you receive an exception. settestsearchfeedelements(communityid, q, threadedcommentscollapsed, result) register a connectapi.feedelementpage object to be returned when the matching connectapi.searchfeedelements method is called in a test context. use the method with the same parameters or you receive an exception. settestsearchfeedelements(communityid, q, pageparam, pagesize, result) register a connectapi.feedelementpage object to be returned when the matching connectapi.searchfeedelements method is called in a test context. use the method with the same parameters or you receive an exception. settestsearchfeedelements(communityid, q, pageparam, pagesize, sortparam, result) register a connectapi.feedelementpage object to be returned when the matching connectapi.searchfeedelements method is called in a test context. use the method with the same parameters or |
you receive an exception. settestsearchfeedelements(communityid, q, pageparam, pagesize, threadedcommentscollapsed, result) register a connectapi.feedelementpage object to be returned when the matching connectapi.searchfeedelements method is called in a test context. use the method with the same parameters or you receive an exception. settestsearchfeedelements(communityid, q, recentcommentcount, pageparam, pagesize, sortparam, result) register a connectapi.feedelementpage object to be returned when the matching connectapi.searchfeedelements method is called in a test context. use the method with the same parameters or you receive an exception. 660apex reference guide chatterfeeds class settestsearchfeedelementsinfeed(communityid, feedtype, q, result) register a connectapi.feedelementpage object to be returned when the matching connectapi.searchfeedelementsinfeed method is called in a test context. use the method with the same parameters or you receive an exception. settestsearchfeedelementsinfeed(communityid, feedtype, pageparam, pagesize, sortparam, q, result) register a connectapi.feedelementpage object to be returned when the matching connectapi.searchfeedelementsinfeed method is called in a test context. use the method with the same parameters or you receive an exception. settestsearchfeedelementsinfeed(communityid, feedtype, recentcommentcount, density, pageparam, pagesize, sortparam, q, result) register a connectapi.feedelementpage object to be returned when the matching connectapi.searchfeedelementsinfeed method is called in a test context. use the method with the same parameters or you receive an exception. settestsearchfeedelementsinfeed(communityid, feedtype, recentcommentcount, density, pageparam, pagesize, sortparam, q, filter, result) register a connectapi.feedelementpage object to be returned when the matching connectapi.searchfeedelementsinfeed method is called in a test context. use the method with the same parameters or you receive an exception. settestsearchfeedelementsinfeed(communityid, feedtype, subjectid, q, result) register a connectapi.feedelementpage object to be returned when the matching connectapi.searchfeedelementsinfeed method is called in a test context. use the method with the same parameters or you receive an exception. settestsearchfeedelementsinfeed(communityid, feedtype, subjectid, pageparam, pagesize, sortparam, q, result) register a connectapi.feedelementpage object to be returned when the matching connectapi.searchfeedelementsinfeed method is called in a test context. use the method with the same parameters or you receive an exception. settestsearchfeedelementsinfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam, q, result) register a connectapi.feedelementpage object to be returned when the matching connectapi.searchfeedelementsinfeed method is called in a test context. use the method with the same parameters or you receive an exception. settestsearchfeedelementsinfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam, q, filter, result) register a connectapi.feedelementpage object to be returned when searchfeedelementsinfeed is called with matching parameters in a test context. use the method with the same parameters or the code throws an exception. settestsearchfeedelementsinfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam, q, customfilter, result) register a connectapi.feedelementpage object to be returned when the matching connectapi.searchfeedelementsinfeed method is called in a test context. use the method with the same parameters or you receive an exception. settestsearchfeedelementsinfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam, q, showinternalonly, result) register a connectapi.feedelementpage object to be returned when the matching connectapi.searchfeedelementsinfeed method is called in a test context. use the method with the same parameters or you receive an exception. 661apex reference guide chatterfeeds class settestsearch |
feedelementsinfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam, q, showinternalonly, filter, result) register a connectapi.feedelementpage object to be returned when the matching connectapi.searchfeedelementsinfeed method is called in a test context. use the method with the same parameters or you receive an exception. settestsearchfeedelementsinfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam, q, showinternalonly, customfilter, result) register a connectapi.feedelementpage object to be returned when the matching connectapi.searchfeedelementsinfeed method is called in a test context. use the method with the same parameters or you receive an exception. settestsearchfeedelementsinfilterfeed(communityid, subjectid, keyprefix, q, result) register a connectapi.feedelementpage object to be returned when the matching connectapi.searchfeedelementsinfilterfeed method is called in a test context. use the method with the same parameters or you receive an exception. settestsearchfeedelementsinfilterfeed(communityid, subjectid, keyprefix, pageparam, pagesize, sortparam, q, result) register a connectapi.feedelementpage object to be returned when the matching connectapi.searchfeedelementsinfilterfeed method is called in a test context. use the method with the same parameters or you receive an exception. settestsearchfeedelementsinfilterfeed(communityid, subjectid, keyprefix, recentcommentcount, density, pageparam, pagesize, sortparam, q, result) register a connectapi.feedelementpage object to be returned when the matching connectapi.searchfeedelementsinfilterfeed method is called in a test context. use the method with the same parameters or you receive an exception. settestsearchstreams(communityid, q, result) register a connectapi.chatterstreampage object to be returned when the matching connectapi.searchstream(communityid, q) method is called in a test context. use the method with the same parameters or you receive an exception. settestsearchstreams(communityid, q, sortparam, result) register a connectapi.chatterstreampage object to be returned when the matching connectapi.searchstream(communityid, q, sortparam) method is called in a test context. use the method with the same parameters or you receive an exception. settestsearchstreams(communityid, q, pageparam, pagesize, result) register a connectapi.chatterstreampage object to be returned when the matching connectapi.searchstreams(communityid, q, pageparam, pagesize) method is called in a test context. use the method with the same parameters or you receive an exception. settestsearchstreams(communityid, q, pageparam, pagesize, sortparam, result) register a connectapi.chatterstreampage object to be returned when the matching connectapi.searchstreams(communityid, q, pageparam, pagesize, sortparam) method is called in a test context. use the method with the same parameters or you receive an exception. settestsearchstreams(communityid, q, pageparam, pagesize, sortparam, globalscope, result) register a connectapi.chatterstreampage object to be returned when the matching connectapi.searchstreams(communityid, q, pageparam, pagesize, sortparam, globalscope) method is called in a test context. use the method with the same parameters or you receive an exception. 662apex reference guide chatterfeeds class settestgetfeedelementsfromfeed(communityid, feedtype, result) register a connectapi.feedelementpage object to be returned when getfeedelementsfromfeed is called with matching parameters in a test context. use the get feed method with the same parameters or the code throws an exception. api version 31.0 signature public static void settestgetfeedelementsfromfeed(string communityid, connectapi.feedtype feedtype, connectapi.feedelementpage result) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype type of feed. valid values are company, directmessagemoderation, directmessages, home, moderation |
, and pendingreview. result type: connectapi.feedelementpage object containing test data. return value type: void see also: getfeedelementsfromfeed(communityid, feedtype) apex developer guide: testing connectapi code settestgetfeedelementsfromfeed(communityid, feedtype, pageparam, pagesize, sortparam, result) register a connectapi.feedelementpage object to be returned when getfeedelementsfromfeed is called with matching parameters in a test context. use the get feed method with the same parameters or the code throws an exception. api version 31.0 663apex reference guide chatterfeeds class signature public static void settestgetfeedelementsfromfeed(string communityid, connectapi.feedtype feedtype, string pageparam, integer pagesize, connectapi.feedsortorder sortparam, connectapi.feedelementpage result) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype the only valid value for this parameter is company. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. if you pass in null, the default value createddatedesc is used. result type: connectapi.feedelementpage object containing test data. return value type: void see also: getfeedelementsfromfeed(communityid, feedtype, pageparam, pagesize, sortparam) apex developer guide: testing connectapi code 664apex reference guide chatterfeeds class settestgetfeedelementsfromfeed(communityid, feedtype, recentcommentcount, density, pageparam, pagesize, sortparam, result) register a connectapi.feedelementpage object to be returned when getfeedelementsfromfeed is called with matching parameters in a test context. use the get feed method with the same parameters or the code throws an exception. api version 31.0 signature public static void settestgetfeedelementsfromfeed(string communityid, connectapi.feedtype feedtype, integer recentcommentcount, connectapi.feeddensity density, string pageparam, integer pagesize, connectapi.feedsortorder sortparam, connectapi.feedelementpage result) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype type of feed. valid values are company, directmessagemoderation, directmessages, home, moderation, and pendingreview. recentcommentcount type: integer maximum number of comments to return with each feed element. the default value is 3. density type: connectapi.feeddensity specify the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in null |
, the default size is 25. sortparam type: connectapi.feedsortorder values are: 665apex reference guide chatterfeeds class • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. if you pass in null, the default value createddatedesc is used. result type: connectapi.feedelementpage object containing test data. return value type: void see also: getfeedelementsfromfeed(communityid, feedtype, recentcommentcount, density, pageparam, pagesize, sortparam) apex developer guide: testing connectapi code settestgetfeedelementsfromfeed(communityid, feedtype, recentcommentcount, density, pageparam, pagesize, sortparam, filter, result) register a connectapi.feedelementpage object to be returned when getfeedelementsfromfeed is called with matching parameters in a test context. use the get feed method with the same parameters or the code throws an exception. api version 32.0 signature public static void settestgetfeedelementsfromfeed(string communityid, connectapi.feedtype feedtype, integer recentcommentcount, connectapi.feeddensity density, string pageparam, integer pagesize, connectapi.feedsortorder sortparam, connectapi.feedfilter filter, connectapi.feedelementpage result) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype the type of feed. the only valid value is home. 666apex reference guide chatterfeeds class recentcommentcount type: integer maximum number of comments to return with each feed element. the default value is 3. density type: connectapi.feeddensity specify the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. if you pass in null, the default value createddatedesc is used. filter type: connectapi.feedfilter specifies the feed filters. • allquestions—feed elements that are questions. • authoredby—feed elements authored by the user profile owner. this value is valid only for the userprofile feed. • communityscoped—feed elements that are scoped to experience cloud sites. currently, these feed elements have a user or a group parent record. however, other parent record types could be scoped to sites in the future. feed elements that are always visible in all sites are filtered out. this value is valid only for the userprofile feed. • questionswithcandidateanswers—feed elements that are questions that have candidate answers associated with them.this value is valid only for users with the access |
einstein-generated answers permission. • questionswithcandidateanswersreviewedpublished—feed elements that are questions that have candidate answers that have been reviewed or published. this value is valid only for users with the access einstein-generated answers permission. 667apex reference guide chatterfeeds class • read—feed elements that are older than 30 days or are marked as read for the context user. includes existing feed elements when the context user joined the group. this value is valid only for the record feed of a group. • solvedquestions—feed elements that are questions and that have a best answer. • unansweredquestions—feed elements that are questions and that don’t have any answers. • unansweredquestionswithcandidateanswers—feed elements that are questions that don’t have answers but have candidate answers associated with them. this value is valid only for users with the access einstein-generated answers permission. • unread—feed elements that are created in the past 30 days and aren’t marked as read for the context user. this value is valid only for the record feed of a group. • unsolvedquestions—feed elements that are questions and that don’t have a best answer. result type: connectapi.feedelementpage object containing test data. return value type: void see also: getfeedelementsfromfeed(communityid, feedtype, recentcommentcount, density, pageparam, pagesize, sortparam, filter) apex developer guide: testing connectapi code settestgetfeedelementsfromfeed(communityid, feedtype, recentcommentcount, density, pageparam, pagesize, sortparam, filter, threadedcommentscollapsed, result) register a connectapi.feedelementpage object to be returned when the matching connectapi.getfeedelementsfromfeed method is called in a test context. use the method with the same parameters or you receive an exception. api version 44.0 signature public static void settestgetfeedelementsfromfeed(string communityid, connectapi.feedtype feedtype, integer recentcommentcount, connectapi.feeddensity density, string pageparam, integer pagesize, connectapi.feedsortorder sortparam, connectapi.feedfilter filter, boolean threadedcommentscollapsed, connectapi.feedelementpage result) parameters communityid type: string id for an experience cloud site, internal, or null. 668apex reference guide chatterfeeds class feedtype type: connectapi.feedtype the type of feed. the only valid value is home. recentcommentcount type: integer maximum number of comments to return with each feed item. the default value is 3. density type: connectapi.feeddensity specify the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. if you pass in null, the default value createddatedesc is used. filter type: connectapi.feedfilter specifies the feed filters. • allquestions—feed elements that are questions. • authoredby—feed elements authored by the user profile owner. this value is valid only for the userprofile feed. • community |
scoped—feed elements that are scoped to experience cloud sites. currently, these feed elements have a user or a group parent record. however, other parent record types could be scoped to sites in the future. feed elements that are always visible in all sites are filtered out. this value is valid only for the userprofile feed. • questionswithcandidateanswers—feed elements that are questions that have candidate answers associated with them.this value is valid only for users with the access einstein-generated answers permission. 669apex reference guide chatterfeeds class • questionswithcandidateanswersreviewedpublished—feed elements that are questions that have candidate answers that have been reviewed or published. this value is valid only for users with the access einstein-generated answers permission. • read—feed elements that are older than 30 days or are marked as read for the context user. includes existing feed elements when the context user joined the group. this value is valid only for the record feed of a group. • solvedquestions—feed elements that are questions and that have a best answer. • unansweredquestions—feed elements that are questions and that don’t have any answers. • unansweredquestionswithcandidateanswers—feed elements that are questions that don’t have answers but have candidate answers associated with them. this value is valid only for users with the access einstein-generated answers permission. • unread—feed elements that are created in the past 30 days and aren’t marked as read for the context user. this value is valid only for the record feed of a group. • unsolvedquestions—feed elements that are questions and that don’t have a best answer. threadedcommentscollapsed type: boolean specifies whether to return threaded comments in a collapsed style (true) or not (false). if you pass in null, the default is false. result type: connectapi.feedelementpage object containing test data. return value type: void see also: apex developer guide: testing connectapi code getfeedelementsfromfeed(communityid, feedtype, recentcommentcount, density, pageparam, pagesize, sortparam, filter, threadedcommentscollapsed) settestgetfeedelementsfromfeed(communityid, feedtype, subjectid, result) register a connectapi.feedelementpage object to be returned when getfeedelementsfromfeed is called with matching parameters in a test context. use the get feed method with the same parameters or the code throws an exception. api version 31.0 signature public static void settestgetfeedelementsfromfeed(string communityid, connectapi.feedtype feedtype, string subjectid, connectapi.feedelementpage result) 670apex reference guide chatterfeeds class parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype the feed type. subjectid type: string id of the context user or the alias me. result type: connectapi.feedelementpage object containing test data. return value type: void see also: getfeedelementsfromfeed(communityid, feedtype, subjectid) apex developer guide: testing connectapi code settestgetfeedelementsfromfeed(communityid, feedtype, subjectid, pageparam, pagesize, sortparam, result) register a connectapi.feedelementpage object to be returned when getfeedelementsfromfeed is called with matching parameters in a test context. use the get feed method with the same parameters or the code throws an exception. api version 31.0 signature public static void settestgetfeedelementsfromfeed(string communityid, connectapi.feedtype feedtype, string subjectid, string pageparam, integer pagesize, connectapi.feedsortorder sortparam, connectapi.feedelementpage result) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype 671apex reference guide chatterfeeds class type of feed. valid values include every connectapi.feedtype except company, directmessagemoderation, directmessages, filter, home, landing, moderation, and pendingreview. subjectid type: string if feedtype is record, subjectid can be any record id, including a group id. if feedtype is streams, subjectid must be a stream id. if feedtype is topics, |
subjectid must be a topic id. if feedtype is userprofile, subjectid can be any user id. if the feedtype is any other value, subjectid must be the id of the context user or the alias me. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. if you pass in null, the default value createddatedesc is used. result type: connectapi.feedelementpage object containing test data. return value type: void see also: getfeedelementsfromfeed(communityid, feedtype, subjectid, pageparam, pagesize, sortparam) apex developer guide: testing connectapi code settestgetfeedelementsfromfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam, result) register a connectapi.feedelementpage object to be returned when getfeedelementsfromfeed is called with matching parameters in a test context. use the get feed method with the same parameters or the code throws an exception. 672apex reference guide chatterfeeds class api version 31.0 signature public static void settestgetfeedelementsfromfeed(string communityid, connectapi.feedtype feedtype, string subjectid, integer recentcommentcount, connectapi.feeddensity density, string pageparam, integer pagesize, connectapi.feedsortorder sortparam, connectapi.feedelementpage result) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype type of feed. valid values include every connectapi.feedtype except company, directmessagemoderation, directmessages, filter, home, landing, moderation, and pendingreview. subjectid type: string if feedtype is record, subjectid can be any record id, including a group id. if feedtype is streams, subjectid must be a stream id. if feedtype is topics, subjectid must be a topic id. if feedtype is userprofile, subjectid can be any user id. if the feedtype is any other value, subjectid must be the id of the context user or the alias me. recentcommentcount type: integer maximum number of comments to return with each feed element. the default value is 3. density type: connectapi.feeddensity specify the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.feedsortorder 673apex reference guide chatterfeeds class values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmod |
ifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. if you pass in null, the default value createddatedesc is used. result type: connectapi.feedelementpage object containing test data. return value type: void see also: getfeedelementsfromfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam) apex developer guide: testing connectapi code settestgetfeedelementsfromfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam, showinternalonly, result) register a connectapi.feedelementpage object to be returned when getfeedelementsfromfeed is called with matching parameters in a test context. use the get feed method with the same parameters or the code throws an exception. api version 31.0 signature public static void settestgetfeedelementsfromfeed(string communityid, connectapi.feedtype feedtype, string subjectid, integer recentcommentcount, connectapi.feeddensity density, string pageparam, integer pagesize, connectapi.feedsortorder sortparam, boolean showinternalonly, connectapi.feedelementpage result) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype 674apex reference guide chatterfeeds class value must be connectapi.feedtype.record. subjectid type: string any record id, including a group id. recentcommentcount type: integer maximum number of comments to return with each feed item. the default value is 3. density type: connectapi.feeddensity specify the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. if you pass in null, the default value createddatedesc is used. showinternalonly type: boolean specifies whether to show only feed items from internal (non-experience cloud site) users (true), or not (false). the default value is false. result type: connectapi.feedelementpage object containing test data. 675apex reference guide chatterfeeds class return value type: void see also: getfeedelementsfromfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam, showinternalonly) apex developer guide: testing connectapi code settestgetfeedelementsfromfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam, filter, result) register a connectapi.feedelementpage object to be returned when getfeedelementsfromfeed is called with matching parameters in a test context. use the method with the same parameters or the code throws an exception. api version 35.0 signature |
public static void settestgetfeedelementsfromfeed(string communityid, connectapi.feedtype feedtype, string subjectid, integer recentcommentcount, connectapi.feeddensity density, string pageparam, integer pagesize, connectapi.feedsortorder sortparam, connectapi.feedfilter filter, connectapi.feedelementpage result) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype value must be connectapi.feedtype.userprofile. subjectid type: string id of any user. to specify the context user, use the user id or the alias me. recentcommentcount type: integer maximum number of comments to return with each feed element. the default value is 3. density type: connectapi.feeddensity specify the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. 676apex reference guide chatterfeeds class • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. if you pass in null, the default value createddatedesc is used. filter type: connectapi.feedfilter value must be connectapi.feedfilter.communityscoped. filters the feed to include only feed elements that are scoped to experience cloud sites. feed elements that are always visible in all sites are filtered out. currently, feed elements scoped to sites have a user or a group parent record. however, other parent record types could be scoped to sites in the future. result type: connectapi.feedelementpage object containing test data. return value type: void see also: getfeedelementsfromfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam, filter) apex developer guide: testing connectapi code 677apex reference guide chatterfeeds class settestgetfeedelementsfromfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam, filter, threadedcommentscollapsed, result) register a connectapi.feedelementpage object to be returned when the matching connectapi.getfeedelementsfromfeed method is called in a test context. use the method with the same parameters or you receive an exception. api version 44.0 signature public static void settestgetfeedelementsfromfeed(string communityid, connectapi.feedtype feedtype, string subjectid, integer recentcommentcount, connectapi.feeddensity density, string pageparam, integer pagesize, connectapi.feedsortorder sortparam, connectapi.feedfilter filter, boolean threadedcommentscollapsed, connectapi.feedelementpage result) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype value must be connectapi.feedtype.userprofile. subjectid type: string id of any user. to specify the context user, use the user id or the alias me. recentcommentcount type: integer maximum number of comments to return with each feed element. the default value is 3. |
density type: connectapi.feeddensity specify the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. 678apex reference guide chatterfeeds class pagesize type: integer specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. if you pass in null, the default value createddatedesc is used. filter type: connectapi.feedfilter value must be connectapi.feedfilter.communityscoped. filters the feed to include only feed elements that are scoped to experience cloud sites. feed elements that are always visible in all sites are filtered out. currently, feed elements scoped to sites have a user or a group parent record. however, other parent record types could be scoped to sites in the future. threadedcommentscollapsed type: boolean specifies whether to return threaded comments in a collapsed style (true) or not (false). if you pass in null, the default is false. result type: connectapi.feedelementpage object containing test data. return value type: void see also: apex developer guide: testing connectapi code getfeedelementsfromfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam, filter, threadedcommentscollapsed) settestgetfeedelementsfromfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam, customfilter, result) register a connectapi.feedelementpage object to be returned when getfeedelementsfromfeed is called with matching parameters in a test context. use the get feed method with the same parameters or the code throws an exception. 679apex reference guide chatterfeeds class api version 40.0 signature public static void settestgetfeedelementsfromfeed(string communityid, connectapi.feedtype feedtype, string subjectid, integer recentcommentcount, connectapi.feeddensity density, string pageparam, integer pagesize, connectapi.feedsortorder sortparam, string customfilter, connectapi.feedelementpage result) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype value must be connectapi.feedtype.record. subjectid type: string the id of a case. recentcommentcount type: integer maximum number of comments to return with each feed element. the default value is 3. density type: connectapi.feeddensity specify the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of feed elements per page. |
valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. 680apex reference guide chatterfeeds class • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. if you pass in null, the default value createddatedesc is used. customfilter type: string custom filter that applies only to the case feed. see customfeedfilter in the metadata api developer guide for supported values. result type: connectapi.feedelementpage object containing test data. return value type: void see also: getfeedelementsfromfeed(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, sortparam, customfilter) apex developer guide: testing connectapi code settestgetfeedelementsfromfeed(communityid, feedtype, subjectid, recentcommentcount, elementsperbundle, density, pageparam, pagesize, sortparam, showinternalonly, result) register a connectapi.feedelementpage object to be returned when getfeedelementsfromfeed is called with matching parameters in a test context. use the get feed method with the same parameters or the code throws an exception. api version 31.0 signature public static void settestgetfeedelementsfromfeed(string communityid, connectapi.feedtype feedtype, string subjectid, integer recentcommentcount, integer elementsperbundle, connectapi.feeddensity density, string pageparam, integer pagesize, connectapi.feedsortorder sortparam, boolean showinternalonly, connectapi.feedelementpage result) parameters communityid type: string id for an experience cloud site, internal, or null. 681apex reference guide chatterfeeds class feedtype type: connectapi.feedtype value must be connectapi.feedtype.record. subjectid type: string any record id, including a group id. recentcommentcount type: integer maximum number of comments to return with each feed item. the default value is 3. elementsperbundle type: integer maximum number of feed elements per bundle. the default and maximum value is 10. density type: connectapi.feeddensity specify the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. if you pass in null, the default value createddatedesc is used. showinternalonly type: boolean specifies whether to show only feed items from internal (non-experience cloud site) users (true), or not (false). the default value is false. 682 |
apex reference guide chatterfeeds class result type: connectapi.feedelementpage object containing test data. return value type: void see also: getfeedelementsfromfeed(communityid, feedtype, subjectid, recentcommentcount, elementsperbundle, density, pageparam, pagesize, sortparam, showinternalonly) apex developer guide: testing connectapi code settestgetfeedelementsfromfeed(communityid, feedtype, subjectid, recentcommentcount, elementsperbundle, density, pageparam, pagesize, sortparam, showinternalonly, filter, result) register a connectapi.feedelementpage object to be returned when getfeedelementsfromfeed is called with matching parameters in a test context. use the get feed method with the same parameters or the code throws an exception. api version 32.0 signature public static void settestgetfeedelementsfromfeed(string communityid, connectapi.feedtype feedtype, string subjectid, integer recentcommentcount, integer elementsperbundle, connectapi.feeddensity density, string pageparam, integer pagesize, connectapi.feedsortorder sortparam, boolean showinternalonly, connectapi.feedfilter filter, connectapi.feedelementpage result) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype value must be connectapi.feedtype.record. subjectid type: string any record id, including a group id. recentcommentcount type: integer maximum number of comments to return with each feed item. the default value is 3. 683apex reference guide chatterfeeds class elementsperbundle type: integer maximum number of feed elements per bundle. the default and maximum value is 10. density type: connectapi.feeddensity specify the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. if you pass in null, the default value createddatedesc is used. showinternalonly type: boolean specifies whether to show only feed items from internal (non-experience cloud site) users (true), or not (false). the default value is false. filter type: connectapi.feedfilter specifies the feed filters. • allquestions—feed elements that are questions. • authoredby—feed elements authored by the user profile owner. this value is valid only for the userprofile feed. • communityscoped—feed elements that are scoped to experience cloud sites. currently, these feed elements have a user or a group parent record. however, other parent record types could be scoped to sites in the future. feed elements that are always visible in all sites are filtered out. this value is valid only for the userprofile feed. 684apex reference guide chatterfeeds class • questionswithcandidateanswers—feed elements that are questions that have candidate answers associated with them.this value is valid only for users with the access einstein-generated answers permission. • questionswithcandidateanswersreviewedpublished—feed elements that are questions that have candidate answers that have been reviewed or |
published. this value is valid only for users with the access einstein-generated answers permission. • read—feed elements that are older than 30 days or are marked as read for the context user. includes existing feed elements when the context user joined the group. this value is valid only for the record feed of a group. • solvedquestions—feed elements that are questions and that have a best answer. • unansweredquestions—feed elements that are questions and that don’t have any answers. • unansweredquestionswithcandidateanswers—feed elements that are questions that don’t have answers but have candidate answers associated with them. this value is valid only for users with the access einstein-generated answers permission. • unread—feed elements that are created in the past 30 days and aren’t marked as read for the context user. this value is valid only for the record feed of a group. • unsolvedquestions—feed elements that are questions and that don’t have a best answer. result type: connectapi.feedelementpage object containing test data. return value type: void see also: getfeedelementsfromfeed(communityid, feedtype, subjectid, recentcommentcount, elementsperbundle, density, pageparam, pagesize, sortparam, showinternalonly, filter) apex developer guide: testing connectapi code settestgetfeedelementsfromfeed(communityid, feedtype, subjectid, recentcommentcount, elementsperbundle, density, pageparam, pagesize, sortparam, showinternalonly, filter, threadedcommentscollapsed, result) register a connectapi.feedelementpage object to be returned when getfeedelementsfromfeed is called with matching parameters in a test context. use the get feed method with the same parameters or the code throws an exception. api version 44.0 signature public static void settestgetfeedelementsfromfeed(string communityid, connectapi.feedtype feedtype, string subjectid, integer recentcommentcount, integer elementsperbundle, connectapi.feeddensity density, string pageparam, integer pagesize, connectapi.feedsortorder sortparam, boolean showinternalonly, connectapi.feedfilter filter, boolean threadedcommentscollapsed, connectapi.feedelementpage result) 685apex reference guide chatterfeeds class parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype value must be connectapi.feedtype.record. subjectid type: string any record id, including a group id. recentcommentcount type: integer maximum number of comments to return with each feed item. the default value is 3. elementsperbundle type: integer maximum number of feed elements per bundle. the default and maximum value is 10. density type: connectapi.feeddensity specify the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. 686apex reference guide chatterfeeds class if you pass in null, the default value createddatedesc is used. showinternalonly type: boolean spec |
ifies whether to show only feed items from internal (non-experience cloud site) users (true), or not (false). the default value is false. filter type: connectapi.feedfilter specifies the feed filters. • allquestions—feed elements that are questions. • authoredby—feed elements authored by the user profile owner. this value is valid only for the userprofile feed. • communityscoped—feed elements that are scoped to experience cloud sites. currently, these feed elements have a user or a group parent record. however, other parent record types could be scoped to sites in the future. feed elements that are always visible in all sites are filtered out. this value is valid only for the userprofile feed. • questionswithcandidateanswers—feed elements that are questions that have candidate answers associated with them.this value is valid only for users with the access einstein-generated answers permission. • questionswithcandidateanswersreviewedpublished—feed elements that are questions that have candidate answers that have been reviewed or published. this value is valid only for users with the access einstein-generated answers permission. • read—feed elements that are older than 30 days or are marked as read for the context user. includes existing feed elements when the context user joined the group. this value is valid only for the record feed of a group. • solvedquestions—feed elements that are questions and that have a best answer. • unansweredquestions—feed elements that are questions and that don’t have any answers. • unansweredquestionswithcandidateanswers—feed elements that are questions that don’t have answers but have candidate answers associated with them. this value is valid only for users with the access einstein-generated answers permission. • unread—feed elements that are created in the past 30 days and aren’t marked as read for the context user. this value is valid only for the record feed of a group. • unsolvedquestions—feed elements that are questions and that don’t have a best answer. threadedcommentscollapsed type: boolean specifies whether to return threaded comments in a collapsed style (true) or not (false). if you pass in null, the default is false. result type: connectapi.feedelementpage object containing test data. 687apex reference guide chatterfeeds class return value type: void see also: getfeedelementsfromfeed(communityid, feedtype, subjectid, recentcommentcount, elementsperbundle, density, pageparam, pagesize, sortparam, showinternalonly, filter, threadedcommentscollapsed) apex developer guide: testing connectapi code settestgetfeedelementsfromfeed(communityid, feedtype, subjectid, recentcommentcount, elementsperbundle, density, pageparam, pagesize, sortparam, showinternalonly, customfilter, result) register a connectapi.feedelementpage object to be returned when getfeedelementsfromfeed is called with matching parameters in a test context. use the get feed method with the same parameters or the code throws an exception. api version 40.0 signature public static void settestgetfeedelementsfromfeed(string communityid, connectapi.feedtype feedtype, string subjectid, integer recentcommentcount, integer elementsperbundle, connectapi.feeddensity density, string pageparam, integer pagesize, connectapi.feedsortorder sortparam, boolean showinternalonly, string customfilter, connectapi.feedelementpage result) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype value must be connectapi.feedtype.record. subjectid type: string the id of a case. recentcommentcount type: integer maximum number of comments to return with each feed item. the default value is 3. elementsperbundle type: integer maximum number of feed elements per bundle. the default and maximum value is 10. 688apex reference guide chatterfeeds class density type: connectapi.feeddensity specify the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string |
page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. if you pass in null, the default value createddatedesc is used. showinternalonly type: boolean specifies whether to show only feed items from internal (non-experience cloud site) users (true), or not (false). the default value is false. customfilter type: string custom filter that applies only to the case feed. see customfeedfilter in the metadata api developer guide for supported values. result type: connectapi.feedelementpage object containing test data. 689apex reference guide chatterfeeds class return value type: void see also: getfeedelementsfromfeed(communityid, feedtype, subjectid, recentcommentcount, elementsperbundle, density, pageparam, pagesize, sortparam, showinternalonly, customfilter) apex developer guide: testing connectapi code settestgetfeedelementsfromfeed(communityid, feedtype, subjectid, recentcommentcount, elementsperbundle, density, pageparam, pagesize, sortparam, showinternalonly, customfilter, threadedcommentscollapsed, result) register a connectapi.feedelementpage object to be returned when the matching connectapi.getfeedelementsfromfeed method is called in a test context. use the method with the same parameters or you receive an exception. api version 44.0 signature public static void settestgetfeedelementsfromfeed(string communityid, connectapi.feedtype feedtype, string subjectid, integer recentcommentcount, integer elementsperbundle, connectapi.feeddensity density, string pageparam, integer pagesize, connectapi.feedsortorder sortparam, boolean showinternalonly, string customfilter, boolean threadedcommentscollapsed, connectapi.feedelementpage result) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype value must be connectapi.feedtype.record. subjectid type: string the id of a case. recentcommentcount type: integer maximum number of comments to return with each feed item. the default value is 3. elementsperbundle type: integer maximum number of feed elements per bundle. the default and maximum value is 10. 690apex reference guide chatterfeeds class density type: connectapi.feeddensity specify the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—s |
orts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. if you pass in null, the default value createddatedesc is used. showinternalonly type: boolean specifies whether to show only feed items from internal (non-experience cloud site) users (true), or not (false). the default value is false. customfilter type: string custom filter that applies only to the case feed. see customfeedfilter in the metadata api developer guide for supported values. threadedcommentscollapsed type: boolean specifies whether to return threaded comments in a collapsed style (true) or not (false). if you pass in null, the default is false. result type: connectapi.feedelementpage object containing test data. 691apex reference guide chatterfeeds class return value type: void see also: apex developer guide: testing connectapi code getfeedelementsfromfeed(communityid, feedtype, subjectid, recentcommentcount, elementsperbundle, density, pageparam, pagesize, sortparam, showinternalonly, customfilter, threadedcommentscollapsed) settestgetfeedelementsfromfilterfeed(communityid, subjectid, keyprefix, result) register a connectapi.feedelementpage object to be returned when the matching getfeedelements fromfilterfeed method is called in a test context. use the method with the same parameters or the code throws an exception. api version 31.0 signature public static void settestgetfeedelementsfromfilterfeed(string communityid, string subjectid, string keyprefix, connectapi.feedelementpage result) parameters communityid type: string id for an experience cloud site, internal, or null. subjectid type: string id of the context user or the alias me. keyprefix type: string a key prefix that specifies record type. a key prefix is the first three characters in the object id, which specifies the object type. for example, user objects have a prefix of 005 and group objects have a prefix of 0f9. result type: connectapi.feedelementpage object containing test data. 692apex reference guide chatterfeeds class return value type: void see also: getfeedelementsfromfilterfeed(communityid, subjectid, keyprefix) apex developer guide: testing connectapi code settestgetfeedelementsfromfilterfeed(communityid, subjectid, keyprefix, pageparam, pagesize, sortparam, result) register a connectapi.feedelementpage object to be returned when the matching getfeedelements fromfilterfeed method is called in a test context. use the method with the same parameters or the code throws an exception. api version 31.0 signature public static void settestgetfeedelementsfromfilterfeed(string communityid, string subjectid, string keyprefix, string pageparam, integer pagesize, connectapi.feedsortorder sortparam, connectapi.feedelementpage result) parameters communityid type: string id for an experience cloud site, internal, or null. subjectid type: string id of the context user or the alias me. keyprefix type: string a key prefix that specifies record type. a key prefix is the first three characters in the object id, which specifies the object type. for example, user objects have a prefix of 005 and group objects have a prefix of 0f9. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.feedsortorder 693apex reference guide chatterfeeds class values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • |
mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. if you pass in null, the default value createddatedesc is used. result type: connectapi.feedelementpage object containing test data. return value type: void see also: getfeedelementsfromfilterfeed(communityid, subjectid, keyprefix, pageparam, pagesize, sortparam) apex developer guide: testing connectapi code settestgetfeedelementsfromfilterfeed(communityid, subjectid, keyprefix, recentcommentcount, elementsperbundle, density, pageparam, pagesize, sortparam, result) register a connectapi.feedelementpage object to be returned when the matching getfeedelements fromfilterfeed method is called in a test context. use the method with the same parameters or the code throws an exception. api version 31.0 signature public static void settestgetfeedelementsfromfilterfeed(string communityid, string subjectid, string keyprefix, integer recentcommentcount, integer elementsperbundle, connectapi.feeddensity density, string pageparam, integer pagesize, connectapi.feedsortorder sortparam, connectapi.feedelementpage result) parameters communityid type: string id for an experience cloud site, internal, or null. subjectid type: string 694apex reference guide chatterfeeds class id of the context user or the alias me. keyprefix type: string a key prefix that specifies record type. a key prefix is the first three characters in the object id, which specifies the object type. for example, user objects have a prefix of 005 and group objects have a prefix of 0f9. recentcommentcount type: integer maximum number of comments to return with each feed element. the default value is 3. elementsperbundle type: integer maximum number of feed elements per bundle. the default and maximum value is 10. density type: connectapi.feeddensity specify the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in null, the default size is 25. sortparam type: connectapi.feedsortorder values are: • createddateasc—sorts by oldest creation date. this sort order is available only for directmessagemoderation, draft, moderation, and pendingreview feeds. • createddatedesc—sorts by most recent creation date. • lastmodifieddatedesc—sorts by most recent activity. • mostviewed—sorts by most viewed content. this sort order is available only for home feeds when the connectapi.feedfilter is unansweredquestions. • relevance—sorts by most relevant content. this sort order is available only for company, home, and topics feeds. if you pass in null, the default value createddatedesc is used. result type: connectapi.feedelementpage object containing test data. 695apex reference guide chatterfeeds class return value type: void see also: getfeedelementsfromfilterfeed(communityid, subjectid, keyprefix, recentcommentcount, elementsperbundle, density, pageparam, pagesize, sortparam) apex developer guide: testing connectapi code settestgetfeedelementsfromfilterfeedupdatedsince(communityid, subjectid, keyprefix, recentcommentcount, elementsperbundle, density, pageparam, pagesize, updatedsince, result) register a connectapi.feedelementpage object to be returned when the getfeedelementsfromfilterfeedupdatedsince method is called in a test context. api version 31.0 signature |
public static void settestgetfeedelementsfromfilterfeedupdatedsince(string communityid, string subjectid, string keyprefix, integer recentcommentcount, integer elementsperbundle, connectapi.feeddensity density, string pageparam, integer pagesize, string updatedsince, connectapi.feedelementpage result) parameters communityid type: string id for an experience cloud site, internal, or null. subjectid type: string id of the context user or the alias me. keyprefix type: string a key prefix that specifies record type. a key prefix is the first three characters in the object id, which specifies the object type. for example, user objects have a prefix of 005 and group objects have a prefix of 0f9. recentcommentcount type: integer maximum number of comments to return with each feed element. the default value is 3. elementsperbundle type: integer maximum number of feed elements per bundle. the default and maximum value is 10. 696apex reference guide chatterfeeds class density type: connectapi.feeddensity specify the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in null, the default size is 25. updatedsince type: string opaque token defining the modification timestamp of the feed and the sort order. the updatedsince parameter doesn’t return feed elements that are created in the same second as the call. result type: connectapi.feedelementpage object containing test data. return value type: void see also: getfeedelementsfromfilterfeedupdatedsince(communityid, subjectid, keyprefix, recentcommentcount, elementsperbundle, density, pageparam, pagesize, updatedsince) apex developer guide: testing connectapi code settestgetfeedelementsupdatedsince(communityid, feedtype, recentcommentcount, density, pageparam, pagesize, updatedsince, result) register a connectapi.feedelementpage object to be returned when getfeedelementsupdatedsince is called with matching parameters in a test context. use the method with the same parameters or the code throws an exception. api version 31.0 697apex reference guide chatterfeeds class signature public static void settestgetfeedelementsupdatedsince(string communityid, connectapi.feedtype feedtype, integer recentcommentcount, connectapi.feeddensity density, string pageparam, integer pagesize, string updatedsince, connectapi.feedelementpage result) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype type of feed. valid values are company, directmessagemoderation, home, moderation, and pendingreview. recentcommentcount type: integer maximum number of comments to return with each feed element. the default value is 3. density type: connectapi.feeddensity specify the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in null, the default size is 25. updatedsince type: string an opaque token containing information about the last modified date of the feed. do not construct this token. ret |
rieve this token from the updatestoken property of the connectapi.feedelementpage response body. the updatedsince parameter doesn’t return feed elements that are created in the same second as the call. result type: connectapi.feedelementpage object containing test data. 698apex reference guide chatterfeeds class return value type: void see also: getfeedelementsupdatedsince(communityid, feedtype, recentcommentcount, density, pageparam, pagesize, updatedsince) apex developer guide: testing connectapi code settestgetfeedelementsupdatedsince(communityid, feedtype, recentcommentcount, density, pageparam, pagesize, updatedsince, filter, result) register a connectapi.feedelementpage object to be returned when getfeedelementsupdatedsince is called with matching parameters in a test context. use the method with the same parameters or the code throws an exception. api version 32.0 signature public static void settestgetfeedelementsupdatedsince(string communityid, connectapi.feedtype feedtype, integer recentcommentcount, connectapi.feeddensity density, string pageparam, integer pagesize, string updatedsince, connectapi.feedfilter filter, connectapi.feedelementpage result) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype type of feed. valid values are company, directmessagemoderation, directmessages, home, moderation, and pendingreview. recentcommentcount type: integer maximum number of comments to return with each feed element. the default value is 3. density type: connectapi.feeddensity specify the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string 699apex reference guide chatterfeeds class page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in null, the default size is 25. updatedsince type: string an opaque token containing information about the last modified date of the feed. do not construct this token. retrieve this token from the updatestoken property of the connectapi.feedelementpage response body. the updatedsince parameter doesn’t return feed elements that are created in the same second as the call. filter type: connectapi.feedfilter specifies the feed filters. • allquestions—feed elements that are questions. • authoredby—feed elements authored by the user profile owner. this value is valid only for the userprofile feed. • communityscoped—feed elements that are scoped to experience cloud sites. currently, these feed elements have a user or a group parent record. however, other parent record types could be scoped to sites in the future. feed elements that are always visible in all sites are filtered out. this value is valid only for the userprofile feed. • questionswithcandidateanswers—feed elements that are questions that have candidate answers associated with them.this value is valid only for users with the access einstein-generated answers permission. • questionswithcandidateanswersreviewedpublished—feed elements that are questions that have candidate answers that have been reviewed or published. this value is valid only for users with the access einstein-generated answers permission. • read—feed elements that are older than 30 days or are marked as read for the context user. includes existing feed elements when the context user joined the group. this value is valid only for the record feed of a group. • solvedquestions—feed elements that are questions and that have a best answer. • unansweredquestions—feed elements that are questions and that don’t have any answers. • unansweredquestionswithcandidateanswers—feed elements that are questions that don’t have answers but have candidate answers associated with them. this value is valid only for users with the access einstein-generated answers permission. • unread—feed elements that are created in the past 30 days and aren |
’t marked as read for the context user. this value is valid only for the record feed of a group. • unsolvedquestions—feed elements that are questions and that don’t have a best answer. result type: connectapi.feedelementpage object containing test data. 700apex reference guide chatterfeeds class return value type: void see also: getfeedelementsupdatedsince(communityid, feedtype, recentcommentcount, density, pageparam, pagesize, updatedsince, filter) apex developer guide: testing connectapi code settestgetfeedelementsupdatedsince(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, updatedsince, result) register a connectapi.feedelementpage object to be returned when getfeedelementsupdatedsince is called with matching parameters in a test context. use the method with the same parameters or the code throws an exception. api version 31.0 signature public static void settestgetfeedelementsupdatedsince(string communityid, connectapi.feedtype feedtype, string subjectid, integer recentcommentcount, connectapi.feeddensity density, string pageparam, integer pagesize, string updatedsince, connectapi.feedelementpage result) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype one of these values: • files • groups • news • people • record subjectid type: string if feedtype is connectapi.record, subjectid can be any record id, including a group id. otherwise, it must be the context user or the alias me. recentcommentcount type: integer maximum number of comments to return with each feed item. the default value is 3. 701apex reference guide chatterfeeds class density type: connectapi.feeddensity specify the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in null, the default size is 25. updatedsince type: string an opaque token containing information about the last modified date of the feed. do not construct this token. retrieve this token from the updatestoken property of the connectapi.feedelementpage response body. the updatedsince parameter doesn’t return feed elements that are created in the same second as the call. result type: connectapi.feedelementpage object containing test data. return value type: void see also: getfeedelementsupdatedsince(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, updatedsince) apex developer guide: testing connectapi code settestgetfeedelementsupdatedsince(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, updatedsince, showinternalonly, result) register a connectapi.feedelementpage object to be returned when getfeedelementsupdatedsince is called with matching parameters in a test context. use the method with the same parameters or the code throws an exception. api version 31.0 702apex reference guide chatterfeeds class signature public static void settestgetfeedelementsupdatedsince(string communityid, connectapi.feedtype feedtype, string subjectid, integer recentcommentcount, connectapi.feeddensity density, string pageparam, integer pagesize, string updatedsince, boolean showinternalonly, connectapi.feedelementpage result) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype value must be connectapi.feedtype.record. subjectid type: string any record id, including a group id. recentcommentcount type: integer maximum number of comments to |
return with each feed element. the default value is 3. density type: connectapi.feeddensity specify the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in null, the default size is 25. updatedsince type: string an opaque token containing information about the last modified date of the feed. do not construct this token. retrieve this token from the updatestoken property of the connectapi.feedelementpage response body. the updatedsince parameter doesn’t return feed elements that are created in the same second as the call. showinternalonly type: boolean 703apex reference guide chatterfeeds class specifies whether to show only feed elements from internal (non-experience cloud site) users (true), or not (false). the default value is false. result type: connectapi.feedelementpage object containing test data. return value type: void see also: getfeedelementsupdatedsince(communityid, feedtype, subjectid, recentcommentcount, density, pageparam, pagesize, updatedsince, showinternalonly) apex developer guide: testing connectapi code settestgetfeedelementsupdatedsince(communityid, feedtype, subjectid, recentcommentcount, elementsperbundle, density, pageparam, pagesize, updatedsince, filter, result) register a connectapi.feedelementpage object to be returned when getfeedelementsupdatedsince is called with matching parameters in a test context. use the method with the same parameters or the code throws an exception. api version 35.0 signature public static void settestgetfeedelementsupdatedsince(string communityid, connectapi.feedtype feedtype, string subjectid, integer recentcommentcount, integer elementsperbundle, connectapi.feeddensity density, string pageparam, integer pagesize, string updatedsince, connectapi.feedfilter filter, connectapi.feedelementpage result) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype value must be connectapi.feedtype.userprofile. subjectid type: string id of any user. to specify the context user, use the user id or the alias me. recentcommentcount type: integer 704apex reference guide chatterfeeds class maximum number of comments to return with each feed element. the default value is 3. elementsperbundle type: integer maximum number of feed elements per bundle. the default and maximum value is 10. density type: connectapi.feeddensity specify the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in null, the default size is 25. updatedsince type: string opaque token defining the modification timestamp of the feed and the sort order. the updatedsince parameter doesn’t return feed elements that are created in the same second as the call. filter type: connectapi.feedfilter value must be connectapi.feedfilter.communityscoped. filters the feed to include only feed elements that are scoped to experience cloud sites. feed elements that are always visible in all sites are filtered out. currently, |
feed elements scoped to sites have a user or a group parent record. however, other parent record types could be scoped to sites in the future. result type: connectapi.feedelementpage object containing test data. return value type: void see also: getfeedelementsupdatedsince(communityid, feedtype, subjectid, recentcommentcount, elementsperbundle, density, pageparam, pagesize, updatedsince, filter) apex developer guide: testing connectapi code 705apex reference guide chatterfeeds class settestgetfeedelementsupdatedsince(communityid, feedtype, subjectid, recentcommentcount, elementsperbundle, density, pageparam, pagesize, updatedsince, customfilter, result) register a connectapi.feedelementpage object to be returned when getfeedelementsupdatedsince is called with matching parameters in a test context. use the method with the same parameters or the code throws an exception. api version 40.0 signature public static void settestgetfeedelementsupdatedsince(string communityid, connectapi.feedtype feedtype, string subjectid, integer recentcommentcount, integer elementsperbundle, connectapi.feeddensity density, string pageparam, integer pagesize, string updatedsince, string customfilter, connectapi.feedelementpage result) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype value must be connectapi.feedtype.record. subjectid type: string the id of a case. recentcommentcount type: integer maximum number of comments to return with each feed element. the default value is 3. elementsperbundle type: integer maximum number of feed elements per bundle. the default and maximum value is 10. density type: connectapi.feeddensity specify the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string 706apex reference guide chatterfeeds class page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in null, the default size is 25. updatedsince type: string opaque token defining the modification timestamp of the feed and the sort order. the updatedsince parameter doesn’t return feed elements that are created in the same second as the call. customfilter type: string custom filter that applies only to the case feed. see customfeedfilter in the metadata api developer guide for supported values. result type: connectapi.feedelementpage object containing test data. return value type: void see also: getfeedelementsupdatedsince(communityid, feedtype, subjectid, recentcommentcount, elementsperbundle, density, pageparam, pagesize, updatedsince, customfilter) apex developer guide: testing connectapi code settestgetfeedelementsupdatedsince(communityid, feedtype, subjectid, recentcommentcount, elementsperbundle, density, pageparam, pagesize, updatedsince, showinternalonly, result) register a connectapi.feedelementpage object to be returned when getfeedelementsupdatedsince is called with matching parameters in a test context. use the method with the same parameters or the code throws an exception. api version 31.0 signature public static void settestgetfeedelementsupdatedsince(string communityid, connectapi.feedtype feedtype, string subjectid, integer recentcommentcount, integer elementsperbundle, connectapi.feeddensity density, string pageparam, integer pagesize, string updatedsince, boolean showinternalonly, connectapi.feedelementpage result) 707apex reference guide chatterfeeds class parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype value must be connectapi.feedtype.record. subjectid |
type: string any record id, including a group id. recentcommentcount type: integer maximum number of comments to return with each feed element. the default value is 3. elementsperbundle type: integer maximum number of feed elements per bundle. the default and maximum value is 10. density type: connectapi.feeddensity specify the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in null, the default size is 25. updatedsince type: string an opaque token containing information about the last modified date of the feed. do not construct this token. retrieve this token from the updatestoken property of the connectapi.feedelementpage response body. the updatedsince parameter doesn’t return feed elements that are created in the same second as the call. showinternalonly type: boolean specifies whether to show only feed elements from internal (non-experience cloud site) users (true), or not (false). the default value is false. result type: connectapi.feedelementpage 708apex reference guide chatterfeeds class object containing test data. return value type: void see also: getfeedelementsupdatedsince(communityid, feedtype, subjectid, recentcommentcount, elementsperbundle, density, pageparam, pagesize, updatedsince, showinternalonly) apex developer guide: testing connectapi code settestgetfeedelementsupdatedsince(communityid, feedtype, subjectid, recentcommentcount, elementsperbundle, density, pageparam, pagesize, updatedsince, showinternalonly, filter, result) register a connectapi.feedelementpage object to be returned when getfeedelementsupdatedsince is called with matching parameters in a test context. use the method with the same parameters or the code throws an exception. api version 32.0 signature public static void settestgetfeedelementsupdatedsince(string communityid, connectapi.feedtype feedtype, string subjectid, integer recentcommentcount, integer elementsperbundle, connectapi.feeddensity density, string pageparam, integer pagesize, string updatedsince, boolean showinternalonly, connectapi.feedfilter filter, connectapi.feedelementpage result) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype value must be connectapi.feedtype.record. subjectid type: string any record id, including a group id. recentcommentcount type: integer maximum number of comments to return with each feed element. the default value is 3. elementsperbundle type: integer 709apex reference guide chatterfeeds class maximum number of feed elements per bundle. the default and maximum value is 10. density type: connectapi.feeddensity specify the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in null, the default size is 25. updatedsince type: string an opaque token containing information about the last modified date of the feed. do not construct this token. retrieve this token from the updatestoken property of the connectapi.feedelementpage response body. |
the updatedsince parameter doesn’t return feed elements that are created in the same second as the call. showinternalonly type: boolean specifies whether to show only feed elements from internal (non-experience cloud site) users (true), or not (false). the default value is false. filter type: connectapi.feedfilter specifies the feed filters. • allquestions—feed elements that are questions. • authoredby—feed elements authored by the user profile owner. this value is valid only for the userprofile feed. • communityscoped—feed elements that are scoped to experience cloud sites. currently, these feed elements have a user or a group parent record. however, other parent record types could be scoped to sites in the future. feed elements that are always visible in all sites are filtered out. this value is valid only for the userprofile feed. • questionswithcandidateanswers—feed elements that are questions that have candidate answers associated with them.this value is valid only for users with the access einstein-generated answers permission. • questionswithcandidateanswersreviewedpublished—feed elements that are questions that have candidate answers that have been reviewed or published. this value is valid only for users with the access einstein-generated answers permission. • read—feed elements that are older than 30 days or are marked as read for the context user. includes existing feed elements when the context user joined the group. this value is valid only for the record feed of a group. • solvedquestions—feed elements that are questions and that have a best answer. • unansweredquestions—feed elements that are questions and that don’t have any answers. 710apex reference guide chatterfeeds class • unansweredquestionswithcandidateanswers—feed elements that are questions that don’t have answers but have candidate answers associated with them. this value is valid only for users with the access einstein-generated answers permission. • unread—feed elements that are created in the past 30 days and aren’t marked as read for the context user. this value is valid only for the record feed of a group. • unsolvedquestions—feed elements that are questions and that don’t have a best answer. result type: connectapi.feedelementpage object containing test data. return value type: void see also: getfeedelementsupdatedsince(communityid, feedtype, subjectid, recentcommentcount, elementsperbundle, density, pageparam, pagesize, updatedsince, showinternalonly, filter) apex developer guide: testing connectapi code settestgetfeedelementsupdatedsince(communityid, feedtype, subjectid, recentcommentcount, elementsperbundle, density, pageparam, pagesize, updatedsince, showinternalonly, customfilter, result) register a connectapi.feedelementpage object to be returned when getfeedelementsupdatedsince is called with matching parameters in a test context. use the method with the same parameters or the code throws an exception. api version 40.0 signature public static void settestgetfeedelementsupdatedsince(string communityid, connectapi.feedtype feedtype, string subjectid, integer recentcommentcount, integer elementsperbundle, connectapi.feeddensity density, string pageparam, integer pagesize, string updatedsince, boolean showinternalonly, string customfilter, connectapi.feedelementpage result) parameters communityid type: string id for an experience cloud site, internal, or null. feedtype type: connectapi.feedtype value must be connectapi.feedtype.record. 711apex reference guide chatterfeeds class subjectid type: string the id of a case. recentcommentcount type: integer maximum number of comments to return with each feed element. the default value is 3. elementsperbundle type: integer maximum number of feed elements per bundle. the default and maximum value is 10. density type: connectapi.feeddensity specify the amount of content in a feed. • allupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations. • fewerupdates—displays all updates from people and records the user follows and groups the user is a member of. also displays custom recommendations, but hides some system-generated updates from records. pageparam type: string page token to use to view the page. page tokens are returned as part of the response class, |
for example, currentpagetoken or nextpagetoken. if you pass in null, the first page is returned. pagesize type: integer specifies the number of feed elements per page. valid values are from 1 through 100. if you pass in null, the default size is 25. updatedsince type: string an opaque token containing information about the last modified date of the feed. do not construct this token. retrieve this token from the updatestoken property of the connectapi.feedelementpage response body. the updatedsince parameter doesn’t return feed elements that are created in the same second as the call. showinternalonly type: boolean specifies whether to show only feed elements from internal (non-experience cloud site) users (true), or not (false). the default value is false. customfilter type: string custom filter that applies only to the case feed. see customfeedfilter in the metadata api developer guide for supported values. result type: connectapi.feedelementpage object containing test data. 712apex reference guide chatterfeeds class return value type: void see also: getfeedelementsupdatedsince(communityid, feedtype, subjectid, recentcommentcount, elementsperbundle, density, pageparam, pagesize, updatedsince, showinternalonly, customfilter) apex developer guide: testing connectapi code settestgetrelatedposts(communityid, feedelementid, filter, maxresults, result) register a connectapi.relatedfeedposts object to be returned when the matching connectapi.getrelatedposts(communityid, feedelementid, filter, maxresults) method is called in a test context. use the method with the same parameters or you receive an exception. api version 37.0 signature public static void settestgetrelatedposts(string communityid, string feedelementid, connectapi.relatedfeedposttype filter, integer maxresults, connectapi.relatedfeedposts result) parameters communityid type: string id for an experience cloud site, internal, or null. feedelementid type: string id of the feed element. the feed element must be a question. filter type: connectapi.relatedfeedposttype specifies the type of related feed post. values are: • answered—related questions that have at least one answer. • bestanswer—related questions that have a best answer. • generic—all types of related questions, including answered, with a best answer, and unanswered. • unanswered—related questions that don’t have answers. generic is the default value. maxresults type: integer the maximum number of results to return. you can return up to 25 results; 5 is the default. 713apex reference guide chatterfeeds class result type: connectapi.relatedfeedposts object containing test data. in version 37.0 and later, related feed posts are questions. return value type: void settestgettopunansweredquestions(communityid, result) (pilot) register a connectapi.feedelementpage object to be returned when the matching connectapi.gettopunansweredquestions method is called in a test context. use the method with the same parameters or you receive an exception. note: we provided top-five unanswered questions to selected customers through a pilot program that required agreement to specific terms and conditions. this pilot program is closed and not accepting new participants. api version 42.0 signature public static void settestgettopunansweredquestions(string communityid, connectapi.feedelementpage result) parameters communityid type: string id of the experience cloud site. result type: connectapi.feedelementpage object containing test data. return value type: void see also: gettopunansweredquestions(communityid) (pilot) apex developer guide: testing connectapi code 714apex reference guide chatterfeeds class settestgettopunansweredquestions(communityid, filter, result) (pilot) register a connectapi.feedelementpage object to be returned when the matching connectapi.gettopunansweredquestions method is called in a test context. use the method with the same parameters or you receive an exception. note: we provided top-five unanswered questions to selected customers through a pilot program that required agreement to specific terms and conditions. this pilot program is closed and not accepting new participants. api version 42.0 signature public static void settestgettopunansweredquestions(string communityid, connectapi |
.topunansweredquestionsfiltertype filter, connectapi.feedelementpage result) parameters communityid type: string id of the experience cloud site. filter type: connectapi.feedfilter specifies the filter for the feed. unansweredquestionswithcandidateanswers is the only valid value. result type: connectapi.feedelementpage object containing test data. return value type: void see also: gettopunansweredquestions(communityid, filter) (pilot) apex developer guide: testing connectapi code settestgettopunansweredquestions(communityid, pagesize, result) (pilot) register a connectapi.feedelementpage object to be returned when the matching connectapi.gettopunansweredquestions method is called in a test context. use the method with the same parameters or you receive an exception. note: we provided top-five unanswered questions to selected customers through a pilot program that required agreement to specific terms and conditions. this pilot program is closed and not accepting new participants. 715apex reference guide chatterfeeds class api version 42.0 signature public static void settestgettopunansweredquestions(string communityid, integer pagesize, connectapi.feedelementpage result) parameters communityid type: string id of the experience cloud site. pagesize type: integer specifies the number of items per page. valid values are from 0 through 10. if you pass in null, the default size is 5. result type: connectapi.feedelementpage object containing test data. return value type: void see also: gettopunansweredquestions(communityid, pagesize) (pilot) apex developer guide: testing connectapi code settestgettopunansweredquestions(communityid, filter, pagesize, result) (pilot) register a connectapi.feedelementpage object to be returned when the matching connectapi.gettopunansweredquestions method is called in a test context. use the method with the same parameters or you receive an exception. note: we provided top-five unanswered questions to selected customers through a pilot program that required agreement to specific terms and conditions. this pilot program is closed and not accepting new participants. api version 42.0 signature public static void settestgettopunansweredquestions(string communityid, connectapi.feedfilter filter, integer pagesize, connectapi.feedelementpage result) 716apex reference guide chatterfeeds class parameters communityid type: string id of the experience cloud site. filter type: connectapi.feedfilter specifies the filter for the feed. unansweredquestionswithcandidateanswers is the only valid value. pagesize type: integer specifies the number of items per page. valid values are from 0 through 10. if you pass in null, the default size is 5. result type: connectapi.feedelementpage object containing test data. return value type: void see also: gettopunansweredquestions(communityid, filter, pagesize) (pilot) apex developer guide: testing connectapi code settestsearchfeedelements(communityid, q, result) register a connectapi.feedelementpage object to be returned when the matching connectapi.searchfeedelements method is called in a test context. use the method with the same parameters or you receive an exception. api version 31.0 signature public static void settestsearchfeedelements(string communityid, string q, connectapi.feedelementpage result) parameters communityid type: string id for an experience cloud site, internal, or null. q type: string 717apex reference guide chatterfeeds class required and can’t be null. specifies the string to search. the search string must contain at least two characters, not including wildcards. see wildcards. result type: connectapi.feedelementpage object containing test data. return value type: void see also: searchfeedelements(communityid, q) apex developer guide: testing connectapi code settestsearchfeedelements(communityid, q, sortparam, result) register a connectapi.feedelementpage object to be returned when the matching connectapi.searchfeedelements method is called in a test context. use the method with the same parameters or you receive an exception. api version 31.0 signature public |
Subsets and Splits