Salesforce: Identifying Type of Object For Exported Attachment Record

During data import, there is some object export that is related to another object. The object relationship is only referenced using ID, hence, it’s impossible to identify the object type that it’s related to.

From the following attachment data export, we have the id – PARENTID. However, which object does this PARENTID belong to?

 

ID PARENTID Name
00P90000004MjfzBAC 0039000000OCynzTAD Meeting Agenda.docx

 

In order to retrieve the object name for the given ID, you have to manually include the PARENT.TYPE parameter into your query to retrieve the data export, resulting:

 

ID PARENTID PARENT.TYPE Name
00P90000004MjfzBAC 0039000000OCynzTAD Contact Meeting Agenda.docx

 

From the above, we can tell easily tell that the attachment record is associated with the contact.