Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <apex:pageBlockButtons location="Top" >
- <apex:commandButton value="Save" action="{!saverec}"/> <br/><br/>
- <apex:commandLink action="{!editOpp}" value="Edit"/>
- Public Opportunity opp{get;set;}
- Public String op1;
- public id accid{set;get;}
- Opp= (Opportunity)stdController.getRecord();
- }
- public PageReference saverec() {
- insert opp;
- pagereference pr = new pagereference('https://c.ap6.visual.force.com/apex/Opp2');
- return pr;
- }
- public Pagereference editOpp()
- PageReference ref = new PageReference('/'+selectedAccId+'/e?retURL=%2F'+selectedAccId);
- return ref;
- }
- <apex:commandLink action="{!deleteOpp}" value="Delete"/>
- public List<Opportunity> Opp{get;set;}
- Public List<Opportunity> Opportunitylst{get;set;}
- public String selectedAccId {get;set;}
- delete Opportunitylst;
- return null;
- }
- public mycontroller1(){
- Opportunitylst=[select Name,AccountId,Amount,CloseDate,StageName from Opportunity order by createdDate DESC limit 10 ];
- }
- public Pagereference editOpp()
Add Comment
Please, Sign In to add comment