When I call Xrm.Page.getAttribute('statecode').getValue() or Xrm.Page.getAttribute('statuscode').getValue() , in Onload event I'm getting error or null.
The information is on the page since it always in the footer (By default) , but its look like MS don't keep it in the page Data model structure.
There is so much information regarding the entity (id , Type, url , organization etc.) but not the state/status.
I see 2 options :
1. Call the CRM WebService and get the information .
2. Find the document element on the HTML and try to get it from there.
Any one has better /simpler idea ?