Mapped table name

Posts   
 
    
Posts: 34
Joined: 05-Mar-2008
# Posted on: 05-Oct-2009 14:47:35   

Hi,

Is there a way to obtain (from code) the name of mapped table for the entity like this myEntity.TableName ?

Cheers!

Walaa avatar
Walaa
Support Team
Posts: 14993
Joined: 21-Aug-2005
# Posted on: 05-Oct-2009 15:58:14   

For SelfServicing:

string tableName = myEntity.Fields[0].SourceObjectName;

For Adapter:

IFieldPersistenceInfo fieldInfo = adapter.GetFieldInfo(myEntity.Fields[0]);
string tableName = fieldInfo.SourceObjectName;
Posts: 34
Joined: 05-Mar-2008
# Posted on: 05-Oct-2009 16:03:44   

This will help.

Thanks!