[SalesForce] My Custom Button ( URL Hack ) doesn’t go through the record type selection

My custom button behaves differently from the standard new button.
It does work but it just bypasses the record type selection.

How do I make it behave like the standard one where the user needs to select the record type 1st before going to the record creation.

Here is my custom buttom syntax

/a0V/e?CF00N9E000000ibdI={!Account.Name}&CF00N9E000000ibdI_lkid={!Account.Id}&00N9E000000iblW={!Account.Address_Billing_Country__c}&retURL=/{!Account.Id}

Best Answer

In my dev org looking at the record type selection screen I see the following in my browser URL:

MY.DOMAIN.COM/setup/ui/recordtypeselect.jsp?ent=Account&retURL=%2F001%2Fo&save_new_url=%2F001%2Fe%3FretURL%3D%252F001%252Fo

The record edit page (post record type selection) displays the following URL in my browser:

MY.DOMAIN.COM/001/e?retURL=%2F001%2Fo&RecordType=012f10000004XTY&ent=Account

If you know what record type you're looking to create ahead of time you could include the RecordType parameter in you JS Button code along with the corresponding Record Type ID.

If you're looking to still have this the record type selection available to the user then it looks like you would first need to direct users to the /recordtypeselect.jsp with the corresponding parameters, and then forward users to object edit page.

Related Topic