Rss 2.0 via FEED

About...

Some of the code I have for importing data (from ACT! 2000) to MS CRM creates new 'PhoneCall' activities / objects. The problem is, that it seems MSCRM does not allow you to programmatically modify the 'create date'.

Here is the code I use...

phonecall pc

            CrmDateTime start = new CrmDateTime();

            start.Value = DateTime.Parse("10/08/2005 12:30");

            pc.actualstart = start;

            pc.scheduledstart = start;

            CrmDateTime end = new CrmDateTime();

            end.Value = DateTime.Parse("10/08/2005 14:30");

            pc.actualend = end;

            pc.scheduledend = end;

            pc.subject = "Phone call regarding sales of Widgets Q2/2005");
***

            string desc =  "Start    : " + pc.actualstart.Value + "\n";

            desc += "End       : " + pc.actualstart.Value + "\n\n";
***

            desc += "The details of the phone call go in here");

            pc.description = desc;

            pc.regardingobjectid = new Lookup();

            pc.regardingobjectid.type = EntityName.contact.ToString();

            Guid contactGuid = new Guid(guidOfContactWeTelephoned);

            pc.regardingobjectid.Value = contactGuid;

 

 

The actualstart and scheduledstart (and ends) get populated with the current datetime (this seems to happen if the time they are set to is in the past).

 

Note the two lines between the ***'s - this is my solution / workaround and simply include the start/end times as text in the body/description of the phone call object.

 

Share/Bookmark

Posted: Monday, August 20, 2007 2:07:39 PM (GMT Daylight Time, UTC+01:00)  #   Comments [0]
TAGS: .NET | C Sharp | Development | MSCRM | Software
All comments require the approval of the site owner before being displayed.
OpenID
Please login with either your OpenID above, or your details below.
Name
E-mail
(will show your gravatar icon)
Home page

Comment (Some html is allowed: a@href@title, b, blockquote@cite, em, i, strike, strong, sub, sup, u) where the @ means "attribute." For example, you can use <a href="" title=""> or <blockquote cite="Scott">.  

Live Comment Preview
Copyright © 2010 Ken Hughes. All rights reserved.

Creative Commons License
This work is licensed under a Creative Commons Attribution 2.0 UK: England & Wales License.