locked
Error while converting feild to Link button to CRM Form 2013 online RRS feed

  • Question

  • function ConvertToLink(fldName) {
    
        var btn = "<a href='javascript: void(0);' onclick=\"window.open(\'http://www.google.com\', \'windowname1\', \'width=600, height=650\');  return false;\" style='color:blue;text-decoration:underline !important'>Test Account</a>";
    
        var ctrl = Xrm.Page.ui.controls.get(fldName)._control;
    
    alert(ctrl);
    
        // Add the new button 
    
        //ctrl.get_element().innerHTML += btn;
    
        // Hide the textbox 
    
        ctrl.get_element().firstChild.style.display = 'none';
    
    }
    

    when i alert the "ctrl" i get Error "undefined".

    I think the problem is at .controls.get(fldName)._control;

    Please help!

    Thursday, August 28, 2014 12:20 PM

All replies