You need to sign in to do that
Don't have an account?
Felix Jong Seok Chae
create url of other cases in the new case
I collected a list of old cases relevant to a new case.
I saw 'related cases' under the cases tab and using apex trigger in the developer console,
I am trying to create links to those cases in the new case's related cases.
Can anyone know how to set this up?
I saw 'related cases' under the cases tab and using apex trigger in the developer console,
I am trying to create links to those cases in the new case's related cases.
Can anyone know how to set this up?
There are two ways of doing this I believe,
1) Using Developer Console and 2) Using Data Loader.
All Answers
Now, just update (using data loader) all the 'related cases' Parent Case field with the ID of the case you need to attach under to (or in other words ID of parent Case).
At a time, one case can have only one Parent Case only.
As far as getting Account Name field, you can go to the Edit Page Link from the case record layout and get it from the dialogue bix like below,
Just to remember that "Description" field won't appear in that dialogue box since its too long to be shown under the related list :)
Hope this helps mark it best if its solves the query!
You have let's say 50 old cases into your org and one new case let's say the name "New Case - 1." Now, you are trying to attach means you are trying to make all of these 50 old cases as a childs of this "New Case - 1." Correct?
If yes, then I would ask one question, Are these 50 cases already have value in Parent Case field? Means are they already a child of some other cases? If they are already a child of other cases (other than "New Case - 1") then you can not make them child for "New Case -1."
One case can have many child cases. But one case can have only one parent. It's like an opportunity, one opportunity can have only one account or one opportunity can be associated with one account only but one account can have multiple opportunities.
Now, if those 50 cases doesn't have any parent (means Parent Case field is blank) then you can easily make all of them a child of "New Case - 1" by using data loader.
Your excel file would have two columns only:
Id & Parent Case. In Id you will have all of these 50 cases IDs one by one and on Parent Case you will have ID of "New Case - 1" 50 times (each time in each row).
Hope this helps!
for (Case oldCase: oldCases) {
oldCase.ParentId = newCase.Id;
}
There are two ways of doing this I believe,
1) Using Developer Console and 2) Using Data Loader.
I also looked up all fields that may be associated with related cases field, but I couldn't find such field. Do you know the field for 'related cases'?
Thank you so very much for your help : - )