Unfollow a Record

When you follow a record, the call to ConnectApi.ChatterUsers.follow returns a ConnectApi.Subscription object. To unfollow a record, pass the id property of that object to the deleteSubscription(communityId, subscriptionId) method.
ConnectApi.Chatter.deleteSubscription(null, '0E8RR0000004CnK0AU');
Previous
Next