Friday 30 March 2012

Deleting duplicate records in Table through code in X++

Hi friends ,

We are going to see how to delete duplicate records on the Table through code by using X++

static void DeleteDuplicate(Args _args)
Set fieldset = new set(types::Integer);

// create dictindex from unique index

DictIndex dictIndex = new dictIndex (tablenum(PurchTable), indexnum(PurchTable,PurchIdx));


// these are fields from index

// add them to set

fieldset.add(fieldnum(PurchTable ,OrderAccount));


// set allow duplicates


//reenable duplicates


info("Deletion done");


Vivek Chirumamilla

Thursday 15 March 2012

RunBaseBatch in Ax 2009

Hi Friends,

Today we are going to export data by using a class which extends from runbasebatch. The replica of it would be found in tutorial_runbasebatch . In administration module setup check the server configuration whether is batch server is checked or not. In same BatchGroup create your own batch group. In basic module Inquiries in Batch you can find whether its working or not. If you dont click the batch processing button to yes it will run instantly.

Note For giving the file name dynamically check the form tutorial_form_file.

Vivek Chirumamilla