[SalesForce] By Pass RecordType selection when creating new Case

I create one link named Submit Case to bring the user to the new Case.The requirement is user do not want to go through RecordType selection, they want the link bring them to the new Case page with prepopulated RecordType value.

I try to refer to this Avoid record type selection with URL button , but it still bring me to the Recordtype selection with prepopulated value, but still user needs to click 'Continue' to go to New Case page.Ya, I know sometimes user can be lazy =)

I put the link in custom visual force page like this

<apex:outputLink value="{!URLFOR($Action.Case.NewCase,null,[p3='01230000000xP1j',save=1],true)}">Submit Case</apex:outputLink>

It still display RecordType selection page.Now I wonder, is it doable to skip RecordType and directly go to new Case with prepopulated RecordType value?In case it is not doable, please provide me any documentation so I can inform the user.

Thanks a lot.

Best Answer

One way to do it is to manually walk through the selection of a recordType then grabbing the URL from the Case landing page and identifying the parameters used there:

https://instance.salesforce.com/500/e?retURL=%2F001i0000002MX2z&def_account_id=001i0000002MX2z&RecordType=012i0000001ELIz&ent=Case  

The example you have above is using p3 but I believe that is used for custom objects, you should be using RecordType instead.

Also, save=1 doesn't work without specifically asking SalesForce to disable a security feature, see docs here.

Here is a blog on another way of accomplishing this task using the url vs urlfor.

Related Topic