+ Start a Discussion
BrokenBirdBrokenBird 

Save on Edit goes back to list

I have overriden the View button of a custom object to load a custom edit form directly instead of going throught the normal view->edit mode. In this form I created a controller extension where I have a mysave method, which the forms calls instead of save, in this method I want to call the basecontroller save and go back to the list.

 

I found out how to save, but I can't find how to go back to the list of items.

 

I already spent 3 hours on this and I am about to throw the !@###$@ computer thru the window, please help!

china.leafchina.leaf

    public PageReference save(){
            Task fobjTask = new Task(Subject = 'Go back after save');
             insert fobjTask;
             PageReference fobjPr = new PageReference('/' + fobjTask.Id);
             fobjPr.setRedirect(true);
             return fobjPr;
    }

Message Edited by china.leaf on 05-21-2009 04:11 AM
BrokenBirdBrokenBird
Sorry, but I am not trying to open a record form, I am trying to go back to its main list.
Message Edited by BrokenBird on 05-21-2009 07:07 AM
BrokenBirdBrokenBird

I am currently using the following:

 

 

public PageReference mysave() { baseController.save(); PageReference pageRef = new PageReference('/servlet/servlet.Integration?lid=01r800000003iF1&ic=1'); return pageRef; }

 

This works, however will it work when deployed as a managed application to a customer?