Wednesday, February 16, 2011

Date Validation is SSIS

I needed to import a large amount of data from an Access database and the standard SQL Server Management Studio would fail when it ran into a record with a bad date.  I ended up saving the import as an SSIS package (file system) and then editing the DTSX file.  I was able to override bad dates to Null by adding a Derived Column with a date validation that replaced the existing column in the dataset. 

Full SSIS validation expression:


((DT_Date)Date_to_validate < (DT_DATE)"1753-1-1") ? NULL(DT_DATE) : (DT_Date)Date_to_validate

Thursday, February 10, 2011

CRM Outlook Client Error "input string was not in a correct format"


I ran into an issue with the CRM Outlook client configuration wizard that turned out to be a quick registry edit:


Set sPositiveSign to “+” at


HKEY_CURRENT_USER.Control Panel.International


Make sure to update the Default and all profiles under HKEY_USERS if the person running RegEdit is not the actual user (e.g. a desktop support person)

Wednesday, February 2, 2011

Automate your CRM Plugin deployment using the PluginDeveloper

Automating the Plugin deployment process has helped our team reduce errors and speed
up the development and debugging of our custom plugins and workflows.  Using
a combination of the PluginDeveloper included in the SDK (<sdk install>\tools\plugindeveloper\),
a batch file, and
configuring an external tool in Visual Studio allows our CRM build manager to deploy
plugins to Dev, Test or Production directly from Visual Studio.

Our team uses separate register.xml files for Dev, Test and Prod that are
set in Visual Studio to Copy always in the Copy to Output Directory
in the Visual Studio’s File Properties window.  The batch file copies
the project’s output directory to the PluginDeveloper’s directory and
prompts the user to select which environment to deploy to.

Build the PluginDeveloper Executable

1.      Follow the Readme.doc in the project root.

2.      Copy the RunPD.bat file to the PluginDeveloper.exe’s
location (we use a common file system path \CRM\tools\PluginDeveloper)

Configuring Visual Studio’s External Tools

1.      Select the Tools – External Tools …

2.      Click Add and enter the details for the batch file

a.      For Arguments specify $(BinDir) for select Binary
from the options

Create register.xml Files for Each CRM Environment

1.      The batch file expects to find files named:

a.      DEV register.xml

b.     TEST register.xml

c.      register.xml

Running the Tool from Visual Studio

1.      Select Tools – Run Plugin Developer

2.      At the menu, type 1,2 or 3 for the desired environment and
press Enter

3.      Enter password when prompted

*Credit goes to for
the menu framework