I have created a Visualforce Page to redirect users to Task's record type selection screen.The user selects a record type then the corresponding page layout opens where the user fills the data and once he clicks on Save, the page should redirect user back to the record type selection screen.
I am able to create the Task but once task is created i am redirected to the home screen.I need to redirect back to the record type selection page
Below is my VF page:
<apex:page controller="testctlr">
<apex:form>
<apex:commandButton value="Create Task" action="{!taskcreate}" />
</apex:form>
</apex:page>
Below is its controller:
public class testctlr{
public Pagereference taskcreate(){
return new PageReference('/setup/ui/recordtypeselect.jsp?ent=Task&nooverride=1&save_new_url=%2F00T%2Fe');
}
}