Possible Bug?

Feb 24, 2012 at 10:39 PM

I am new to codeplex so if this is not the correct location to post a possible bug, please forgive me.

I am using SOAP and Fetch with the toolbox to return some data and it works great but I noticed that anytime the attribute is a DateTime type, the value is always null while the formattedValue is correct.

Coordinator
Feb 26, 2012 at 11:32 AM
Edited Feb 26, 2012 at 11:44 AM

Hey There.

Give this a try and let me know if it return the dateTime correctly.

In my end, it does return a dateTime value.

var fetchXml =
                    "<fetch mapping='logical'>" +
                       "<entity name='contact'>" +
                          "<attribute name='contactid' />" +
                          "<attribute name='firstname' />" +
                          "<attribute name='lastname' />" +
                          "<attribute name='middlename' />" +
                          "<attribute name='familystatuscode' />" +
                          "<attribute name='ownerid' />" +
                          "<attribute name='creditlimit' />" +
                          "<attribute name='birthdate' />" +
                          "<attribute name='accountrolecode' />" +
                          "<attribute name='donotemail' />" +
                          "<attribute name='donotphone' />" +
                          "<filter>" +
                             "<condition attribute='contactid' operator='eq' value='" + contactId + "' />" +
                          "</filter>" +
                       "</entity>" +
                    "</fetch>";

var retrievedContacts = XrmServiceToolkit.Soap.Fetch(fetchXml);

alert(retrievedContacts[0].attributes["birthdate"].value);

alert(retrievedContacts[0].attributes["birthdate"].type);