File Handling in Dynamic AX

Writing to a Text File static void textFileWrite(Args _args){TextBuffer tb = new TextBuffer();;tb.appendText(“Hello World!”);tb.appendText(“nWelcome to MIT”);tb.appendText(“nHyderabad”); tb.toFile(“c:\Sample.txt”);} Reading from a Text File static void textFileRead(Args _args){TextBuffer tb = new TextBuffer();; if(WinApi::fileExists(“c:\Sample.txt”)){tb.fromFile(“c:\Sample.txt”);info(tb.getText());}else{info(“No file exists”);}} Writing to a CSV File static void cSVFileWrite(Args _args){CommaIO commaIO;Container readCon;FileIOPermission fio;FileDemo ct;; commaIO = new CommaIO(“c:\FileDemo.csv”, “w”);commaIO.outFieldDelimiter(“,”);commaIO.outRecordDelimiter(“rn”); if(commaIO){while select ct{commaIO.write(ct.Id,ct.Name);}}} Reading […]

Job to create text and write in to it…

static voidTextIoTest(Args _args) {     TextIo Io = new TextIo(@”C:Temptest.txt”, ‘w’);     ;     Io.outFieldDelimiter(”);     Io.outRecordDelimiter(‘rn’);     Io.write(    strLfix(“Bharath Likes”,20), ‘|’, strRfix(“Bel Poori”,15), ‘|’, 117);     Io.writeExp([strLfix(“abc”,20), ‘|’, strRfix(“xyz”,15), ‘|’, 117]);     Io.write(); // To force CR NL }

Report Method Sequence (Methods in reports) in Dynamic AX

Method Description init Initializes the report and its objects. This is the earliest method that can be overridden among those executed when a report is constructed and run. Override this method to add initialization tasks, such as the following: ·    Validation of the argument objects received ·    Initialization of supporting classes ·    Dynamic changes to […]

Method Sequences in Dynamic AX

Event Method Sequences in Form Scenarios User actions on a form are input through mouse pointers and keyboards. These actions cause events that are recognized by Microsoft Dynamics AX. The recognized events include the following: •           Opening a form •           Closing a form •           Leaving a control •           Leaving a record •           Deleting a record […]