title: CRM Xrm.Page.ui.formSelector.items.get() Returning Null
body: <p>I wrote javascript code and added it as a form on load event of entity(contact).  In that Code I want to navigate from the opening form to another form.</p>
  
  <p>For previous developments, I'm trying to get the id of the opening form which I need in order to navigate.
  Code as shown below.</p>
  
  <pre><code>  var id = Xrm.Page.ui.formSelector.getCurrentItem().getId();
  
        if (itemid != null) 
  
      Xrm.Page.ui.formSelector.items.get(id).navigate();
  </code></pre>
  
  <p><code>Xrm.Page.ui.formSelector.getCurrentItem()</code> function returns a null value.  It doesn't get the item so I can't get the value.  What's wrong with that code, what am I missing?</p>
  
  <p>Thanks for replies in advance.</p>