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...
-
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...
-
Settlement feature allows you to select the open transactions(Vendor / customer) and then you can post the payment journal for the same. I...
-
static void CreateTransferOrderLine(Args _args) { InventTransferTable inventTransFerTable; InventTransferLine inventTransFerLine; ...
No comments:
Post a Comment