You need to sign in to do that
Don't have an account?
Pooja 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
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