Take the 2-minute tour ×

I'm building a CRM solution for a customer to replace their legacy Access databases. They have cases with case numbers that are referenced by external documents and want to keep them as the case number in CRM. I wrote a plugin that auto-increments and assigns case numbers when new cases are created and it works great. The problem is when I try to import their old data. I map their old case number field to the case number field in the import wizard but the imported cases get a new case number like PRE-12345-asdf.

Case number can't be updated by a workflow.

Ideally I'd like to be able to use the built in case number, but would I be losing out on any functionality if I just hid the built in case number field and added a custom field for it?

share|improve this question
The MSDN blog Case Number is Just the Ticket might be useful here. –  Peter Majeed Aug 29 '12 at 3:25
add comment

2 Answers

up vote 2 down vote accepted

You can create a custom field to track your own Case Number instead (in this case we just called it "casenumber").

On the Case Entity form onLoad event we put the following function that updates the Case Number shown in the Header area as well as the Page/Tab title to be our custom field:

function UseCustomCaseNumber()
var caseNumber = Xrm.Page.getAttribute("new_casenumber").getValue();
document.getElementById('form_title_div').childNodes[2].innerHTML = caseNumber;
parent.document.title = "Case: " + caseNumber + " - Microsoft Dynamics CRM";
share|improve this answer
add comment

The built-in case number cannot be overwritten. Hiding it and using your own field seems relatively common, and won't cause you any issues.

share|improve this answer
add comment

Your Answer


