locked
how do I send a datetime accross in XML RRS feed

  • Question

  • I get a pretty error saying that the date-time format is invalid or the date of range and a very clear string representation of next monday:

     

    ....

    var meetingDate = crmForm.all.scheduledstart.DataValue;
    var pricelevelid = pricelist[0].selectSingleNode('./q1Stick out tonguericelevelid').nodeTypedValue;

    var optionalattendees = crmForm.all.optionalattendees.DataValue;
    var requiredattendees = crmForm.all.requiredattendees.DataValue;

    var customer = crmForm.all.regardingobjectid.DataValue;
    var customerid;
    if (customer != null && customer[0].typename == "account")
        customerid = customer[0].id;
    else           // Load up account
        customerid = getAccountID(INSTANCE_DEFAULT_ACCOUNT_NAME);

    //Prepare the SOAP message.
    var xml = "<?xml version='1.0' encoding='utf-8'?>" +
    "<soap:Envelope xmlnsTongue Tiedoap='http://schemas.xmlsoap.org/soap/envelope/'"+
    " xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'"+
    " xmlns:xsd='http://www.w3.org/2001/XMLSchema'>"+
    authenticationHeader+
    "<soap:Body>"+
    "<Create xmlns='http://schemas.microsoft.com/crm/2007/WebServices'>"+
    "<entity xsi:type='quote'>"+
    "<name>"+name+"</name>"+
    "<description>"+description+"</description>"+
    "<new_location>"+location+"</new_location>"+
    "<new_meetingdate>"+meetingDate+"</new_meetingdate>"+
    ....

     

    how do I send a datetime accross in XML?

    Saturday, November 22, 2008 12:10 AM

Answers

  • Try sending the crmForm.all.scheduledstart.InnerText instead.

    e.g. var new_meetingdate = crmForm.all.scheduledstart.InnerText;

     

    Saturday, November 22, 2008 12:22 AM
  • The SDK doesn’t say anything about it. The only reference I’ve seen regarding this issue is a post on msdn regarding addressable forms.

     

    I believe they intended to make this part of the cient sdk since referring to the Datetime.DataValue does not produce the right value for datetime api.

     

    Adi

     

     

    Tuesday, November 25, 2008 3:18 PM

All replies

  • Try sending the crmForm.all.scheduledstart.InnerText instead.

    e.g. var new_meetingdate = crmForm.all.scheduledstart.InnerText;

     

    Saturday, November 22, 2008 12:22 AM
  • Then my next question is, how would someone know that?  Is this object model information?  Jscript knowledge?  Dynamics information?

     

    Thanks, that was the trick.

     

    Tuesday, November 25, 2008 3:12 PM
  • The SDK doesn’t say anything about it. The only reference I’ve seen regarding this issue is a post on msdn regarding addressable forms.

     

    I believe they intended to make this part of the cient sdk since referring to the Datetime.DataValue does not produce the right value for datetime api.

     

    Adi

     

     

    Tuesday, November 25, 2008 3:18 PM