Dynamics AX 4.0 - Smart customizations
This 30 minute talk by MFP explains how you can customize the business logic in Dynamics AX 4.0, in a way that makes future code upgrades easier.
Click here for the link
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
This 30 minute talk by MFP explains how you can customize the business logic in Dynamics AX 4.0, in a way that makes future code upgrades easier.
Click here for the link
Labels: General
The COM Class Wrapper Wizard is a great utility in DAX 4.01 which helps you create COM Wrapper Classes easily. Apart from the basic Type Libraries available from the Wizard, you can also create your own DLL and use this wizard to interface from DAX.
Ive created a simple DLL (Click here for the Link) , registered it on my PC, used this Wizard to create wrapper class inside AX. Its simple to do :)
A Small Job :) The Celsius / Fahrenheit conversion logic is in my customized DLL :)
Labels: How To's
The DAX 4.01 EP was much awaited as it was based on MS SPS, giving user more flexibility. Ive managed to set up the EP. Folks may get errors while settin it up, but there's a good document on Partnersource which will help you a lot. Remember you gotta enable ASP.NET 2.0 first (ASP.NET v2.0.50727).
Looks kewl..... :)
Labels: General
Download Microsoft Dynamics™ AX 4.0 Service Pack 1 (SP1), the current release of Microsoft Dynamics AX.
Microsoft Dynamics AX 4.0 Service Pack 1 (SP1 - Localized) is the latest version available. SP1 is a full install and recommended for new installations or upgrades from previous versions.
Note: This download has been updated with additional languages since it was first posted.
Click here to download { Requires partnersource Logon }
Labels: General
The Demo Data set for Dynamics AX 4.0 is based on the Global Trade and Manufacturing Company (GTM), a fictitious U.S. based midsized trade and manufacturing company headquartered in Los Angeles. GTM produces and assembles lamps and lamp parts, and trades with customers and vendors in Europe and the U.S. working with relevant currencies.
Click here to download {Requires Partnersource Logon}
Labels: General
Sometimes we have to write some code at a particular place, but not quite sure or something that will have to be added later on. In order to remember the place and what to do, you can use the TODO word. Put this piece of Code where u want to put some code later.
//TODO: I Have to relook at this code --> ARIJIT
On the Complier, this appears on the Tasks Tab of the Compiler.
See Screenshot below.
Labels: How To's
DAX 4.0 comes with ZERO BP errors. Heres how to enable the BP in DAX so as to make your codes BP Complaint.
From the Compiler, Click Setup>Compiler
A Form opens up. Select Diagonistic Level to 'Level 4'. By default its 'Level 3'.Click apply after selection.
Now again from the Compiler, Click Setup>Best Practices. A New Form opens up. Check all the BP rules that you want to apply. Click Apply after Selection.
Now Close the Compiler and Now Compile your Project/Developement and on the BP tab of the Compiler you can see your BP Violations. The Objective is to reduce them to ZERO.
ENJOY :)
Labels: How To's
Below are the steps to show the DAX 3 Menu in DAX 4.0. Remember you cannot change the DAX 4.0 Navigation Pane but you can create a similar toolbar :)
Labels: How To's
At times, you may want a form to be automatically updated at a certain time interval, for example if the data displayed in the form frequently changes or you would like to execute a task from a form at certain time intervals.
All forms inherit properties from the Object kernel class. The SetTimeOut() method is located in this class.
This method is used with three parameters,the first two of which are mandatory.
- The first one indicates the ID of the method to be activated.
- The second indicates the number of thousandths of seconds for the method, specified in the first parameter that is executed.
- The last parameter is a boolean that is used to indicate how the time is measured.
If the parameter is set to true then the idle time is measured from when the keyboard or mouse was used. Use false to indicate that the time should be measure since the last time SetTimeOut() was executed.
You can execute this method from a form with the code:
element.SetTimeOut(identifierstr(YourMethodName),5000,false);
Labels: X++
We often get this MS Outlook prompt when we send email from AX...
There is a Utility which automatically clicks the Yes Button. The Name is ClickYes.
Heres the download link. Its kinda nice.Check it out...
Labels: How To's
If you are familiar with upgrading from earlier versions of Microsoft Dynamics AX, you should be aware that the upgrade scenarios to Microsoft Dynamics AX 4.0, and from Microsoft Dynamics AX 4.0 to Microsoft Dynamics AX 4.0 with Service Pack 1, differ from previous scenarios. A whitepaper is available at Partnersource which describes the steps in upgrading DAX 4.0 to DAX 4.0 SP1.
Click Here for the link {Requires Partnersource Logon}
Labels: General
I thank Microsoft for putting the link to this BLOG on their Dynamics Communities Landing Page on the Microsoft Site.
Click to go to the Dynamics Communities Landing Page on the Microsoft Site
Labels: General
This is how u can call a dll from AX. I have used the Beep function in kernel32.dll
The parameters of Beep are
BOOL Beep(DWORD dwFreq,DWORD dwDuration);
To get more information on Beep Click here
The AX Code is
static void AB_DLL(Args _args)
{
DLL winApiDLL = new DLL('kernel32');
DLLFunction Function = new DLLFunction(winApiDLL,'Beep');
Function.arg(extTypes::DWord,extTypes::DWord);
Function.call(400,1000);
}
Run this and u'll hear a beep (if ur sound is on).
Labels: X++
In August 2006, Microsoft Corporation conducted the Microsoft Dynamics AX™ 4.0 Standard distribution benchmark to measure the performance and scalability characteristics of Microsoft Dynamics AX 4.0 in a simulated distribution scenario. This benchmark exercised core Accounts Receivables scenarios around order entry through invoicing, in addition to Procure to Pay processes around purchase order creation through receiving of goods.
Download White paper {Requires Partnersource Logon}
Labels: General
Microsoft BizTalk Server and Microsoft Dynamics AX: Integration Solutions for the Extended Enterprise White Paper
Large organizations struggle to maintain a balance between centralization in order to control system and information complexity across the extended enterprise and decentralization in order to encourage flexibility and agility among local subsidiaries or divisions. Through deployment of Microsoft Dynamics™ AX and Microsoft® BizTalk Server, enterprises can realize not only a simple, high-value solution that offers visibility, insight and control of information across the entire organization, but also the flexibility and agility that branch offices and subsidiaries require in order to innovate, grow, and compete effectively. This white paper will be of interest to the business decision maker who is looking to find a robust, high value solution that provides cross-functional integration and coordination of business applications and supply chain management applications across the extended enterprise.
Download the white paper {Require Partnersource Logon}Labels: General
The Microsoft Dynamics AX 4.0 version of the Rapid Configuration Tool is now available. This version of the tool builds on the previous two versions and works with the latest release of Microsoft Dynamics AX 4.0.
Download Rapid Configuration Tool (RCT)The Rapid Configuration Tool (RCT) for Microsoft Dynamics AX 4.0 is a tool that supports both partners and customers in the implementation and configuration process by providing and linking project management features, easier configuration access, communication support and documentation on how to configure Microsoft Dynamics AX. The Rapid Configuration Tool consists of functionality implemented as a module within Microsoft Dynamics AX.
{Requires Partnersource Logon}Labels: General
Ive used EmplTable and have exported EmplId & Name. You can extend this :)
static void ArijitExcel(Args _args)
{
EmplTable EmplTableLocal;
SysExcelApplication excelApp;
SysExcelWorkSheet excelWorksheet;
SysExcelRange excelRange;
SysExcelCells excelCells;
SysExcelCell excelCell;
ComVariant cellValue;
Int i=1;
;
excelApp = SysExcelApplication::construct();
cellValue = new ComVariant() ;
excelApp.workbooks().add();
excelWorksheet = excelApp.worksheets().itemFromNum( 1 );
excelCells = excelWorksheet.cells();
while select * from EmplTableLocal
{
excelCells.item(i+4,4).value(cellValue.bStr(EmplTableLocal.EmplId));
excelCells.item(i+4,5).value(cellValue.bStr(EmplTableLocal.Name));
i++;
}
excelApp.visible(true);
//excelApp.quit();
}
Labels: X++
Super() is a call to the overriden method concerned in the super or parent class.
For the click event it does not serve any purpose since there is no change in functionallity if you remove it and you will not get any error.
For example:
if you create a class myCLASS1 and then inherit from it and override a method on it the call to super will execute the code from the inherited class.
If you remove super that code will not be executed and you may write different code for this method in the child class.
Simple :)
Labels: X++
Sometimes when Launching AX, we get an error as shown below :
"Microsoft Business Solutions-Axapta installation has no text file (axsysen-us.ktd)"
The problem is with the ACU config file in the bindir textbox, on the following line:
So change this to:
bindir,Text,C:\mbs\axapta client\Bin
The Ktd files live in the \Bin\ folder instead of the \Appl\ folder.
This will resolve your issue :)Labels: Troubleshooting
The last few weeks were kinda very busy for me as i was responsible for puttin together our team KM Portal. Being a MS freak and since DAX 4 EP is on MS SPS2003 , I decided to go ahead with MS SPS 2003 SP2 and finally it went live today. Here's the home page.
Labels: General
Heres the Code :)
COM wordApplication;
COM wordDocuments;
COM wordDocument;
COM wordRange;
;
wordApplication = new COM("word.application");
wordApplication.visible(TRUE);
wordDocuments = wordApplication.Documents();
wordDocument = wordDocuments.add();
wordDocument.saveas("c:\\YourDocument.doc");
wordDocument.activate();
wordRange = wordDocument.range(0,0);
wordRange.insertafter("Arijit Basu");
wordRange = wordDocument.range(6,19);
wordRange = wordDocument.range(11,26);
wordRange.italic(true);
wordDocument.save();
wordDocument.close();
wordApplication.quit();
Labels: X++
A small challenge for the DAX lovers . MFP has created reated a small crossword using X++ system functions .
The prize is: One copy of "Inside Dynamics AX" - signed by the authors.
Please go to Blog of Michael Fruergaard Pontoppidan {MFP} link to answer this crossword :)
Last date is 20th Dec 2006.
Labels: X++
If you want to implement the pack/unpack mechanism on the Form {like the ones used in Runbase Classes} , it is easy ...
Besides Pack/Unpack, add these methods:
public dataAreaId lastValueDataAreaId()
{
return curExt();
}
private UserId lastValueUserId()
{
return curuserid();
}
private UtilElementType lastValueType()
{
return UtilElementType::Form;
}
private IdentifierName lastValueElementName()
{
return this.name();
}
private IdentifierName lastValueDesignName()
{
return '';
}
void initParmDefault()
{
}
In Close method of the form:
public void close()
{
super();
//add saveLast method after super()
xSysLastValue::saveLast(this);
}
in init method of the form:
public void init()
{
;
//Add getLast method before super()
xSysLastValue::getLast(this);
super();
…
}
Labels: X++
The Consultant Toolkit for Microsoft Business Solutions–Axapta®, now a part of Microsoft Dynamics, includes: step-by-step methodologies, project tools, templates, delivery guides, and packaged service offerings (QuickStart and QuickPlan for Microsoft Business Solutions-Axapta).
DAX Consultant Toolkit { Requires Partnersource Logon }
Its a very good resource for DAX Professionals, DAX Project managers and has tons of useful stuff , templates etc. Worth checking out.
Hope you like it :)
Labels: General
The Microsoft Industry Builder initiative is a structured program in which Microsoft works together with select independent software vendors (ISVs) to deliver complete, top-quality solutions that meet the unique needs of different industries. Microsoft Dynamics AX software solutions that are developed through this program meet Microsoft's strict quality standards and are packaged with a Microsoft-backed customer support offering. Check out just some of the benefits below that the program offers.
Industry solutions for Microsoft Dynamics AX
Labels: General
When Axapta®, now Microsoft® Business Solutions–Axapta { Microsoft Dynamics AX}, was released in 1998, it brought an exciting new object-oriented technology within reach of midsize companies that needed a powerful, scalable business management suite to run their operations. The new solution featured advanced ideas and technology such as:
* Multilanguage, multi-country capability
* Auto size (IntelliMorph), for easy customization
* Feature keys, for easy upgrades
* No fixed numbers
* Keep information stored in one single database
* Separate user interface, business logic and database (3-tier)
Since the release of Axapta 1.0, the solution has expanded dramatically in scope and capability. Read below for a brief history of major releases, as well as the core technological advances.
Axapta 1.0 - March 1998
· Released in the US and Denmark
· Financial, trade, inventory management, logistics and production, Microsoft SQL Server 6.5
Axapta 1.5 - November 1998
Early release in Norway, Sweden, Germany, UK, Netherlands, Austria, Switzerland, Belgium Spain and the European Union
Publishing Manager, call COM, Service Pack technology, Microsoft SQL Server 7.0
Axapta 2.0 - July 1999
Project Accounting module, WMS, External OLAP, Option Pack concept, ActiveX support, COM-connector and an early release of Axapta Object Server
Axapta 2.1 - January 2000
Market demands from Germany, Austria, Switzerland and Spain
Web tools and CSS (The first WebApp), Microsoft SQL Server 2000, database log
Microsoft Windows 2000 logo
Axapta 2.5 – December 2000
Complete Web applications development environment
Auto upgrade tool, ESS (Project), Banking, First step of Load’n’Go, OLAP within Axapta, XML support, FA to Denmark, Austria and UK
Domains and ASP support, DBCS Support
Axapta 2.5 Market Pack – October 2001
Released in France and Italy
Marketing Automation (CRM), Commerce Gateway, Product Builder (Web application as well), training and Event Management (Web application as well)
Microsoft Axapta 3.0 - October 2002
Microsoft Axapta Enterprise Portal, intercompany collaboration
New security and configuration keys
Expanded geographical reach (more countries)
Demand planning
Enhanced partner productivity tools
The above history is obtained from Partnersource. heres the link...
A Short History of DAX
Labels: General
Wonderful AX Demos available at this link
Its a absolute must see for all DAX folks
https://microsoftdynamicsax.demoservers.com/
Registration required (I've got mine and its kinda good, but a bit slow. You need a very good Internet connectivity. Good stuff though.)
Labels: General
The Architecture Journal brings together some of the best thinkers in the industry, and their articles have covered a variety of highly relevant topics for the software industry.
Its a must read for every Tech Savvy guy/gal :)
http://www.architecturejournal.net/
Its top level thought from some of the worlds greatest brains.
Labels: General
Microsoft Dynamics AX 4.0 Download
Dynamics AX 4.0
Microsoft Dynamics AX 4.0 Service Pack 1 release
Dynamics AX 4.0 SP1
{The above links require Partnersource Logon}
Labels: General
Aggreg8 is a social networking and collaboration space for the IT community. Inside you can keep track of your trusted network, find others through your network with similar interests or situations.
http://aggreg8.net/default.aspx
Definitely worth checking out.....
Labels: General
DAX system tables contain data that the DAX kernel uses to control the behavior of the kernel. DAX system tables are created automatically by the kernel when DAX is started for the first time against an empty database or after a service pack upgrade.
ACCESSRIGHTSLIST
This table contains info about explicit granted access rights for the defined user groups.
COMPANYDOMAINLIST
This table contains relation between companies and domains.
DATAAREA
This table contains data about created companies.
DATABASELOG
This table contains data about which tables and events to log. The events are logged in the DAX tableSysDatabaseLog.
DOMAININFO
This table contains data about domains.
PRINTJOBHEADER
This table is used in connection with printing from DAX.
PRINTJOBPAGES
This table is used in connection with printing from DAX.
SQLDESCRIBE
This table is used temporarily during check / synchronisation process and should normally be empty.
SQLDICTIONARY
This table contains data dictionary data about DAX application and system tables (except SQLstemVariables) as stored in DAX data dictionary.
SYSCONFIG
This table contains license information, version, feature key setup, and other basic system configuration data.
USERGROUPLIST
Table describes relation between users and user groups.
USERINFO
Table is used to store general setup.
{Please use them with utmost care}
Labels: X++
One of my clients wanted a solution where by he could notify/e mail employees/members/groups directly from PO & SO. So I came up with a small utility which allowed a user to notify directly from PO & So Forms via e mail.
Happy mailin :)
Labels: How To's
Temporary tables are used for non-persistent storage in Microsoft Axapta.
They are useful in two common situations
1. As the datasource for a form or report, where the original data is too complex to be easily queried.
2. As temporary storage during complicated processing, to hold the results midway through the process.
Scoping rules for temporary tables
In general, each instance of a temporary table, and it's associated data, will only exist while the buffer variable used to access it is in scope.
You can point multiple buffer variables to the same instance of a temporary table by using either the .setTmpData() method or by directly assigning the buffers to each other, identically to normal tables. In this way, even if your original buffer variable goes out of scope, your data will be retained while one of the other referencing variables remains.
Be aware that static table methods - such as find() - will not work with temporary tables unless you pass through the buffer variable to the method.
For example, this method will not work on a temporary table, as the tempTable variable used is newly created and will always contain no records.
public static TempTable find(AccountNum _accountNum, boolean _forUpdate = false)
{
TempTable tempTable;
;
if (_accountNum)
{
tempTable.selectForUpdate(_forUpdate);
select firstonly tempTable
where tempTable.AccountNum == _accountNum;
}
return tempTable;
}
If you want to have a find() method on your temporary table, then you will need to modify it slightly to pass through a reference to our populated temporary table.
public static TempTable find(AccountNum _accountNum, TempTable _tempTable, boolean _forUpdate = false)
{
if (_accountNum)
{
_tempTable.selectForUpdate(_forUpdate);
select firstonly _tempTable
where _tempTable.AccountNum == _accountNum;
}
return _tempTable;
}
Some examples of populating and using temporary tables can be found in project.
Creating temporary tables
In the AOT
Set the Temporary property to Yes to create a table which will always be temporary.
Note that any existing data will be permanently deleted if you do this!
Of course, you can no longer use the Table Browser to check the data, as the data is stored only per scoped instance of this table.
Making an existing table temporary
You can convert a normal table to a temporary table in code. For example, if you wish to create a temporary copy of the inventory table:
InventTable inventTable;
;
inventTable.setTmp();
Doing so will remove all data from the temporary copy of the table. If you wish to create a populated temporary copy of a standard table, you can do the following:
InventTable inventTable;
InventTable inventTableTmp;
;
inventTableTmp.setTmp();
while select inventTable
{
inventTableTmp.data(inventTable.data());
inventTableTmp.doInsert();
}
You can now add, modify or delete data from the table without affecting the real contents stored in the database.
Temporary tables in forms
Using temporary tables in forms requires the use of the .setTmpData() method.
For example:
The temporary table data is populated in a static class method (running server side), which is called from the form and returns the populated table. We could populate a form-level buffer with the temporary data if needed, or else just call the populating method directly from the setTmpData() call as shown below.
In the form datasource init(), we use .setTmpData() to instruct the datasource query to use our temporary table. Our datasource name in this example is TempTable.
public void init()
{
super();
TempTable.setTmpData(tmpTableClass::populateTmpData());
}
Temporary tables in reports
The correct method of using temporary tables in reports is slightly different from that of forms.
The most important difference is the use of .setRecord() instead of .setTmpData(). A simple example follows:
public boolean fetch()
{
boolean ret;
this.queryRun().setRecord(tmpTableClass::populateTmpData());
ret = super();
return ret;
}
As there is often already a supporting RunBaseReport class being used to run the report, it is easy to integrate the population of the temporary data into that existing class. This is particularly useful if you need the data in the temporary table to be dependent on information entered into the report dialog prompt by the user.
Labels: How To's
Recently I came across a situation in AX where I needed to capture a lot of Information in Journal Trans form for a specific journal type and while posting the Journal, those data needed to be updated in a separate table. So instead of working with the base Ledger Journal Types, I found it convenient to create a new Ledger Journal type. The objects used are shown below. In case further info is required, lemme know :)
In case u have a better idea, also lemme know :-D
Happy Journaling.....
You can also extend this model to create your own posting profiles [I'm recently workin on tat :) ]
Labels: X++