Hey guys,
Im having a lot of issues with Picklists in CRM 3.0 and was wondering
if anybody could help me out.
I have a C# app that is populating a bunch of accounts into CRM 3.0.
In my c# app i have a dataview and am looping through the dataview
items and generating accounts in CRM using CRM's WebServices.
(example code)
.....begin loop.....
account theAccount= new account();
theAccount.name =
dvTheCompanies[x].Row[1].ToString();
theAccount.new_firstname =
dvTheCompanies[x].Row[2].ToString();
theAccount.new_lastname =
dvTheCompanies[x].Row[3].ToString();
theAccount.new_jobtitle =
dvTheCompanies[x].Row[4].ToString();
theAccount.new_tsgteamassignment.name =
dvTheCompanies[x].Row[5].ToString(); //this fails here
Guid theAccountID = crmService.Create(theAccount);
....end loop....
debugging through my code everything works fine except the picklist,
which errors out with "Object reference not set to an instance of an
object."
so i tried theAccount.new_tsgteamassignment.Value = 2 but i get the
same error. My question is how do i create an account enitity in CRM
3.0 and populate the picklists inside that enitity?
Thanks for your help!