I am overriding the New button of a custom object using a Visualforce page. Now this vf page's controller does some calculation based on a criteria and assigns a record type to the newly created custom object, save the custom object and redirects the user to the newly created record.
However if the criteria is not met I want to send the user to the standard record type selection page, where they will select a record type and it will redirect them back to this same page where the code will read the selected record type, create a new record and then redirect the users to the new record page.
I am successfully able to redirect the user to the standard record type selection page using this url :
However after selecting the record type I am not able to redirect them back to the vf page with the selected record type id.
I figured I needed the save_new_url parameter or I updated the link to
But its still not working. What am I missing here?