Auto Number Id Generation for Any Entity using Plugin
In Microsoft dynamics, we have auto generated id for the case, quote and for some other. Like that if u want to generate any auto generate id then follow this post, you can achieve this easily. Before going this post, you must have idea on shared variables and also crud operation by using plugin. We will discuss detailly. For the auto number generation, we required one backup entity to store the number. and one more entity to generate id. In My Scenario, I am using opportunity entity for id generation and configuration for the backup entity. I am triggering my plugin on creation of opportunity entity. If any record is created at that time I need to generate id for the each record without duplication. I am creating two plugins for my scenario. Step1: Add the one class library project in visual studio Step2: Install the nugget packages for the project like crm. sdk Step: Add the common code to plugin. Follow the below code for the auto generation using Microsoft.Crm.Sdk.Messages;