Error when retrieving parent record date values RRS feed

  • Question

  • Hi,

    I am using CRM 2011 online.

    in this i have written a javascript to retrieve parent record values based on lookup filed. it is working fine for all fields except date type fields.

    below is the code.

    var date=new Date();

    var ref=resultXml.selectSingleNode("//q1:new_referenceid").nodeTypedValue;

    date=resultXml.selectSingleNode("//q1:new_dated").nodeTypedValue; // it is giving error.


    Error is: 

    Unable to get property 'nodeTypedValue' of undefined or null reference.

    and the method is working fine for all fields except new_dated field. new_dated is a date type field in parent record.

    Could you please help us to solve the issue.

    Thanks in Advance


    Sunday, June 23, 2013 5:02 AM

All replies

  • Hi,

    try to debug your code, might be reason is there is no value in date field.

    so, try to write like as below as well.

    if (resultXml.selectSingleNode("//q1:new_dated") != null) {
        if (resultXml.selectSingleNode("//q1:new_dated").nodeTypedValue != null) {
            date = resultXml.selectSingleNode("//q1:new_dated").nodeTypedValue; // it is giving error.

    Hope this helps. If you get answer of your question, please mark the response as an answer and vote as helpful !
    Vikram !

    Sunday, June 23, 2013 6:25 AM
  • Which Browser r u using?

    Try debugging it. It has been changed in UR12. See below link:


    • Proposed as answer by myCRMGuy Tuesday, June 25, 2013 3:43 AM
    Monday, June 24, 2013 4:44 AM