Hello,
I have an application that interacts with MSCRM 4.0. When I try
to update the date of birth field on a contact I get an error message every time. The error is different every time I try a new way... So the question is in the context of the following code how do I update the BirthDay on the new contact I am about to create?
Thanks!
///////////
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using ProjectName.CrmSdk;
//The CrmSdk ref is to the webservice url.
//ServerName and OrgName are setup in code but not included.
//standard CRM service setup
CrmSdk.CrmAuthenticationToken token = new CrmSdk.CrmAuthenticationToken();
token.AuthenticationType = 0; //AD on premise
token.OrganizationName = orgName.ToString();
CrmService service = new CrmService();
service.Url = "http://" + serverName.ToString() + "/mscrmservices/2007/crmservice.asmx";
service.CrmAuthenticationTokenValue = token;
service.Credentials = System.Net.CredentialCache.DefaultCredentials;
DateTime dt = new DateTime();
// set the date time to some date...
contact c = new contact();
c.firstname = "joe";
c.lastname = "Smack";
c.BirthDay = dt.ToString();