Have a look over the dictTable class:
dictTable dt;
int numberOfFields;
int fieldId;
int i;
;
dt = new dictTable(tableNum(CustTable));
//name of table
info(dt.name());
numberOfFields = dt.fieldCnt();
info(int2str(numberOfFields));
for (i = 1; i <= numberOfFields; i++) //if you want All fields but not the system ones, then use i <= (numberOfFields - 12)
{
fieldId = dt.fieldCnt2Id(i);
info(dt.name()+'.'+dt.fieldName(fieldId));
}
int numberOfFields;
int fieldId;
int i;
;
dt = new dictTable(tableNum(CustTable));
//name of table
info(dt.name());
numberOfFields = dt.fieldCnt();
info(int2str(numberOfFields));
for (i = 1; i <= numberOfFields; i++) //if you want All fields but not the system ones, then use i <= (numberOfFields - 12)
{
fieldId = dt.fieldCnt2Id(i);
info(dt.name()+'.'+dt.fieldName(fieldId));
}
Be careful with array fields, like dimension. To manipulate and traverse them, you will have to use dictfield, but it has a similar interface. I hope this helped you.
Raúl Llorente Peña
Análisis, Desarrollo e Implementación en
Microsoft Bussiness Solutions-Axapta
OPEN SOLUTIONS
-----"mqturune" <[EMAIL PROTECTED]> escribió: -----
Análisis, Desarrollo e Implementación en
Microsoft Bussiness Solutions-Axapta
OPEN SOLUTIONS
Para: Axapta-Knowledge-Village@yahoogroups.com
De: "mqturune" <[EMAIL PROTECTED]>
Fecha: 18/01/2005 08:04
Asunto: [Axapta-Knowledge-Village] query for the fields of a table
Hi all,
What would be the easiest way to loop all the fieldnames
of a table? For example I'm using Address-table
and I want to add all the fieldnames to a listbox in a form.
I'm really meaning the fieldnames, not values of
a certain record.
/Markus
------------------------ Yahoo! Groups Sponsor --------------------~-->
In low income neighborhoods, 84% do not own computers.
At Network for Good, help bridge the Digital Divide!
http://us.click.yahoo.com/EpW3eD/3MnJAA/cosFAA/kGEolB/TM
--------------------------------------------------------------------~->
Sharing the knowledge on Axapta.
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/Axapta-Knowledge-Village/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
Sharing the knowledge on Axapta.
Yahoo! Groups Links
- To visit your group on the web, go to:
http://groups.yahoo.com/group/Axapta-Knowledge-Village/
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.