locked
CrmDateTime RRS feed

  • Question

  • public static readonly DependencyProperty DelayDaysProperty =
              DependencyProperty.Register("DelayDays", typeof(CrmDateTime), typeof(Activity1));
    
            [CrmOutput("Delay Days")]
            public CrmDateTime DelayDays
            {
                get { return (CrmDateTime)GetValue(DelayDaysProperty); }
                set { SetValue(DelayDaysProperty, value); }
            }
    
    
    ...
    .
    .
    ..
    .
    .
     protected override ActivityExecutionStatus Execute(ActivityExecutionContext executionContext)
            {
    this.DelayDays = new CrmDateTime(DateTime.Now.AddMinutes
    (1)).ToShortDateString());
    {"CrmDateTime must be initialized in one of the following formats: yyyy/MM/ddTHH:mm:ss[+-]aa:bb or yyyy/MM/ddTHH:mm:ssZ"}
    what i have to do?



    foreach(object HeartBeat in me.heart.Beats) messageBox.show("I miss u !!")
    Monday, August 17, 2009 3:56 PM

Answers

  • Use crmTypes Functions as follows to set the crm Date time


    this.DelayDays = CrmTypes.CreateCrmDateTimeFromUser(System.DateTime.Now.AddMinutes(1));


    hope this works..let me know
    Monday, August 17, 2009 4:26 PM