Yes, You can, but You have to go through the DictField object which
You get via DictTable.fieldObject(fieldId):

    dictTable   dt;
    DictField   df;
    int         numberOfFields;
    int         fieldId;
    int         i;
    str         table;
    ;
    table = 'inventtable';
    dt = new dictTable(tablename2id(table));
    numberOfFields = dt.fieldCnt();

    for (i = 1; i <= (numberOfFields); i++)
    {
        fieldId = dt.fieldCnt2Id(i);
        //info(dt.fieldName(i));
        //info(dt.fieldName(fieldId));
        df = dt.fieldObject(fieldId);
        info(df.label());
    }

/Andreas

--- In Axapta-Knowledge-Village@yahoogroups.com, "nabilwilson"
<[EMAIL PROTECTED]> wrote:
> Excellent!
> 
> Thank you very much for help!
> 
> Another question, is there possibility to get out
> the labels of the fields?
> 
> --- In Axapta-Knowledge-Village@yahoogroups.com, Raul Llorente
> Peña/OPENSOLUTIONS <[EMAIL PROTECTED]> wrote:
> Try this!! (you put a wrong parameter!!)
>  
> // CODE EXAMPLE
> static void Job1(Args _args)
> {
>    dictTable   dt;
>    int         numberOfFields;
>    int         fieldId;
>    int         i;
>    str         table;
>    ;
>    table = 'inventtable';
>    dt = new dictTable(tablename2id(table));
>    numberOfFields = dt.fieldCnt();
> 
>    for (i = 1; i <= (numberOfFields); i++)
>    {
>        fieldId = dt.fieldCnt2Id(i);
>        //info(dt.fieldName(i));
>        info(dt.fieldName(fieldId));
>    }
> }
> 
> ^_^
>  
> Raúl Llorente Peña 
> 
> Análisis, Desarrollo e Implementación en 
> Microsoft Bussiness Solutions-Axapta
> OPEN SOLUTIONS
> 
> 
> 
> [EMAIL PROTECTED] escribió: -----
> 
> 
> Para: Axapta-Knowledge-Village@yahoogroups.com
> De: "nabilwilson" <[EMAIL PROTECTED]>
> Enviado por: Axapta-Knowledge-Village@yahoogroups.com
> Fecha: 16/05/2005 16:10
> Asunto: [Axapta-Knowledge-Village] DictTable fieldname UNKNOWN?
> 
> Hello all,
> 
> I try to get a list from fieldnames of the 
> table. Following example does it, but for
> some reason some fields are shown as 
> 'UNKNOWN'. In example I use inventtable.
> 
> If I create a totally new table,
> and run the code for it, then all 
> the names of this new table are shown
> as UNKNOWN. 
> 
> Does anyone an idea have what is causing this?
> 
> // CODE EXAMPLE
> static void Job1(Args _args)
> {
>    dictTable   dt;
>    int         numberOfFields;
>    int         fieldId;
>    int         i;
>    str         table;
>    ;
>    table = 'inventtable';
>    dt = new dictTable(tablename2id(table));
>    numberOfFields = dt.fieldCnt();
> 
>    for (i = 1; i <= (numberOfFields); i++)
>    {
>        fieldId = dt.fieldCnt2Id(i);
>        info(dt.fieldName(i));
>    }
> }




------------------------ Yahoo! Groups Sponsor --------------------~--> 
What would our lives be like without music, dance, and theater?
Donate or volunteer in the arts today at Network for Good!
http://us.click.yahoo.com/Tcy2bD/SOnJAA/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/
 


Reply via email to