You need to sign in to do that
Don't have an account?
Phu Dang 1
I want to prevent customer from posting comment on the chat feeder.
I want to prevent customer from posting comment on the chat feeder in Communities.
I got the trigger but it seem not right. What is wrong here?
trigger InternalChatterCommentTrigger on FeedComment (before insert) {
list<user> ExternalUser = [select id from user where ProfileId in('00e50000001FdBYAA0')];
FeedComment
for (FeedComment fc : trigger.new){
for(user u : ExternalUser){
{
if (fc.CreatedById == u.id)
{
fc.adderror('You do not have permission to comment on Chatter. Please respond on this case using Comment related list');
}
}
}
}
}
I got the trigger but it seem not right. What is wrong here?
trigger InternalChatterCommentTrigger on FeedComment (before insert) {
list<user> ExternalUser = [select id from user where ProfileId in('00e50000001FdBYAA0')];
FeedComment
for (FeedComment fc : trigger.new){
for(user u : ExternalUser){
{
if (fc.CreatedById == u.id)
{
fc.adderror('You do not have permission to comment on Chatter. Please respond on this case using Comment related list');
}
}
}
}
}
All Answers