Posts

Showing posts from January, 2022

Generate case title custom value in dynamic crm

Image
Link: https://youtu.be/bisoBaAFIXc  You can also check the video on youtube. Scenario : Once you click on new case. case title should be populate as "2020-01-0001". 2020 is the present year and 01 is the current month and 0001 is the number of case is created. Create one filed called "currentNumber(data type as a single line of text)" in configuration setting entity. using Microsoft.Xrm.Sdk; using Microsoft.Xrm.Sdk.Query; using System; using System.Collections.Generic; using System.Globalization; using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; namespace AutoNumberExample {     public class CaseAutonumber : IPlugin     {       public void Execute(IServiceProvider serviceProvider)         {             try             {                 IPluginExecutionContext context = (IPluginExecutionContext)serviceProvider.GetService(typeof(IPluginExecutionContext));                 if (context.InputParameters.Contains("Target")