Fields on Related Fields via Fields collection

Posts   
 
    
Posts: 23
Joined: 13-Oct-2005
# Posted on: 20-Oct-2005 21:41:36   

I've defined a number of "Fields on Related Fields" of an Entity. Those defined fields do not appear in the "Fields" property of the Entity object. Is there another way to access those programmatically.

ContactEntity ce = new ContactEntity(222); string desiredField = "RelatedField"; string myField = ce.Fields[desiredField];

Thanks,

bclubb
User
Posts: 934
Joined: 12-Feb-2004
# Posted on: 21-Oct-2005 02:07:00   

ContactEntity ce = new ContactEntity(222); string desiredField = "RelatedField"; string myField = ce.Fields[desiredField];

Can you just access the new property ce.RelatedField. If you are looking for a dynamic solution you may use reflection to pull the value of that property from the ContactEntity object.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 21-Oct-2005 15:18:43   

To elaborate: fields mapped onto related fields aren't in the Fields collection, as they're located in another, related entity object

Frans Bouma | Lead developer LLBLGen Pro