I have a custom button that skips the record type selection screen. I'd like the Save and New button on the entry screen to also skip the record type selection screen. Is there a way to pass in parameters on the first button that will affect the behavior of the Save and New button?
You can use a technique referred to as "URL Hacking" to accomplish this.
The idea behind URL hacking is that when you're writing a button, or a link -- anything with a URL, you can pre-populate certain fields with data from the URL itself.
First, a little background. Forms -- those bits of a web page that accept information from a user have two general ways of transmitting that data back to the server. 1: POST DATA, this is the more advanced but more common data transmission method as it allows for things like file uploads, and much larger forms. 2: URL Parameters, This is where each form variable is HTML Encoded and appended in a key=value format to the URL. You've no doubt seen this where the URL's look like:
In general, while not officially supported, most salesforce pages will accept inputs through URL parameters OR POST Data. Thus, if you know the key of the data you want to set, you can set that data via a custom button by appending that key=data bit to the url. There are a couple of considerations to keep in mind, however. 1: The first key,value pair is demarcated from the page url with a '?'. After the first key,value pair, all others are separated by '&' signs. Remember that url example from above? note that the id=123 has a ? before it, but variable1 and variable2 both have &'s in front.
Now the hardest part of this is often discovering what the name of the KEY is. Truth is, you can always find it from reading the source, but that is often an exercise in mind numbing frustration. HTML is too <<< >>> pointy.
So if you've read this far -- Congratulations, you know the theory behind what you want to do. Bored yet? In the end what you want to is create a button that has a url something like