Assuming the table field is defined using an extended datatype, you will
have to change the EDT rather than the field itself. However, beware that
this means that any other tables using this edt, and in fact any other place
in the application using that edt will obviously be affected too.

The way you do it is using infolog methods to directly access the AOT,
getting references to the individual nodes and then changing properties
using the global method setProperty(). See the following for ideas:

TreeNode Infolog.findNode(str _path)
returns a treenode with reference to the AOT node specified by path (ie.
\\Data Dictionary\Extended datatypes\MyType)

str TreeNode.AOTgetProperties()
returns the properties of a specific node.

str Global::findProperty(str _properties, str _property)
converts a propertysheet (as given by AOTGetProperties) to a specific
propertyvalue (ie. alignment = findProperty(node.AOTgetProperties(),
'Alignment'))

str Global::setProperty(str properties, str propertyname, str value)
set-equivalent of findProperty.


Check the online help for the classes and methods mentioned above to find other interesting methods, like AOTFindChild.

Best regards

Thomas Turn Jensen

----- Original Message ----- From: "byteway_so" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, October 28, 2003 4:07 PM
Subject: [development-axapta] Adjustment



Hi all,

I wonder if it is possible to adjust a field of a table
programmatically. I know how to get to the SQLDictionary record for
the specifick field. It goes something like:

MyTable _table;
int _tableId;
int _fieldId;
;
_tableid = _table.TableId;
_fieldId = fieldName2Id(_tableid,"MYCOLUMNNAME");

But after I have that record, what do I need to do to get the
Adjustment of the field for example to "right"?

Any help would be appreciated.






Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/






Yahoo! Groups Sponsor ADVERTISEMENT
click here


Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

Reply via email to