conorjgallagher / Dynamics.ExtendedSvcUtil

Extension of the CrmSvcUtil to allow more custom creation of early bound types
5 stars 2 forks source link

Dynamics.ExtendedSvcUtil

Extension of the CrmSvcUtil to allow more custom creation of early bound types. Latest version can be downloaded here.

Synopsis

This tool extends the CrmSvcUtil to provide the following features:

It utilises the CrmSvcUtil to achieve this as this. The version of the CrmSvcUtil used at time of writing this was the version included with CRM 2016. But the DLL can be rebuilt to work with older versions if required.

How to use

Latest stable version of the DLL can be downloaded here. Otherwise you must take a copy of the source locally and build it.

To configure to suit your specific needs within the application config you will see a sample schemaDefinition section. This has 2 sub sections for entities and option sets that allow you to specify the configuration for each. For example:

  <schemaDefinition entitiesFolder="..\EntityFiles" enumsFolder="..\EntityFiles" groupOptionSetsByEntity="true" exportAttributeNames="true">
    <entities>
      <!-- Attributes="all/specified" -->
      <entity name="adx_conference" friendlyName="Conference">
        <attributes>
          <attribute name="adx_name" friendlyName="Name" />
        </attributes>
      </entity>
      <entity name="adx_event" friendlyName="Meeting">
        <attributes>
          <attribute name="icm_arrangedby" friendlyName="ArrangedBy" />
        </attributes>
      </entity>
    </entities>
    <optionSets>
      <optionSet name="adx_event_adx_eventtype" friendlyName="Meeting_MeetingType" entity="adx_event" />
      <optionSet name="icm_adx_event_icm_arrangedby" friendlyName="Meeting_ArrangedBy" entity="adx_event" />
    </optionSets>
  </schemaDefinition>

The main points to note:

A sample command line use is:

CrmSvcUtil /url:http://[url]/[org]/XrmServices/2011/Organization.svc /out:sdk.cs /namespace:Namespace.Crm.Models /codewriterfilter:CodeGenerator.CodeWriterFilter,CodeGenerator /namingservice:CodeGenerator.NamingService,CodeGenerator /codecustomization:CodeGenerator.CodeCustomizationService,CodeGenerator

License

MIT Licence