locked
CRM 2011 Issue in CrmDateTime RRS feed

  • Question

  • I have an issue that the CRMDateTime doesn't save the .time and .date values anymore.

     

    When i upgrade my system to CRM 2011, my applications suddenly crashed, after investigating i found that the .date and .time fields of the CRMDateTime are not filled in CRM 2011 anymore.

     

    Can anyone help, I know 2 answers either to use the .Value and parse it to DateTime, or to use the new methods/web service, but i can't do any of them since it's a huge project relying completely on the service scheduling, so i'd rather fix the issue with no code changes.

    Monday, June 13, 2011 7:42 PM

Answers

All replies

  • Hi,

    I am not clear on what your custom applications do or which date fields you are having trouble with but another option for you if you need to parse date fields using custom workflow activities is the 'CRM Manipulation Library' that is free on codeplex: http://manipulationlibrary.codeplex.com/

    Rob


    Microsoft Certified Technology Specialist (CRM) GAP Consulting Ltd.
    Monday, June 13, 2011 8:04 PM
    Answerer
  • CrmDateTime has been converted to System.DateTime in CRM 2011. Can you give us more details, especially what you mean by "i found that the .date and .time fields of the CRMDateTime are not filled in CRM 2011 anymore". Are you talking about a plugin in which you use those values?

    Gonzalo | gonzaloruizcrm.blogspot.com

    Monday, June 13, 2011 8:15 PM
    Moderator
  • Sorry If i was a little unclear, I'm retrieving the AppoinmentProposal List and the list has Start and End, which is the Start Date and End Date, these are of type CrmDateTime, the CRMDateTime consists of 3 main fields, Value (retrieves the complete date time), date (retrieves the date portion only) and time (retrieves the time portion only). In CRM 4 all these fields were filled, in CRM 2011 the Value field is filled, but the date and time fields are not, please advise
    Tuesday, June 14, 2011 6:14 AM
  • Hi,

    In CRM 2011 now there is no special data type CrmDateTime is available for DateTime fields. In .Net code you have to use the standard DateTime data type to store the CRM DateTime field value and it does not have any longer .time and .date values properties.

    I hope this answers yoru question.


    Jehanzeb Javeed

    http://worldofdynamics.blogspot.com
    Linked-In Profile |CodePlex Profile

    If you find this post helpful then please "Vote as Helpful" and "Mark As Answer".
    Tuesday, June 14, 2011 7:06 AM
  • See the DateTime sctructure documentation on how you can access various members. http://msdn.microsoft.com/en-us/library/system.datetime_properties.aspx

    As mentioned earlier, CrmDateTime is no longer used in CRM 2011


    Gonzalo | gonzaloruizcrm.blogspot.com

    Tuesday, June 14, 2011 12:49 PM
    Moderator
  • I know the new DateTime, but shouldn't everything be backward compatible so that i can have a working version as soon as I upgrade?
    Sunday, June 19, 2011 6:21 AM