The FeedItem object is used in my Org. There is a field called parent ID. But i am not being able to understand to which object is FeedItem related to? is there a way to see which object is parent id referring to in my org?

1 Answer 1


When you have a reference of type ID (such as your FeedItem parent ID) you can directly get the type token of the object (in this case the parent object) and add whatever dependent logic you need:

Id parentId = ...;
SObjectType sobType = parentId.getSObjectType();

if (sobType == Contact.SObjectType) {

That logic can use hard-coded types as above or can make use of describe calls to find out the relevant information.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .