Wednesday, 29 November 2017

How to reduce/flush the TempDB size in AX2012

How to reduce/flush the TempDB size in AX2012

 

 

In AX 2012 all the temp data is stored in TempDB database, which normally occupies alot of space after certain days. Below is the path for TempDB:

<YourDrive>:\SQL\MSSQL10_50.MSSQLSERVER\MSSQL\TempDB






You might see on the above path that there is a a database which is of a big size in GB's. You simply need to restart SQL Server service or restart the machine. This will flush all the temp memory from this database.

Hope this helps!

Tuesday, 28 November 2017

Multiselect in Grid (AX2012)

Multiselect in Grid (AX2012)


Multiselect in a grid is set to "No" By default.

you can Enable it by clicking on the Grid ->properties.

   Multiselct -Yes

Now you can multiselect on the Grid




For Further info:

Overriding Clicked method to get the selected Records in Grid

on the button field -> Method > overideMethod > Clicked

and paste the Following Code



void clicked()
{
    Table ta;   //Here Table name  is "Table"
 
     ta=Table_ds.getFirst(true);

        while(ta.RecId)
    {

        info(strFmt("you have Selected %1",ta.Name));
      
      //ta.delete();  //enable it to delete the selected items
   
        ta=Table_ds.getNext();


    }

}
 

Display method in Ax 2012

Display method in Ax 2012



First Create an EDT named : StringEDT
(String Type)

Create a table : "Table"
Create a Field : "Name" and other Fields
Go to Methods : right click and create a new method : "GetName"

Paste the Following Code:


Display StringEDT GetName()
{
    Table ta;
    ;
   select Name from ta
    where ta.Name==this.Name;

    return ta.Name;
}


Now, Go to your Form

and in StringEdit Field of the Grid:

Click Properties and provide the following :
DateSource : Table
DataMethod : GetName
 

job to Update Internal Customers - custTable - AX2012 in all companies (crosscompany)

UpdateInternalCustomers using cross Company in AX2012 we can update the custTable Table in all the companies in AX     static void KTI_...