DEPRECATED: Starting with SSIS+ 1.9, the .NET scripts are no longer maintained. Use the provided JavaScript alternative scripts instead.
Average: 5 (1 vote)


Data flow transformation to handle translation and creation (if needed) of Dynamics CRM OptionSet values.


The script has the following parameters:

  • CrmConnection - selects Dynamics CRM Connection.
  • Entity - selects Dynamics CRM entity type.
  • Attribute - select OptionSet attribute you want to manage.
  • LabelColumn - select input column containing OptionSet label.
  • ValueColumn - select input column containing OptionSet value.
  • Mapping - select variable containing optional label mapping dictionary. The dictionary can be a string, ADO Recordset object or ADO.NET DataSet object.
  • Action - select action to perform when input OptionSet label doesn't match existing values. The following options are available:
    • Create - specifies to create new OptionSet. The value for OptionSet is retrieved from ValueColumn.
    • Replace - specifies to replace ValueColumn with the value provided in ReplaceValue parameter.
    • Nullify - specifies to nullify ValueColumn.
    • Ignore - specifies to ignore no match value.
    • RaiseError - specifies to raise error.
  • StateCodeColumn - select input column containing state code. This parameters only if No Match Action is set to Create and the OptionSet attribute is set to statuscode.
  • ReplaceValue - specifies replace value when No Match Action is set to Replace.


Depends on COZYROC Script Component Plus component for implementing parameters user interface.
Requires installation of COZYROC SSIS+ 1.6 library.

Library references

  • System
  • System.Data
  • Microsoft.SqlServer.TxScript
  • Microsoft.SqlServer.PipelineHost
  • Microsoft.SqlServer.DTSPipelineWrap
  • Microsoft.SqlServer.DTSRuntimeWrap
  • Microsoft.SqlServer.ManagedDTS
  • CozyRoc.SSISPlus
  • adodb
  • CozyRoc.Dynamics
  • System.Web.Services
  • System.XML