locked
Error: the value of property 'ConvertRecordingFieldToLink' is null or undefined, not a Function object RRS feed

  • Question

  • Hello Everyone

    I have following 2 functions in a web resource.

    function ConvertRecordingFieldToLink(fieldid)

    {
        var c = document.getElementById(fieldid);
        if (c == null)
            return;

        if (c.value != null)
        {
                      c.style.textDecoration = "underline";
                      c.style.color = "blue";
                      c.style.cursor = "hand";
                      c.disabled = false;
                      c.ondblclick = function()
                     {
                              window.open(Xrm.Page.getAttribute(fieldid).getValue());
                    };
          }
    }

    function void ShowHidePhoneNumbers()
    {
        var contact = Xrm.Page.getControl("To");
        var regarding = Xrm.Page.getControl("Regarding");

        if (contact != null)
           window.alert("Contact is not null");

        if(regarding != null)
           window.alert("Regarding is not null");
    }

    I am calling both on "onLoad" of new Phone Call Activity form.

    I get "Error: the value of property 'ConvertRecordingFieldToLink' is null or undefined, not a Function object".

    I get the same error even if disable any one function.

    Any suggestions?

    Thanks


    • Edited by WPF_Dev Monday, April 16, 2012 8:38 PM
    Monday, April 16, 2012 8:26 PM

Answers

  • Never mind. I resolved the issue.

    Missing brackets and v.value is not correct.

    Thanks

    • Marked as answer by WPF_Dev Monday, April 16, 2012 8:44 PM
    Monday, April 16, 2012 8:44 PM