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
Pooja NekkalapudiPooja Nekkalapudi 

create a alert message or a pop -up message upon case creation

my class :

public class OpportunityExtensionController {
     public Case ca {get; set;}
     public OpportunityExtensionController(ApexPages.StandardController controller) {
           Opportunity opp = (Opportunity) controller.getRecord();
           opp = [Select Id, Name, AccountId from Opportunity where Id =: opp.Id];
           ca = new Case();
           ca.Pitch__c = opp.Id;
           ca.AccountId = opp.AccountId;
          }
           
public PageReference save() {
       insert ca;
       
        PageReference pageRef = new PageReference('/' + ca.Pitch__c);
        pageRef.setRedirect(true);
        
      
        return pageRef;
       
      
     }
public PageReference cancel() {
     return new PageReference('/'+ ca.Pitch__c);
}
}

my vf page :
<apex:page standardcontroller="Opportunity" extensions="OpportunityExtensionController"> <apex:sectionHeader title="Title" subtitle="Case Helper"/> <apex:form > <apex:outputPanel > </apex:outputPanel> <apex:pageMessages /> <apex:pageBlock title="Please fill in the details for creating a Case">


Once i hit save it returns to opportunity page, now how to i pop up or a alert message on the opp record saying New case created with case Id and caseNumber xxx