I am recently noticing a problem with CRM online with code that previously worked.
If Xrm.Page.ui.getFormType() is called in onload event scripts, functions called by onload event or even soon thereafter following the initial save of a CRM record the wrong value is returned. The value 1 of create form is being returned after save so value 2 should be returned.
If Xrm.Page.ui.getFormType() is delayed or called subsequently to other code the correct value of 2 is returned.
This seems to be a recent bug.
*This post is locked for comments
I have the same question (0)