This site contains some Microsoft Dynamics AX X++ Codes for use in your day to day use. However please use them with caution in production environment. I will not be responsible for any Goof ups. These Codes were created during my free time and may have bugs. Use them at your own discretion. Arijit Basu | India
Tuesday, July 31, 2007
Microsoft Dynamics Snap : Wave 2.0 Pre-Release
This pre-release also comprises of the following three phase 1 snap-ins upgraded to work with Microsoft Dynamics AX 4.0 and Microsoft Office 2007:
1. Business Data Lookup Snap-in
2. Vacation management Snap-in
3. Timesheet management Snap-in
Click here to download
Monday, July 30, 2007
Service Pack 2 for Microsoft Dynamics™ AX 4.0
Microsoft Dynamics AX 4.0 Service Pack 2 includes:
-Support for 15 different document AXDs in the Application Integration Framework.
-Updates and bug fixes to functionality shipped in Microsoft Dynamics AX 4.0 Service Pack 1. Changes include areas such as Financials, BI & Reporting, Client, Cost Accounting, Customer Relationship Management, Developer & Partner Productivity Tools, Enterprise Portal, Inventory Management, Manufacturing, Master Resource Planning, Product Builder, Project Accounting, Application Object Server, and Shop Floor Control.
-Several fixes focused on stabilizing the Client and Application Object Server. This was a main focus for SP2.
CustomerSource {Requires Customersource Logon}
Friday, July 27, 2007
Post Ledger Transactions via X++
There are two ways to be considered when posting transactions:
1. Use the LedgerVoucher class and sub-classes API.
2. Use a journal Classes.
1. Use the LedgerVoucher class and sub-classes API.
The Classes are:
• LedgerVoucher - Posting {LedgerVoucher harnesses the posting of multiple vouchers at a time. }
• LedgerVoucherObject - Voucher {The LedgerVoucher class holds all the vouchers in temporary storage.}
• LedgerVoucherTransObject – Transactions {Holds transactions in each Voucher}
Instantiation of LedgerVoucher
LedgerVoucher::newLedgerPost(_detailSummary,
_sysModule,
_voucherSeriesCode,
[_transactionLogType,
_transactionLogText,
_approveJournal,
_posting]);
Instantiation of LedgerVoucherObject
LedgerVoucherObject::newVoucher(_voucher,
[_transDate,
_sysModule,
_ledgerTransType,
_correction,
_operationsTax,
_documentNum,
_documentDate]);
Instantiation of LedgerVoucherTransObject
LedgerVoucherTransObject newCreateTrans(_ledgerVoucherObject,
_ledgerPostingType,
_ledgerAccount,
_dimension,
_currencyCode,
_amountCur,
_sourceTableId,
_sourceRecId,
[_qty,
_exchRate ,
_exchRateSecond,
_exchRatesTriangulation,
_markBridging ,
ProjLedger,
AmountMST ])
Sample Code
static void LedgerVoucherAPISample(Args _args)
{
LedgerVoucher _LedgerVoucher;
LedgerVoucherObject _LedgerVoucherObject;
LedgerVoucherTransObject _LedgerVoucherTransObject;
NumberSeq _NumberSeq;
Dimension _Dimension;
NumberSequenceCode _VoucherCode = 'Ledger_3'; // 'Ledger_3' is the voucher Numbersequence in the Path AX>General Ledger>Setup>Journals>Journal Names. Its the Voucher Numref for the Journal Name :)
LedgerAccount _Account = '110180';
LedgerAccount _OffsetAccount = '140270';
AmountCur _AmountCur = 12345.67;
ttsbegin;
_NumberSeq = NumberSeq::newGetVoucherFromCode(_VoucherCode);
_LedgerVoucher = LedgerVoucher::newLedgerPost(DetailSummary::Detail,
SysModule::Ledger,
_VoucherCode);
_LedgerVoucherObject = LedgerVoucherObject::newVoucher(_NumberSeq.voucher());
_LedgerVoucher.addVoucher(_LedgerVoucherObject);
_LedgerVoucherTransObject = LedgerVoucherTransObject::newCreateTrans(_LedgerVoucherObject,
LedgerPostingType::LedgerJournal,
_Account,
_Dimension,
CompanyInfo::standardCurrency(),
_AmountCur,
0,
0);
_LedgerVoucherTransObject.parmTransTxt("Arijit Basu");
_LedgerVoucher.addTrans(_LedgerVoucherTransObject);
_LedgerVoucherTransObject = LedgerVoucherTransObject::newCreateTrans(_LedgerVoucherObject,
LedgerPostingType::LedgerJournal,
_OffsetAccount,
_Dimension,
CompanyInfo::standardCurrency(),
_AmountCur*-1,
0,
0);
_LedgerVoucherTransObject.parmTransTxt("Arijit Basu");
_LedgerVoucher.addTrans(_LedgerVoucherTransObject);
_LedgerVoucher.end();
ttscommit;
}
2. Use a journal Classes.
The tables used are LedgerJournalName, LedgerJournalTable, and LedgerJournalTrans.
The steps are:
• Create a journal table record {Table\LedgerJournalTable}
• Create lines for each transaction to be posted {Table\LedgerJournalTrans}.
• Post the journal. {Classes\LedgerJournalCheckPost}
Sample Code
static void LedgerJournalCheckPostDemo(Args _args)
{
LedgerJournalTable _LedgerJournalTable;
LedgerJournalTrans _LedgerJournalTrans;
LedgerJournalCheckPost _LedgerJournalCheckPost;
NumberSeq _NumberSeq;
ttsbegin;
//----Journal Header
_LedgerJournalTable.JournalName = 'Day1';
_LedgerJournalTable.initFromLedgerJournalName();
_LedgerJournalTable.Name = 'Daily Journal';
_LedgerJournalTable.insert();
//----Journal Line
_NumberSeq =NumberSeq::newGetVoucherFromCode(LedgerJournalName::find(_LedgerJournalTable.JournalName).VoucherSeries);
_LedgerJournalTrans.Voucher =_NumberSeq.voucher();
_LedgerJournalTrans.JournalNum =_LedgerJournalTable.JournalNum;
_LedgerJournalTrans.CurrencyCode =CompanyInfo::standardCurrency();
_LedgerJournalTrans.ExchRate =Currency::exchRate(_LedgerJournalTrans.CurrencyCode);
_LedgerJournalTrans.AccountNum ='110180';
_LedgerJournalTrans.AmountCurDebit =1000;
_LedgerJournalTrans.TransDate =Today();
_LedgerJournalTrans.OffsetAccount ='140270';
_LedgerJournalTrans.Txt ='Arijit Basu :)';
_LedgerJournalTrans.insert();
//----Journal Posting
_LedgerJournalCheckPost =LedgerJournalCheckPost::newLedgerJournalTable(_LedgerJournalTable,NoYes::Yes);
_LedgerJournalCheckPost.run();
ttscommit;
Info(StrFmt("Journal %1 is posted",_LedgerJournalTable.JournalNum));
}
Happy DAXing :)
Friday, July 20, 2007
Microsoft SQL Server Reporting Services Integration
Microsoft Dynamics AX captures data in the form of discrete business transactions. These transactions need to be analyzed and trends understood for businesses to make informed decisions. To help answer these questions, Microsoft Dynamics AX provices integration with Microsoft SQL Server Business Intelligence tools such as SQL Server reporting Services and SQL Server Analysis Services. There is a nice Demo Script will show how Microsoft Dynamics AX uses Microsoft SQL Server Reporting Services.
Click here to download [Requires Partnersource Logon]
Microsoft Dynamics AX 4.0 SP1 Role based Business Intelligence
There is a nice demo script which shows how Microsoft Dynamics™ AX integrates with Microsoft® SQL Server Analysis Services, Office Excel®, and Office SharePoint® Server to enable users to get access to the information they need in a way that is relevant to their role.
Click here to download [ Requires Partnersource Logon ]Sunday, July 15, 2007
Mobile solutions for Microsoft Dynamics AX
Click on the image to learn more
Monday, July 2, 2007
Convergence 2007 Copenhagen
Convergence is the premier Microsoft Dynamics event, bringing customers, partners, team members and industry experts together in an environment created for you to discuss solutions, address business needs and establish a true community that can be leveraged throughout the year. Its a must attend for all Dynamics folks.
Lots n Lots n Lots of Dynamics........ Lots of Action :)
Microsoft is excited to offer over 115 breakout sessions at Convergence 2007 Copenhagen built around the 10 core tracks. All sessions will be posted within the Communications Network in mid June. The Communications Network is the repository for all information to build your personal schedule while attending Convergence, including Keynote Schedules, Breakout Sessions, Chalk & Talks and much more.
Microsoft Dynamics GP
Microsoft Dynamics AX
Microsoft Dynamics NAV
Microsoft Dynamics CRM
Microsoft Dynamics C5
Microsoft Dynamics Mobile
Integrated Innovation with Microsoft Platform
Business Intelligence
Industry
Services
Click to go to the landing page.