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
Shashank JadhavShashank Jadhav 

How to open a Visualforce page from the trigger


Need a trigger for CaseComent, which fired when Public Checkbox is not checked. In this case, I want to confirm from user whether his comment is private or not, if Public checkbox is unchecked. How to redirect CaseComment page to Custom Confirmation Visualforce page? 

Can anyone please tell me how to achieve this ?
 
Brian Cherry FWIBrian Cherry FWI
Hi Shanshank,

You would want to do this via a controller extenstion with a pagereference method.

Best,

Brian.

 
Temoc MunozTemoc Munoz
You can't redirect to a Visual Force Page from a Trigger. 

You will need to overwrite the CaseComment Page.

https://developer.salesforce.com/forums/?id=906F00000008xYXIAY