04-10-2009 07:50 AM
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
04-10-2009 03:31 PM
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
04-10-2009 03:31 PM
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
04-15-2009 06:42 AM
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++;
}