In this recipe, we will build a CrmSvcUtil
extension that generates a clean class file with a filtered set of option-set enumerations.
Just like the previous recipe, to create the extension you will need an IDE such as Visual Studio with .NET 4.5.2, a reference to the Microsoft.CrmSdk.CoreAssemblies
NuGet package, and a reference to the CrmSvcUtil.exe
executable. You can leverage the existing solution created in the previous recipe.
- Using the same solution used for the previous recipe, create a new class called
PacktOptionSetFiltering
with the following code:
using System; using System.Collections.Generic; using System.Linq; using Microsoft.Crm.Services.Utility; using Microsoft.Xrm.Sdk.Metadata; namespace Packt.Xrm.CrmSvcUtilExensions { public sealed class PacktOptionSetFiltering : ICodeWriterFilterService { private ICodeWriterFilterService DefaultService { get; } private Dictionary...