DO NOT DO THIS.
There are numerous tables that relate to the case number, you will end up in a right old mess. How do I know…a short story ensues.
A short story about a naïve Epicor Administrator I once knew (some may even say that they still are, but you never stop learning).
We had situation with Epicor 9 that CRMs during the quote process would, instead of searching for a customer contact, they would enter in the contacts name and then just blindly accept the “Do you wish to create a new contact with this name” prompt. Epicor allows contacts with the same name, it just creates a new contact number behind the scenes…
Several months go on and Support start contacting me…er the administrator, about weird behaviour in case management. When they go to select a contact there are duplicates, and that some cases are against one contact with the same name and other cases being with the other contact… People are not happy, all related case should relate to the one contact, quotes too. This shouldn’t be too hard one says. Needless to say many hours later they have gone through all the tables and work out how the contacts related to the Cases, and get it cleaned up. It was a serious pain. In hindsight they should have reached out to Epicor for a data fix. Sadly the problem kept on happening and kept on having to be fixed, until one day, They happened to be helping a CRM with a problem creating a quote and watching their process…Like a lightning bolt, there it was, the exact situation that was causing the duplicate name, but different contact num.
What did they learn. Simply updating what seems to be a master transaction table sounds kind of ok on the face of it, but it’s all the foreign keys you need to be wary off. The way case management in Epicor from a technical stand point is not that well documented.
Using the UD field is a sensible approach and using a quick search to add in the sugar CRM case number is the simplest.
For your information the next sequence number for the HDCase is the erp.KeyLast table. So it theoretically could be done by changing the BlockLastValue to a number greater than your last Sugar CRM HDCase, then in DMT put in your SugarCRM case number in the DMT HDCaseNum field. This would be the maximum I would do if I were to want to attempt to import the Sugar CRM case numbers as Epicor Case numbers. This suggestion comes with no warranty, so test it in your test system if you are game.
Just an additional point on @aosemwengie1 comment, if you import case numbers that have the potential to conflict with the current Case sequence, you could run into a Primary key error as Epicor tries to increase the sequence automatically when you add a new case. This is because a case with the same number as the newly generated case number already exists in the table. I have seen this happen on sales orders when people forget to set the next order number in company maintenance after performing an open order load.
I hope all this information helps. Please don’t just update in the unsanctioned way you suggested. In the end you will cry.
Coincidently the Sugar CRM CEO used to be an Epicor VP for Australia, how ironic.
EDIT… Quick test on updating the LastBlockValue to 100 from 7. Creating a new case the new case number turned out to be 101 on save.