From Javascript on the email form, I need to find the entitytype of the values in the partylist fields (from, to, regarding) of the parent email record. I'm currently trying to do this with the web API, but am not sure where to go next. I've used the following query:
"/api/data/v8.0/emails(" + parentEmailId + ")?$select=subject,_regardingobjectid_value&$expand=email_activity_parties"
This gets me some fields from the parent email record, and also the activityparty records for that email, but as shown in the web api reference here: https://msdn.microsoft.com/en-gb/library/mt607938.aspx , this does not return the entitytype of the activityparty record, e.g. contact, systemuser.
Am i missing something here? Is there an easier way to find which type of record is in these fields?