static void Job6(Args _args)
{
#define.TableName( 'TSTTestTable' )
#define.FieldName( 'TestField' )
#AOT
#Properties
TreeNode a,b,c;
AOTTableFieldList fields;
Struct s;
Map map = new Map(Types::String, Types::String) ;
Counter propertiesCount;
Array propertyInfoArray;
Struct propertyInfo;
str propertyValue;
int i;
;
//create table
a = infolog.findNode( #TablesPath) ;
b = a.AOTfindChild( #TableName) ;
if (!b)
{
b = a.AOTadd(#TableName );
b.AOTsave();
}
//create field
fields = b.AOTfindChild( 'Fields') ;
c = fields.AOTfindChild (#FieldName) ;
if (!c)
{
fields.addString( #FieldName) ;
c = fields.AOTfindChild (#FieldName) ;
b.AOTsave();
}
//set field's properties
s = c.AOTgetPropertiesE xt();
map.insert(# PropertyExtended DataType, 'SalesId');
propertiesCount = s.value('Entries' );
propertyInfoArray = s.value('PropertyIn fo');
for (i = 1; i <= propertiesCount; i++)
{
propertyInfo = propertyInfoArray. value(i);
if (map.exists( propertyInfo. value('Name' )))
{
propertyValue = map.lookup(property Info.value( 'Name'));
propertyInfo. value('Value' , propertyValue) ;
}
}
c.AOTsetPropertiesE xt(s);
b.AOTsave();
}
Subscribe to:
Post Comments (Atom)
How to identify the user that was used to change an object from AOT in AX2012
Get the object name for which we need to track these (user and date&time) information's. Login to SQL Server Management Studio an...
-
The global search is a feature in Dynamics Ax 4.0 which allows you to search for a string in several tables (like a full text search). You s...
-
A while ago I had the need to translate labels, I was creating eMail bodys while using SysMailer and wanted to use different languages for d...
-
This article explains: How to picking list through a job using X++ in Dynamics AX. Applied on: Dynamics AX 2009 SP1 Create a job a...
No comments:
Post a Comment