The editor in Axapta is as easy to extend as the rest environment. If you check the class EditorScripts, you see a list of methods which is standard. In this example we add a little script which marks your inputed extra code. We always mark all added or changed code, to make it easier to see afterwards what’s added and what’s standard. By doing this it is also makes it very easy to search for all code related to a certain project. This code is an example of what we all use several times a day.
It get’s it’s data from the standard user forms. Here we use the email field to store and get companyname and user-initial from, but you could extend this even more if you like.
To use it, add below code to you EditorScripts class in your environment. Go to Tools, Options and input your initial in the EMail field. Switch to the Developing tab and select a project plus click the save button. Mark a few lines of code in any editor window, right click and select “Scripts” from the option menu. Right under there this script should show with the name FOBeginEnd. When you click on the name, below code fill in the comments you see here, before and after your marked lines.
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.