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
Apurva Dutta 8Apurva Dutta 8 

Recordtype selection page with the help of javascript

Hi Guys,

Need your hep and advice here. I have a custom button on Case object that has been overridden with a custom url. Also, earlier we had only 1 record type in Case. So, when a user click's the custom case button from Opportunity he is by default redirected to case creation page hence the solutions work flawlessly. But now we have introduced another record type in Case. So, the issue is whenever a user is clicking on the custom case button from opportunity, he doesnot get to select the record type and is re-directed to deflaut record type that is selected in in profile.

So, my doubt here is 

1. Can we write a javascript to update the code on the custom button to show the user the record type selection page.
2. After user selects the desired record type can we pass some information from opportunity to Case through javascript? 

Here is the code that exsitited before

/500/e?retURL=%2F500%2Fo

&cas4_lkid={!Account.Id}

&cas4={!Account.Name}

&00Nc00000014jDM={!Opportunity.Id}

&CF00Nc00000014jDC={!Opportunity.Name}

&CF00Nc00000014jGQ={!Opportunity.Amount}

&CF00Nc00000014Vww={!Opportunity.TDM_Program_Manager__c}

&CF00Nc0000001570L={!Opportunity.TDM_Publisher__c}

&CF00Nc00000014Vwr={!Opportunity.OwnerId}

&cas3_lkid={! NULLVALUE (Case.ContactId, Contact.Id )}

&cas3={! NULLVALUE (Case.Contact, Contact.Name )}

&retURL=/500/o
  
&saveURL=/500/o

Also, if you experts have any psuedu code for the same i would be really gratefull. 

Thanks A Lot.