function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
DekorDekor 

Prompt users when saving a case comment to mark as public/private

Hello,

We've hit an issue where our support agents are forgetting to tick the "Public" option on case comments when they can be viewed by our customers in the portal. 

I'm looking into a way around this, we don't want to automatically mark all comments as public and rely on the support staff to untick it when it is a private comment.

So I'm thinking the best way would be a new VF page for adding case comments, which has a custom javascript "Accept" button that prompts the user on whether it should be public or private.  If public is selected it creates the comment and marks it as public or if private is selected create the comment with public set to false.

My questions are:

1.  What javascript code would be required on the custom accept button to perform this?
2.  Can I hijack the "new case comment" from the related list on the case layout page to direct to the custom VF page or will I need to create a custom related list that points at case comments to enable me to place my own "new case comment" button?

Cheers in advance!