locked
CrmDateTime Problem RRS feed

  • Question

  • I don"t know why when i add this Line Code " send = dta.AddMonths(18);"

     

    I don"t See any Record that Create AND I don"t get any Errror at srv.Create (myphonecall);

     

    if i delete  " send = dta.AddMonths(18);"  its create the record with the crm but date eq to Now

     

    How Can Add 18 AddMonths???????

     

    ////////////////////MY CODE///////////////////////////////////////

    DateTime dta = new DateTime();

    DateTime send = new DateTime();

    dta = DateTime.Now;

    send = dta;

    send = dta.AddMonths(18);

    CrmDateTime dateTime = new CrmDateTime();

    dateTime.Value = send.ToString("s");

    myphonecall.scheduledend = new CrmDateTime ();

    myphonecall.scheduledend = dateTime;

     

    srv.Create (myphonecall);

     

    //////////////////////////////////////////////////////////////
    Wednesday, July 23, 2008 1:37 PM

Answers

  • Please capture the System.Web.Services.Protocols.SoapException and look into the Detail InnerText

    Wednesday, July 23, 2008 6:40 PM

All replies

  • Hi Eliran,

     

    Try the following example.

     

    myphonecall.scheduledend = new CrmDateTime();

    myphonecall.scheduledend.Value = DateTime.Now.AddMonths(18).ToString("s");

    srv.Create(myphonecall);

     

    Cheers,

    Adi

     

    Wednesday, July 23, 2008 2:29 PM
  •  

    tried it but it's still not working 

     

    The record not create in CRM

    Wednesday, July 23, 2008 2:37 PM
  • Make sure all the phonecall activity required fields are filled as well.

    Are you getting any exceptions?

     

    Adi

     

    Wednesday, July 23, 2008 3:26 PM
  • Please capture the System.Web.Services.Protocols.SoapException and look into the Detail InnerText

    Wednesday, July 23, 2008 6:40 PM