I'm in need of a way to loop through the fields of an object including the fields that are fields from a related entity. I also need this loop to include custom fields that I have created. Is this possible? The reason I'm doing this is to dynamically generate a spread sheet of data about an entity and need all the fields/properties.
What if my entity is a subtype of another entity? Would I then be able to loop through all the fields of the two entities?