In Microsoft Dynamics CRM, customer service representative creates a case to track a customer request, question, or a problem. All actions and communications can be tracked in the case entity.

Case entity has Case ID field and the value of this field can be customized as per the requirements.

Default Case ID in Microsoft Dynamics CRM is shown below. The System Administrator have limited control on automatic generation of these Case ID using Settings-> Administration -> Auto-Numbering dialog appears.

1

The default Case ID generated is divided into 3 parts.

  1. Prefix- It can be set by user.
  2. Counter- Cannot be changed, incremented when new case is created.
  3. Suffix- Length can be set and it is generated automatically.

2

The changes you make will be reflected in new cases created. The existing Case ID’s will not change.

3

Different approaches for generating Auto Number for Cases:

  1. Requirement is end-users enter custom Case ID while creating new cases.
  2. Requirement when custom ID generated automatically when creating new cases.

 
1. Requirement is end-users enter custom ID while creating new cases.

  1. Initially the ID field will be locked. Go to Form Editor and uncheck Field read-only.
  2. Now the user can enter custom value in ID field while creating the case.
  3. Once the case is saved, ID field is again locked and now user cannot change the ID.

4

If user is trying to create case with same Case ID for example:

Here user enters same Case ID CSN-1 and when user saves this case the default Case ID is generated. Duplicate Case ID cannot be generated so Case ID is populated with default ID.

5

 
6

The result is that users can now enter custom numbers when creating cases and system will generate the number if user does not enter one and if duplicate Case ID is entered.

2. Requirement when custom Case ID generated automatically when creating new cases.

  1. If you are thinking of generating Case ID using workflows then it is not possible. When you try to update ID field then it is not possible as lock is present on the field.

7

  • The best approach for generating custom Auto Number for cases is Plug-in. Create a synchronous pre create plugin.
    We can consider an example where case number is generated through plugin.

Requirement is to create Case Number with respect to the account selected. Whenever a new case is created on that particular account counter increases.
 
For Example:

First case is generated with XYZ account and account XYZ has account number xx

Case Number for the First case: xx-001

Second case is generated for same Account XYZ.

Case Number for the Second case: xx-002

Case is generated with MNP account and account has account number yy.

Case Number for the First case: yy-001

Below logic can be followed

8

 
9

While creating case with account Anay Industries

10

Case ID generated is 3-002 that means for Account Anay Industries 2nd case is been generated.

Plug in is the most preferable way to generate auto number as per the requirement.

The post Custom generation of Case Number appeared first on CloudFronts - Microsoft CRM | AX | BI | Azure.