You need to sign in to do that
Don't have an account?

Save & new OR Save and display saved record controller
Hi,
Am in the unenviable position of trying to edit someone elses code. They have made a Save and Exit controller that saves on a Visualforce page and exits to the custom object list screen.
What I want to do is create a couple of variants.
1) Save & New
2) Save and display saved record
This is what I have so far
public pagereference mySave() { pcmAct = (PCM_Time_Record__c)stdCtrl.getRecord(); if(pcmAct.type__c == '121 Call') { for(PCM_Activity_Attendee__c a:attendees) { a.one_to_one__c = true; } } update attendees; pagereference savepage = stdCtrl.save(); return savepage; }
What can I do to amend this?
The "save and new" variant could simply call "mySave()" directly, check to see if the return value was null, and if not, then return them to a new record page.