My adventures with Salesforce, Mathematics, and Google Glass.

Javascript Buttons to default record types via URL hacking

+ No comment yet
Here is a Custom Button to URL hack returning to the master record of a Master-Detail relationship whose child object has record types.This is much easier for child objects that don't have Record types. If you're doing this in a sandbox, you'll need to edit a few things:
1)update the ID on the 2nd line to the ID of the object you're trying to create.
2)The ID's of the Custom Fields that are being defaulted(Below they are):00Ng0000000LkCS and 00Ng0000000LkCS_lkid which are the Id's of the Name and Id fields on the Master respectively record. (Add "CF" prefix) The AHA moment is that you must URL encode the save_new_url parameter (which becomes the URL after you select the record type)

/setup/ui/recordtypeselect.jsp?
ent=01Ig00000004TjL&
retURL=/{!MASTER__C.Id}&
save_new_url=%2Fa1i%2Fe%3F
CF00Ng0000000LkCS%3D{!MASTER__C.Name}%26
CF00Ng0000000LkCS_lkid%3D{!MASTER__C.Id}%26
saveURL%3D%2F{!MASTER__C.Id}%26
retURL%3D%2F{!MASTER__C.Id}