UtilElements stores the meta-data of all the AOT objects and even this table can also be used as log for tracking creation and modification of AOT objects.
And UtilElements is not RDBMS Table , whereas it uses filesystem to store data.
AOT Path for all system tables : \AOT\System Documentation\Tables\
Can be used for ..
1. To track the object creation and modification during development. i,e When you create a new or modify existing node in AOT , like table,field,report,index etc ax kernel creates/updates records in UtilElements table .
2. Even forms/reports accessed by the end-user can be tracked .
Limitation of this log table is we can't track the deleted objects in AOT.
So if you want to track who modified what object , this is the best place to look in.
X++ Code to Export AOT Object / automatic backup of xpo's.
we need to take daily backup of our development (interms of xpo) , but we all always forget becuase of our hectic work schedules.
So use the following job and build batch application to take backup of developement in terms of xpo .
We can take aod also but the size will be more and needs to stop AOS everytime .
Following job illustrates how to export/backup all AOT Classes object.
void DEV_ExportTreeNodeExample()
{
TreeNode treeNode;
FileIoPermission perm;
#define.ExportFile(@"c:\AOTclasses.xpo")
#define.ExportMode("w")
;
perm = new FileIoPermission(#ExportFile, #ExportMode);
if (perm == null)
{
return;
}
perm.assert();
treeNode = TreeNode::findNode(@"\Classes");
if (treeNode != null)
{
// BP deviation documented.
treeNode.treeNodeExport(#ExportFile);
}
CodeAccessPermission::revertAssert();
}
Enjoy !!!!!!!!
So use the following job and build batch application to take backup of developement in terms of xpo .
We can take aod also but the size will be more and needs to stop AOS everytime .
Following job illustrates how to export/backup all AOT Classes object.
void DEV_ExportTreeNodeExample()
{
TreeNode treeNode;
FileIoPermission perm;
#define.ExportFile(@"c:\AOTclasses.xpo")
#define.ExportMode("w")
;
perm = new FileIoPermission(#ExportFile, #ExportMode);
if (perm == null)
{
return;
}
perm.assert();
treeNode = TreeNode::findNode(@"\Classes");
if (treeNode != null)
{
// BP deviation documented.
treeNode.treeNodeExport(#ExportFile);
}
CodeAccessPermission::revertAssert();
}
Enjoy !!!!!!!!
Build your own context menu on Form field.
Context menu on field are nothing but the list of features shown when you do right click on field like filter by field,by selection ,setup etc.
Following code illustrates how you can override the standard context menu and build your own .
Best use of this is in-case of display methods where filter by field and selection are not available.
Override the standard context method available on Form fields.
public void context()
{
PopupMenu menu ;
Str filterValue;
int selectedItem;
int filter, removeFilter;
;
//super(); // Comment standard menu
menu = new PopupMenu(element.hWnd());
filter = menu.insertItem("Filter");
removeFilter= menu.insertItem("Remove Filter");
selectedItem = menu.draw();
filterValue = element.design().controlName("Table1_Usn").valueStr();
switch (selectedItem)
{
case filter :
Table1_ds.filter(fieldnum(table1,Usn),filterValue);
break;
case removeFilter :
Table1_ds.removeFilter();
break;
}
}
For illustration i have used my own objects , So please test with your own valid objects.
Following code illustrates how you can override the standard context menu and build your own .
Best use of this is in-case of display methods where filter by field and selection are not available.
Override the standard context method available on Form fields.
public void context()
{
PopupMenu menu ;
Str filterValue;
int selectedItem;
int filter, removeFilter;
;
//super(); // Comment standard menu
menu = new PopupMenu(element.hWnd());
filter = menu.insertItem("Filter");
removeFilter= menu.insertItem("Remove Filter");
selectedItem = menu.draw();
filterValue = element.design().controlName("Table1_Usn").valueStr();
switch (selectedItem)
{
case filter :
Table1_ds.filter(fieldnum(table1,Usn),filterValue);
break;
case removeFilter :
Table1_ds.removeFilter();
break;
}
}
For illustration i have used my own objects , So please test with your own valid objects.
Remove HTML Tags from String
Following Job illustrates how to strip htmltags from string.
static void Dev_StripHTML(Args _args)
{
Str htmlSource;
;
htmlSource = "Test " +
"HTML Tags Removed ";
info(Web::stripHTML(htmlSource));
}
static void Dev_StripHTML(Args _args)
{
Str htmlSource;
;
htmlSource = "
"HTML Tags Removed ";
info(Web::stripHTML(htmlSource));
}
Subscribe to:
Posts (Atom)