Community
Showing results for 
Search instead for 
Do you mean 
Reply

Discovering Column Names

Accepted Solution Solved
Copper Contributor
Posts: 34
Country: United States
Accepted Solution

Discovering Column Names

I apologize if this is a very green question but how other than guessing can I obtain a list of all the column names in a table? I've looked at sdk documentation 5 times and given up ever using it again unless someone can tell me where to find anything in the documentation.

 

TIA

JB

Was this post helpful? If so please take a moment to learn a little bit about my ACT! products for yourself or resell to your clients.

Thank You
JB

http://www.axciant.com/act/actrecordescape.asp

Accepted Solutions
Solution
Accepted by topic author ramjet
‎09-25-2015 03:20 AM
Copper Contributor
Posts: 43
Country: USA

Re: Discovering Column Names

Hi

 

See MutableEntityManager.GetFieldDescriptors()

 

This will give you a full list of FieldDescriptors that includes name and type information.

 

Regards

 

David Evans

Inaport - CRM Integration

http://www.inaplex.com

View solution in original post


All Replies
Solution
Accepted by topic author ramjet
‎09-25-2015 03:20 AM
Copper Contributor
Posts: 43
Country: USA

Re: Discovering Column Names

Hi

 

See MutableEntityManager.GetFieldDescriptors()

 

This will give you a full list of FieldDescriptors that includes name and type information.

 

Regards

 

David Evans

Inaport - CRM Integration

http://www.inaplex.com

Copper Contributor
Posts: 34
Country: United States

Re: Discovering Column Names

Taking this one step further one would never really "know" the column names for sure as the user may have modified their database. So I used the following below to get the information about in this case phones.

 

ContactFieldDescriptor[] ConPhoneDesc;

ConPhoneDesc = References.ActFrk.Contacts.GetContactFieldDescriptors(new FieldDataType[] { FieldDataType.Phone });

int iConPhoneFldNum = 0;

PhoneFldNames = new string[ConPhoneDesc.Length,ConPhoneDesc.Length];

foreach (ContactFieldDescriptor objPhoneNumbers in ConPhoneDesc)

{

PhoneFldNames[iConPhoneFldNum, 0] = objPhoneNumbers.DisplayName;

PhoneFldNames[iConPhoneFldNum, 1] = objPhoneNumbers.ColumnName;

iConPhoneFldNum++;

}

Was this post helpful? If so please take a moment to learn a little bit about my ACT! products for yourself or resell to your clients.

Thank You
JB

http://www.axciant.com/act/actrecordescape.asp