How we can delete the wrong duplicate case while conserved the right one in the same device?
I know we can use the delcase (https://www.csprousers.org/help/CSPro/d ... ction.html) function to delete a case by ids, but what happens when we have a duplicate and we want to preserved the right and delete only the wrong?
Can CSPro tell us directly and easy the guid of the current case?
Can CSPro load a case (https://www.csprousers.org/help/CSPro/l ... ction.html) by the guid?
EdIt: I have an idea for the first question of delete a duplicate (https://www.csprousers.org/help/CSPro/s ... ction.html):
sqlquery(DICT_NAME, "UPDATE cases SET cases.deleted=1 WHERE cases.id = '1bb5465b-19a0-4866-8791-0cdc9fefcf5a';");
But that should not be the only solution or it will be? Anyway the other questions remain as a problem to me.
Thanks in advance...
CSPro have a good support for duplicate cases?
-
- Posts: 1796
- Joined: December 5th, 2011, 11:27 pm
- Location: Washington, DC
Re: CSPro have a good support for duplicate cases?
You can get case's UUID (once it's loaded) by doing this:
string case_uuid = uuid(DICT_NAME);
You can load a specific case using the UUID by using the locate function (starting with CSPro 7.4): https://www.csprousers.org/help/CSPro/l ... ction.htmllocate(DICT_NAME, uuid, case_uuid);
loadcase(DICT_NAME);
// delete this particular duplicate
delcase(DICT_NAME);
loadcase(DICT_NAME);
// delete this particular duplicate
delcase(DICT_NAME);
Re: CSPro have a good support for duplicate cases?
You can use the UUID function to get the UUID of the current case. You can also pass a UUID to the locate function to load a case by UUID. So if you know the UUID of the case you want to delete you can use locate and retrieve and to load and then declass to delete it. For example:
Another way to find duplicate cases is to use the set access statement with CaseStatus.Duplicate on an external dictionary in order to only load the duplicate cases.
Code: Select all
if locate(SIMPLECAPI_DICT, uuid, "55d27748-9ddf-48ff-9d3f-7447fc5cda5c") and retrieve(SIMPLECAPI_DICT) then
delcase(SIMPLECAPI_DICT);
endif;
Re: CSPro have a good support for duplicate cases?
Thanks both, that answer fully my questions. CSPro have a good support for duplicate starting with CSPro 7.4.
was the useful addition that I didn't know.
Regards.
Code: Select all
locate(DICT_NAME, uuid, case_uuid);
Regards.