Updating CRM Picklists via SSIS Script in C#

This took me a lot of figuring out… hopefully it will save you some time.

The problem was that I was trying to update contact fields that were of the “picklist” property in CRM. ( Basically a look up field ).

After much trial and error this is the code that works. Firstly though you need to figure out the index value of the picklist to update. Then here is the basic code.

{

var p = new Picklist();
p.Value = Row.yourfield;
p.name = “new_yourfield”;

cont.new_yourfield = p;

}

Rob StGeorge
Senior SQL Server Database Administrator residing in Auckland, NZ

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.