You need to sign in to do that
Don't have an account?
Karthik j
How to send chatter notification to single person in apex
Hi
I have a requirement like, whenever a user creates a task and it is closed by another user, then I have to send a chatter notification to the user who created the task, I have written this code.
public static void postFeed(Set<Id>caseIdset){
List<FeedItem> postlist = new List<FeedItem>();
for(Id caseId:caseIdset){
FeedItem post=new FeedItem();
post.ParentId = caseId;
post.Body ='task is closed';
postlist.add(post);
}
if(postlist.size()>0){
insert postlist;
}
This one is sending chatter notifications to everyone when a task is closed, how I can make it send notifications to the user who created it.
Please help me in this.
I have a requirement like, whenever a user creates a task and it is closed by another user, then I have to send a chatter notification to the user who created the task, I have written this code.
public static void postFeed(Set<Id>caseIdset){
List<FeedItem> postlist = new List<FeedItem>();
for(Id caseId:caseIdset){
FeedItem post=new FeedItem();
post.ParentId = caseId;
post.Body ='task is closed';
postlist.add(post);
}
if(postlist.size()>0){
insert postlist;
}
This one is sending chatter notifications to everyone when a task is closed, how I can make it send notifications to the user who created it.
Please help me in this.