Thank you for the suggestion. Is there someone that can help me get this into our sandbox ? I've never done this type of coding. Or is there an article? Plus we need to add another criteria: Record type = 'End client'.
Cathie Donohue | Sales Support Specialist II, MPAY Inc.| o 704-900-0338
Thanks for suggesting good approach but please make sure will that new record get saved properly or not ? because I doubt newly clonned record will not get saved with same case number which other case is already having.
We have successfully created the custom button in the case object. Now we need the attachments from the original case to copy to new case. I heard that this can be done via "trigger". The info below is the url content source. Can this be done?
We are in need of the case attachements to copy over to the newly cloned case. This is a custom button built with your suggestion. Can you please respond?
then it is fine.. Thanks for clarification.
All Answers
If you wanna populate the parent Case number on a cloned case field try the below approach :-
/{!Case.Id}/e?clone=1&00N80000002voCf={!Case.CaseNumber}
Where the 00N80000002voCf is the field id
Cathie Donohue | Sales Support Specialist II, MPAY Inc.| o 704-900-0338
Try following the below mentioned steps -)
1. Create a custom text field on the case object to capture the parent clone case number.
2. Create a Visualforce page as shown below
<apex:page standardController="Case" extensions="CloneCaseController" action="{!redirect}" >
</apex:page>
3. Modify your extensions code as below
public class CloneCaseController {
public CloneCaseController(ApexPages.StandardController controller) {
}
public PageReference redirect(){
String Id = ApexPages.CurrentPage().getParameters().get('id');
PageReference pageref;
Case c = [select Id, CaseNumber from Case where Id = :Id limit 1];
pageref = new PageReference('/'+Id+'/e?clone=1&retURL=%2F'+Id+'&00Ni0000008O7dq='+c.CaseNumber+'&RecordType='+EndClient Id+'&nooverride=1');
return pageref;
}
}
If you still needed help with implementing it, kindly reach me at redoxmsec@gmail.com
In the above post
pageref = new PageReference('/'+Id+'/e?clone=1&retURL=%2F'+Id+'&00Ni0000008O7dq='+c.CaseNumber+'&RecordType='+EndClient Id+'&nooverride=1');
the bold id is the new field id which was created to capture the case Number.
Missed one more step in the above post
.. :(
4. Override the standard Clone button with the above mentioned VF page.
Thanks for suggesting good approach but please make sure will that new record get saved properly or not ? because I doubt newly clonned record will not get saved with same case number which other case is already having.
Cathie Donohue | Sales Support Specialist II, MPAY Inc.| o 704-900-0338
then it is fine.. Thanks for clarification.
We have successfully created the custom button in the case object. Now we need the attachments from the original case to copy to new case. I heard that this can be done via "trigger". The info below is the url content source. Can this be done?
https://mpay.force.com/PartnerPortal/{!Case.Id}/e?clone=1&00N3000000BiccE={!Case.CaseNumber}&CF{!Case.AccountId}_lkid=&CF{!Case.ContactId}_lkid=&CF{!Case.AccountId}=&CF{!Case.ContactId}=
We are in need of the case attachements to copy over to the newly cloned case. This is a custom button built with your suggestion. Can you please respond?
https://mpay.force.com/PartnerPortal/{!Case.Id}/e?clone=1&00N3000000BiccE={!Case.CaseNumber}&CF{!Case.AccountId}_lkid=&CF{!Case.ContactId}_lkid=&CF{!Case.AccountId}=&CF{!Case.ContactId}=