Editor Scripts in DAX
Editor Scripts are available to help you quickly complete common programming tasks. They are available in the X++ Editor Window as shown .
They have lots of useful scripts which are really very useful for the developer. You can also customize these editor scripts and add your own scripts. What you have to do is edit the EditorScripts Class (\Classes\EditorScripts) with your new script.
As a practice whenever me or my colleagues create a new Class/Form/Report in AX, we add a new method called DevelopmentHistory() which contains details on all modifications made to that object by any developer. It later becomes easy to view changes made and identify why they were made :).
Hence I added this method in the class:)
\Classes\EditorScripts\comments_DevelopmentHistory()
void comments_DevelopmentHistory(Editor e)
{
e.unmark();
e.gotoLine(1);
e.gotoCol(1);
e.insertLines('void DevelopmentHistory()'+'\n');
e.insertLines('{'+'\n');
e.insertLines('/*'+'\n');
e.insertLines('Made By :'+'\n');
e.insertLines('Date :'+'\n');
e.insertLines('Project Ref :'+'\n');
e.insertLines('Brief Functionality :'+'\n');
e.insertLines('=================='+'\n');
e.insertLines('Changes Made :'+'\n'+'\n'+'\n');
e.insertLines('*/'+'\n');
e.insertLines('}');
}
The Final screen . Your own editor script :)
1 comment:
Check out here for a similar addition for Editor scritps
Block comments in Editor Scripts
Post a Comment