This blog is for Dynamics AX (AXAPTA) Developers,this will help you for your development issues. This site contains some Microsoft Dynamics AX X++ Codes for use in your day to day use.
25 October 2011
Axapta Application file extensions
http://www.artofcreation.be/2009/10/27/application-file-extensions/
13 October 2011
AX 2009 Retail Major Tables
// Following table are for ax retail 2009 if we do any retail transaction this two table will //affect
RBOTransactionTable
RBOTransactionSalesTrans
RBOTransactionTable
RBOTransactionSalesTrans
Get the Number Sequence through X++
//This following code to get the number sequece by using code.
//this following example describe to get purchID and ProjJournalID
ProjJournalTable _projJournalTable;
PurchTable _PurchTable;
_projJournalTable.JournalId = NumberSeq::newGetNum(ProjParameters::numRefProjJournalId()).num();
_PurchTable.PurchId = NumberSeq::newGetNum(PurchParameters::numRefPurchId()).num();
//this following example describe to get purchID and ProjJournalID
ProjJournalTable _projJournalTable;
PurchTable _PurchTable;
_projJournalTable.JournalId = NumberSeq::newGetNum(ProjParameters::numRefProjJournalId()).num();
_PurchTable.PurchId = NumberSeq::newGetNum(PurchParameters::numRefPurchId()).num();
12 October 2011
Pass The Parameters to Class
To pass the parameter from the form selected record to class
1.Create a class as following code.
2.Add this class to Actions MenuItem.
3.In form add this MenuItemButton.
Open the form Select a record in the grid and click the button.
That record passed to the Main method. in info you will Vendor id get 2 times.
Cause New Method is calling and Post method is calling.
public class EmplProcess
{
VendTable _VendTable;
}
-
public void new(Common vTable)
{
_VendTable = vTable;
this.post();
}
-
public void post()
{
info(_VendTable.AccountNum);
}
-
public static void main(Args args)
{
Common _common;
EmplProcess _EmplProcess;
_common = args.record(); //getting the record from the form
_EmplProcess = new EmplProcess(_common);//passing the above record to the new method
_EmplProcess.post();// calling the post method
}
__________________________________________________________________________________--
While creating Object for class we can pass the parameter.
ex:
Class1 cls;
;
cls = new Class(VendTable);// this is Data Source name in Vend Table form
//in class override the new method and assign the Parameter.
public void new(VendTable vTable)
{
_VendTable = vTable;
}
1.Create a class as following code.
2.Add this class to Actions MenuItem.
3.In form add this MenuItemButton.
Open the form Select a record in the grid and click the button.
That record passed to the Main method. in info you will Vendor id get 2 times.
Cause New Method is calling and Post method is calling.
public class EmplProcess
{
VendTable _VendTable;
}
-
public void new(Common vTable)
{
_VendTable = vTable;
this.post();
}
-
public void post()
{
info(_VendTable.AccountNum);
}
-
public static void main(Args args)
{
Common _common;
EmplProcess _EmplProcess;
_common = args.record(); //getting the record from the form
_EmplProcess = new EmplProcess(_common);//passing the above record to the new method
_EmplProcess.post();// calling the post method
}
__________________________________________________________________________________--
While creating Object for class we can pass the parameter.
ex:
Class1 cls;
;
cls = new Class(VendTable);// this is Data Source name in Vend Table form
//in class override the new method and assign the Parameter.
public void new(VendTable vTable)
{
_VendTable = vTable;
}
11 October 2011
To attach a MS SQL database (.mdf) file with a missing log file
This is to attach a MS SQL database (.mdf) file with a missing log file (.ldf)
sp_attach_db 'MicrosoftDynamicsAx2012', 'D:\Program files\Microsoft SQL Server\DATA\MicrosoftDynamicsAx2012.mdf','D:\Program files\Microsoft SQL Server\DATA\MicrosoftDynamicsAx2012.ldf'
sp_attach_db 'MicrosoftDynamicsAx2012', 'D:\Program files\Microsoft SQL Server\DATA\MicrosoftDynamicsAx2012.mdf','D:\Program files\Microsoft SQL Server\DATA\MicrosoftDynamicsAx2012.ldf'
Subscribe to:
Posts (Atom)
Ledger Voucher creation Framework and x++ code to create ledger voucher
Please click her for MS reference file Below is the out of the box example reference and code. SalesInvoiceJournalPostSubBill_Extension-...
-
{ "Message" : "Please verify that the user is valid and set up correctly." } Sol: System Administration > Se...
-
Please click here to access Custom Workflow step by step process:
-
FormRun formRun = sender.formRun(); Object inventTrans_ds = formRun.dataSource(formDataSourceStr(InventMarking,InventTransO...