Thank you, I will try it
Ande
--- In [EMAIL PROTECTED], Claudia G�ries
<[EMAIL PROTECTED]> wrote:
> Hi Andy,
> try this:
>
> private void updateTableEnumValue(enumId _enum, int _oldValue, int
> _newValue )
> {
> int tablecounter, fieldCounter;
> Dictionary dictionary;
> SysDictTable dictTable;
> SysDictField dictField;
> Common _table;
> ;
> dictionary = new Dictionary();
> ttsbegin;
> // loop all Tables
> for (tableCounter = 1; tableCounter <= dictionary.tableCnt();
> tableCounter++)
> {
> dictTable = new SysDictTable(dictionary.tableCnt2Id
> (tableCounter));
> if (dictTable == null)
> continue;
> for (fieldCounter = 1; fieldCounter <= dictTable.fieldCnt
();
> fieldCounter++)
> {
> dictField = new SysDictField(dictTable.id(),
> dictTable.fieldCnt2Id(fieldCOunter));
> if (dictField == null)
> continue;
> if (dictField.enumId() == _enum)
> {
> _table = dictTable.makeRecord();
> _table.selectForUpdate(true);
> while select _table
> where _table.(dictField.id()) == _oldValue
> {
> _table.(dictField.id()) = _newValue;
> _table.doUpdate();
> }
> }
> dictField = null;
> }
> dictTable = null;
> }
> ttscommit;
> }
>
> good luck
> Claudia
>
>
>
> --- In [EMAIL PROTECTED], "agramm2000"
> <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > How can I change entries of a base enum in all tables where a
field
> > of this type exists.
> >
> > I will do this by code, running over all tables looking for such
> > fields and changes content of the field for given entry to
another
> > entry.
> >
> > Is this possible?
> >
> > Any Idea?
> >
> > Regards
> > Andi
| Yahoo! Groups Sponsor | |
|
|
Yahoo! Groups Links
- To visit your group on the web, go to:
http://groups.yahoo.com/group/development-axapta/
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

