Dynamics CRM 2011 How To
To retrieve the logical entity name of the entity referenced by
var regardingObjectID = window.Xrm.Page.getAttribute("regardingobjectid").getValue();
var logicalEntityName = regardingObjectID.entityType;
Or to retrieve the logical entity name using C#:
EntityReference entityReference = (EntityReference)entity["regardingobjectid"];
string logicalEntityName = regardingRef.LogicalName;
These notes have been tested with Microsoft Dynamics CRM 2011, and may apply to other versions as well.
About the author: Brian Cryer is a dedicated software developer and webmaster. For his day job he develops websites and desktop applications as well as providing IT services. He moonlights as a technical author and consultant.