title: TypeError: Cannot read property 'getValue' of null at welcomeAlert
body: <p>I'm new in CRM. 
  I need just on the OnLoad event of the page, show a JavaScript alert message: "Welcome 'Account Name'". 
  This is my simple code:</p>
  
  <pre><code>function welcomeAlert()
  {
    var userName = Xrm.Page.getAttribute("name").getValue();
    if(userName !== null)
    {
      alert("Welcome " + userName + "!");
    }
  }
  </code></pre>
  
  <p>But I'm getting error message onLoad: TypeError: Cannot read property 'getValue' of null at welcomeAlert.</p>
  
  <p>If my code looking like code below everything works fine.</p>
  
  <pre><code>function welcomeAlert()
  {
      alert("Welcome ");
  }
  </code></pre>
  
  <p>Somebody can help? Maybe the attribute name is not ok. But I don't know how to check it.</p>