The following are methods for Mentions. All methods are static.
29.0
Yes
public static ConnectApi.MentionCompletionPage getMentionCompletions (String communityId, String q, String contextId)
Call this method to generate a page of proposed mentions that a user can choose from when they enter characters after @ in a feed item body or a comment body.
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.
29.0
Yes
public static ConnectApi.Mentions getMentionCompletions (String communityId, String q, String contextId, ConnectApi.MentionCompletionType type, Integer pageParam, Integer pageSize)
Call this method to generate a page of proposed mentions that a user can choose from when they enter characters after @ in a feed item body or a comment body.
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.
29.0
Yes
public static ConnectApi.Mentions getMentionValidations(String communityId, String parentId, List<String> recordIds, ConnectApi.FeedItemVisibilityType visibility)
Call this method to check whether the record IDs returned from a call to ConnectApi.Mentions.getMentionCompletions are valid for the context user. For example, the context users can’t mention private groups they don’t belong to. If such a group were included in the list of mention validations, the ConnectApi.MentionValidations.hasErrors property would be true and the group would have a ConnectApi.MentionValidation.valdiationStatus of Disallowed.
The following are the test methods for Mentions. All methods are static.
For information about using these methods to test your ConnectApi code, see Testing ConnectApi Code.
29.0
public static Void setTestGetMentionCompletions (String communityId, String q, String contextId, ConnectApi.MentionCompletionPage result)
Type: Void
29.0
public static Void setTestGetMentionCompletions (String communityId, String q, String contextId, ConnectApi.MentionCompletionType type, Integer pageParam, Integer pageSize, ConnectApi.MentionCompletionPage result)
Type: Void