openObjto open a form in Microsoft Dynamics CRM 2011?
Stop that. Now.
No new SDK version has been released yet, so you cannot read about it or find any examples there, it was just recently announced in The Microsoft Dynamics CRM Blog.
Xrm.Utility which is available "everywhere" as long as you have a CRM context.
Xrm.Utility.openEntityForm(name, id, parameters) Xrm.Utility.openWebResource(webResourceName, webResourceData, width, height)
Both functions return the window object that is created which allows you to e.g. move and resize the window.
parameters parameter can be used to set default values when creating a new record and to specify which form to display.
One of the best things though – is that the
openEntityForm function takes the LogicalName of the entity instead of forcing us to make a metadata request to get the ObjectTypeCode…!
Thank's Markus for enlightening me about this news!