onCommentUnmarkedAsBest( )


A backend event that fires when a forum comment is unmarked as best.

The onCommentUnmarkedAsBest() event handler runs when an existing forum comment in your site is unmarked as best. The received UnmarkedAsBestComment object contains information about the comment that was unmarked as best.

Notes:

  • Only comments on posts with a postType of "QUESTION" can be marked and unmarked as best.

  • Backend events are not fired when previewing your site.

Method Declaration
Copy
function onCommentUnmarkedAsBest(event: UnmarkedAsBestComment): void;
Method Parameters
eventUnmarkedAsBestCommentRequired

Information about the forum comment that was unmarked as best.

A backend event that occurs when a forum comment is unmarked as best
JavaScript
// Place this code in a file named events.js // in the Backend section of your code files. export function wixForum_onCommentUnmarkedAsBest(event) { const unmarkedCommentId = event.commentId; console.log("Comment unmarked as best"); }
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?