Title: Nachricht
    hi all,
 
    try this:
 
    static void InstantiateATableObject(Args _args)
    {
        DictTable               dictTable;
        DictField               dictField;
        integer                 fieldCount;
        Common                  common;
        ;
        dictTable = new DictTable(tablenum(CustTable));
        for (fieldCount = 1; fieldCount <= dictTable.fieldCnt(); fieldCount++)
        {
            dictField = new DictField(dictTable.id(), dictTable.fieldCnt2Id(fieldCount));
            if (dictField.name() == "Name")
            {
                common  = dictTable.makeRecord();                   // <--- something like this
                while select * from common
                {
                    global::info(common.(dictField.id()));
                }
                break;
            }
        }
    }
 
    regards
    wolfgang
-----Urspr�ngliche Nachricht-----
Von: dgaethofs [mailto:[EMAIL PROTECTED]
Gesendet: Mittwoch, 7. April 2004 11:43
An: [EMAIL PROTECTED]
Betreff: [development-axapta] Instantiate a Table Object

Dear all,

I am looking for a way to dynamically instantiate a table object in
a Job.

Normally when you want to use the data contained in a table you have
to define a new instance of table.
Example: CustTable cust;

I have a job that checks the data dictionary - more specific the
DictTable - for fields with a certain name.
The moment a field is found I want to lookup the values of that
field in its table.
The table name is given by the DictTable.name. It is the name of the
table to which the field that is found belongs.

How can I instantiate a table object for this table ?
Or is there another way to accomplish what I described?

If you look at Classes there is a method makeObject to instantiate a
new instance of the class. I have been using this and it works for
classes. Such a method however is not available - or I could not
find it - for tables.

Does somebody knows how to do this?

Kind regards,
Danny Gaethofs




Yahoo! Groups Sponsor
ADVERTISEMENT
click here


Yahoo! Groups Links

Reply via email to