+ Start a Discussion
David JobeDavid Jobe 

code to remove contact from case

I am building a custom button that is to clone the case details, change the record type, and now they would like to remove the Contract reference field. I can't seem to get it to take. here is what I have built.

/{!Case.Id}/e?RecordType=0124C000000GrXz&{!Case.ParentId}={!Case.Id}&clone=1&cas28={!Case.CaseNumber}&cas14={!Case.Subject}&{!Case.ContactId}=NULL

 

I've also tried change NULL to a blank space, or even " ", but none seem to be able to remove the contact info.

Any assistance would be appreciated.

Best Answer chosen by David Jobe
Alain CabonAlain Cabon
Hi,

cas3 = Contact.Name
This takes the contact name from your current case and puts it in the related case.

cas3_lkid = Contact.Id
This passes the contact id to your lookup filter. 

https://success.salesforce.com/answers?id=90630000000h2ooAAA ​

/{!Case.Id}/e?clone=1& 
retURL=%2F{!Case.Id}& 
cas11={!Case.Origin}& 
cas3_lkid={!Case.ContactId}& 
00N30000000eJeT={!Case.Contact_Title__c}& 
00N60000002yJIZ={!Case.Preferred_Phone__c}& 
00N60000002yJIX={!Case.Preferred_Email__c}& 
00N32000002x5PJ={!Case.Region__c}& 
00N60000002HtUs={!Case.Solution__c}& 
00N60000001Q8qz={!Case.Product__c}& 
00N60000001mOZA={!Case.Category__c}& 
00N60000002yJIf={!Case.Sub_Category__c}& 
cas5={!Case.Type}& 
00N60000002yq4w={!Case.Client_Browser__c}& 
cas14={!Case.Subject}& 
cas15={!Case.Description}& 
cas8={!TEXT(Case.Priority)}

https://success.salesforce.com/answers?id=9063A0000019PKcQAM
 

All Answers

Alain CabonAlain Cabon
Hi,

cas3 = Contact.Name
This takes the contact name from your current case and puts it in the related case.

cas3_lkid = Contact.Id
This passes the contact id to your lookup filter. 

https://success.salesforce.com/answers?id=90630000000h2ooAAA ​

/{!Case.Id}/e?clone=1& 
retURL=%2F{!Case.Id}& 
cas11={!Case.Origin}& 
cas3_lkid={!Case.ContactId}& 
00N30000000eJeT={!Case.Contact_Title__c}& 
00N60000002yJIZ={!Case.Preferred_Phone__c}& 
00N60000002yJIX={!Case.Preferred_Email__c}& 
00N32000002x5PJ={!Case.Region__c}& 
00N60000002HtUs={!Case.Solution__c}& 
00N60000001Q8qz={!Case.Product__c}& 
00N60000001mOZA={!Case.Category__c}& 
00N60000002yJIf={!Case.Sub_Category__c}& 
cas5={!Case.Type}& 
00N60000002yq4w={!Case.Client_Browser__c}& 
cas14={!Case.Subject}& 
cas15={!Case.Description}& 
cas8={!TEXT(Case.Priority)}

https://success.salesforce.com/answers?id=9063A0000019PKcQAM
 
This was selected as the best answer
David JobeDavid Jobe
Thank you! That is exactly what I needed!