function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Amanda Byrne- Carolina Tiger RescueAmanda Byrne- Carolina Tiger Rescue 

How do I bypass the Record Type selection screen with a custom button?

I'm trying to create a custom button that pre-populates an Opportunity with certain values.  I'd like to have the button go straight to the new opportunity screen, and bypass the Record Type selection screen.

I've poured through quite a few posts, and the advice is always add"&RecordType=RecordType.Id", but I already have that in the URL, and it doesn't seem to help.

URL I'm using:

Where am I going wrong?

Vishnu VaishnavVishnu Vaishnav
Hi Carolina,
Try this one..
example :

Qusetion Solved ? then mark as best answer to make helpful to others .....

Amanda Byrne- Carolina Tiger RescueAmanda Byrne- Carolina Tiger Rescue
Great! That worked!  Although it didn't work the first time I tried it with "006/e?RecordType=012A0000000r2ROIAY".  But I just needed to add the first forward slash: "/006/e?RecordType=012A0000000r2ROIAY"

I had copied the code from an existing managed button to create my custom one- so was it that "/setup/ui/recordtypeselect.jsp?
ent=Opportunity&recordtype=..." was pointing directly to the RecordType selection page and not a new Opportunity page?
Cyrus TalladenCyrus Talladen
I am confused with what you mean by selection page of the record.  Did you mean by saying selection you mean the viewing of the object record?  This sounds like a task for a controller with a custom visualforce page.  the page will display the record with the values that you specified from an existing record.  This is similar to clone where you are creating a new record.  But it sounds like you want control on the values that is being copied so I think the best solution is for you to create a new visualforce page that has a form that has fields that are already populated and some fields that are blank.  In the controller you will have to handle the Save and Back buttons.  In Salesforce this is one way of explicitly passing values from one existing record to a new record of the same type.  

Cyrus Talladen
CRM Engineer