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
Sarah RobertsonSarah Robertson 

Help with setting up a button on the opportunity to create a case

Hi 

I'm trying to set up a button on the opportunity page which opens a new case but preselects a particular record type for cases  ('UK Sales Engagement'). 

I have this but it's not working, any ideas where I'm going wrong ? 

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

&cas4_lkid={!Account.Id} 
&cas4={!Account.Name} 
&00Nw0000008rJRa_lkid={!Account.Id} 
&00Nw0000008rJRa={!Account.Messina_Short_Name__c} 
&CF00Nw0000008rJRp_lkid={!Opportunity.Id} 
&CF00Nw0000008rJRp={!Opportunity.Name} 
&00Nw0000008rJRB_lkid={!Opportunity.Id} 
&00Nw0000008rJRB={!Opportunity.ARV_Churn__c} 
&00Nw0000008rJRk_lkid={!Opportunity.Id} 
&00Nw0000008rJRk={!Opportunity.TCVP_New_del__c} 
&00Nw0000008rJS4_lkid={!Opportunity.Id} 
&00Nw0000008rJS4={!Opportunity.UK_TCVP_re_contract__c} 
&{!Case.RecordType}='UK Sales Engagement' 
&retURL=/{!Opportunity.Id} 
&saveURL=/{!Opportunity.Id}



Thanks very much 

Sarah 

Best Answer chosen by Sarah Robertson
Arshadulla.ShariffArshadulla.Shariff
Hello Sarah,

Trying changing your code with bellow code.
&cas4_lkid={!Account.Id} 
&cas4={!Account.Name} 
&00Nw0000008rJRa_lkid={!Account.Id} 
&00Nw0000008rJRa={!Account.Messina_Short_Name__c} 
&CF00Nw0000008rJRp_lkid={!Opportunity.Id} 
&CF00Nw0000008rJRp={!Opportunity.Name} 
&00Nw0000008rJRB_lkid={!Opportunity.Id} 
&00Nw0000008rJRB={!Opportunity.ARV_Churn__c} 
&00Nw0000008rJRk_lkid={!Opportunity.Id} 
&00Nw0000008rJRk={!Opportunity.TCVP_New_del__c} 
&00Nw0000008rJS4_lkid={!Opportunity.Id} 
&00Nw0000008rJS4={!Opportunity.UK_TCVP_re_contract__c} 
&RecordType=//RecordTypeId of Case 
&retURL=/{!Opportunity.Id} 
&saveURL=/{!Opportunity.Id}

I hope if this helps you. please mark it solved .
Thanks 

All Answers

Arshadulla.ShariffArshadulla.Shariff
Hello Sarah,

Trying changing your code with bellow code.
&cas4_lkid={!Account.Id} 
&cas4={!Account.Name} 
&00Nw0000008rJRa_lkid={!Account.Id} 
&00Nw0000008rJRa={!Account.Messina_Short_Name__c} 
&CF00Nw0000008rJRp_lkid={!Opportunity.Id} 
&CF00Nw0000008rJRp={!Opportunity.Name} 
&00Nw0000008rJRB_lkid={!Opportunity.Id} 
&00Nw0000008rJRB={!Opportunity.ARV_Churn__c} 
&00Nw0000008rJRk_lkid={!Opportunity.Id} 
&00Nw0000008rJRk={!Opportunity.TCVP_New_del__c} 
&00Nw0000008rJS4_lkid={!Opportunity.Id} 
&00Nw0000008rJS4={!Opportunity.UK_TCVP_re_contract__c} 
&RecordType=//RecordTypeId of Case 
&retURL=/{!Opportunity.Id} 
&saveURL=/{!Opportunity.Id}

I hope if this helps you. please mark it solved .
Thanks 
This was selected as the best answer
Sarah RobertsonSarah Robertson
Thank you Arshadulla that worked perfectly !