Posts

Showing posts from June, 2012

Comments in Code Editor - EditorScripts class

Comments in Code Editor (Edit  EditorScripts class)Hi Friends,

try the following code to add your own function in Code editor.
Class Name:- EditorScripts
Method 1- To Insert Header and Footer
Add a new method and copy and paste following code, 

public void theaxapta_insert_HeaderFooter(Editor e)
{
    e.unmark();
  //  e.gotoLine(1);
   // e.gotoCol(1);

    e.insertLines('// Added or Modified on ' + date2str(today(),123,2,1,3,1,4, DateFlags::FormatAll ) + ' at ' + time2str(timenow(), 1, 1) + ' by theaxapta(' + curuserid() +') Begin:' + '\n');
    e.insertLines('// Added or Modified on ' + date2str(today(),123,2,1,3,1,4, DateFlags::FormatAll ) + ' at ' + time2str(timenow(), 1, 1) + ' by WCL(' + curuserid() +') End:' + '\n');
}

Method 2- Insert Comment

public void theaxapta_comment(Editor _editor)
{
    int startLine = _editor.selectionStartLine();
    int endLine   = _editor.selectionEndLine();
    int i;
    #define.comment(…

Document Handling In Axapta

Image
Document Handling In Axapta
When we create a new word document through document handling , we can transfer data from tables in Microsoft Dynamics AX to bookmarks in the new document. This is done by creating a template with some standard text and some bookmarks where the data from tables are to be inserted. For example we can transfer the address and contact information for a customer to the letter head in a Microsoft Word document when creating a new letter for that customer.
Prepare a Word template :We need to create a Word template with bookmarks where the data should be inserted. Then we set up the document type by linking the document type to the template and by adding the data fields to be transferred to the individual bookmarks.
Step I : Create a Word template
1.            Open Microsoft Office Word.
2.            In the new template, add the text and graphics we want to appear in all new documents that we base on the template.
3.            Place the cursor where we want to insert …