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
Mr SlingMr Sling 

Custom case button that doesn't skip "Select Case Record Type" screen?

Hey there,

 

We're building a new Case Custom Button (available in a related list from the Product detail page) but when it's used it's skipping the Select Case Record Type screen.

 

I've seen a bunch of posts advising people on how to create VF pages to skip the Select Case Record Type screen, but we seem to have the opposite problem.

 

Here's our code, just in case:

 

/500/e?cas3={!CustomProduct__c.Customer_Account__c}&cas3_lkid={!CustomProduct__c.Customer_AccountId__c}&retURL=%2F{!CustomProduct__c.Customer_AccountId__c}

Any idears?  Thanks! 

Best Answer chosen by Admin (Salesforce Developers) 
werewolfwerewolf
The trick is to mimic the URL that the normal button goes to, and add your parameters after that...

All Answers

werewolfwerewolf
The trick is to mimic the URL that the normal button goes to, and add your parameters after that...
This was selected as the best answer
Mr SlingMr Sling

Thanks for the reply - I wasn't thinking logically.  The simple answer is always the best.  Doh.

 

For the record, here's what I ended up doing:

 

/setup/ui/recordtypeselect.jsp?ent=Case&save_new_url=/500/e?CF00N40000001fxqY={!CustomProduct__c.Name}&CF00N40000001fxqY_lkid={! CustomProduct__c.Id}&def_account_id={! CustomProduct__c.Customer_AccountId__c}&retURL=/{!CustomProduct__c.Id}

It's this part "/setup/ui/recordtypeselect.jsp?ent=Case&save_new_url=" where the magic happens!

 

Thanks again, Werewolf!