You need to sign in to do that
Don't have an account?
Sean Williams 21
trigger not firing for cascade delete (feedcomment)
We have a legal requirement to backup copies of some users chatter posts when those posts are deleted. I have created a new trigger to write out feeditem and feedcomment objects to a custom object when they are deleted, and its working well. It runs after delete on FEEDITEM (a chatter post basically) and FEEDCOMMENT (chatter comment on a chatter post).
Chatter post = FEEDITEM record (parent)
> Chatter comment = FEEDCOMMENT record (child)
All works as expected, but when a chatter post is deleted in the UI (and thus the comments are deleted via cascade delete) the trigger on FEEDCOMMENT does not fire. This appears to be documented, but is a major limitation for me.
Can anyone suggest a workaround?
Chatter post = FEEDITEM record (parent)
> Chatter comment = FEEDCOMMENT record (child)
All works as expected, but when a chatter post is deleted in the UI (and thus the comments are deleted via cascade delete) the trigger on FEEDCOMMENT does not fire. This appears to be documented, but is a major limitation for me.
Can anyone suggest a workaround?
All Answers
Thanks for the suggestion though - hadnt considered doing the delete myself!
Hi,
We have same requirement to take backup of deleted feedpost and its comments. As casedelete does not work, we are deleting feedcomments using feeditem trigger. It works only for system admin, but does not work for other users as they do not have "View All Data" permission (Only Admin or users with View All Data permission can query on feedcomment). So is there any way to avoid querying feedcomment while feeditem is fired.
Regards,
Animesh