I am attempting to redirect the user back to a specific tab upon Save. I thought I had got it with this code, but I am unable to use a Return in the public void Save()
public void save()
{
System.debug('********************************' + names);
message = null ;
Boolean first = true;
for ( SelectOption so : selectedSubs ) {
if (first) {
message = message ;
}
message = message + ', ' + so.getValue() ;
first = false;
}
message=message.removeStart('null, ');
message='['+message+']';
System.debug('********************************' + message);
contract.Subsidiaries_On_Contract__c=message;
insert contract;
contract=new Contract_Overview__c ();
System.debug('********************************' + contract);
PageReference pr = new PageReference('/a23/o');
pr.setRedirect(true);
return pr;
}
}
The tab I am attempting to get back to is the /a23/o ;
Can anybody give some input on this ?
Thank you very much.