Monday, 15 November 2010

First experience in develop Enterprise portal for AX 2009

Create new website base on Dynamics AX Enterprise Portal template causes error:

"Unable to connect to Microsoft Dynamics AX. The Dynamics AX Enterprise Portal Tools are not available".


+ Make sure your AOS is running.
+ Make sure your BC connection is configured correctly.
+ If you have AX 4.0 and AX 5.0 in the same box, check the PATH variable to make sure that the path to AX 5.0 bin folder is before AX 4.0.

Visual studio is hang out when you switch from development mode to design mode.

+ If your VS is 2008 and your MS office is 2000, refer to

+ If your VS is 2008 and your MS office is 2010, refer to

Friday, 29 October 2010

Utility tool for my daily work

One of my favorite tool is Winmerge!!! I cannot imagine what my life should be without Winmerge. Thanks a lot Winmerge team!!!

Thursday, 9 September 2010

setup security for Axapta

Following is just my draft article to summarize my idea/ experience about how to setup security for AX.

One of the pain point of deploying solution to client is to setup security. The reason is that there is no template in security for different companies.
In order to setup security for Axapta, consultant has to know:
• Company Departments/subsidiaries and who to do what: for ex: manager and his assistant have a right to setup a new discount amount for a item, other member in that department has right to create new sales order (1)
• Company business workflow: The business workflow determines how documents are moving/ transferring between departments. For ex: a sales order can be created/confirmed by Commercial team but the packing slip is done by warehousing team, and the sales invoice is posted by accounting team (2)

As its difficulties, a consultant who setup AX security should to know: (3)
o All information above (1),(2)
o Technical design underneath application: (license code, configuration key, security key, company domain in AX, record level security, field security, tables, menu items,….). In addition, when new modules/ functions are added into AX, the security should take into consideration. It includes (4):
 Require new configuration key? If yes, the license purchase from Microsoft should take into consideration, add new configuration key is required
 Require new security key? If yes, the license purchase from Microsoft should take into consideration, add new security key is required. If no, which security key will be the parent key for new modules/functions
 Security in added code.

So security should take into consider at the first phase as much as possible.

In my opinion technical consultant (that understand buz workflow + has training manual from functional consultant) is a suitable person to setup AX security
So before start to setup AX security, consultant has to:
• Has enough information about (1), (2): requisition
• Has knowledge about (3)
• Good design/documents about (4)

Best practice for AX security setup:
• Define domain.
• Turn configuration key on/off
• Setup access level for parent key
• Disable unnecessary features/forms by using security keys
• Turn on features that are going to be used

How to test security?
One of the first idea comes out is that we add a test user account in to AX system and login a workstation to test.There are not such tools to test it automatically at this moment. To save time we can reate a new user account, assign user to a member group and test manually. By using runas command we can setup and test in the same PC.


Monday, 26 April 2010

Display Inventory onhand in Sales order line

Rquirement: to display inventory on- hand in sales line.

-Add a new method into SalesLine datasource:
//BP Deviation documented
display inventQty availPhysical(SalesLine _SalesLine)
InventOnhand InventOnhand;
InventDimParm inventDimParm;
if (inventDim.configId != '')
inventDimParm.ConfigIdFlag = NoYes::Yes;
if (inventDim.inventBatchId != '')
inventDimParm.InventBatchIdFlag = NoYes::Yes;
if (inventDim.InventColorId != '')
inventDimParm.InventColorIdFlag = NoYes::Yes;
if (inventDim.InventLocationId != '')
inventDimParm.InventLocationIdFlag = NoYes::Yes;
if (inventDim.inventSerialId != '')
inventDimParm.InventSerialIdFlag = NoYes::Yes;
if (inventDim.InventSiteId != '')
inventDimParm.InventSiteIdFlag = NoYes::Yes;
if (inventDim.InventSizeId != '')
inventDimParm.InventSizeIdFlag = NoYes::Yes;
if (inventDim.wMSLocationId != '')
inventDimParm.WMSLocationIdFlag = NoYes::Yes;
if (inventDim.wMSPalletId != '')
inventDimParm.WMSPalletIdFlag = NoYes::Yes;
InventOnhand =
return inventOnHand.availPhysical();

-Customize modified method of inventdim's fields datasource :
public void modified()
SalesLine salesLineFind;


if (salesLine.DeliveryDateControlType)

// finds the current selected sales line
salesLineFind = SalesLine::find(salesLine.SalesId, salesLine.LineNum);
// syncs sales table with db
// updates table ui
// finds the current selected sales line
-Add a Real field into SaleLine grid with display method is set to the method created in step 1.


Friday, 6 March 2009

Helpful Purchase Order and Sales order info

When working with a client, and doing data imports of their data into the new Ax instance you might have to bring in open purchase orders or sales orders. The great thing about this is that both of these are very similar in how they function, look, act, etc. One of the key things to understand when bringing in, for example, purchase orders is the Quantity tab and the data that lives there. The easiest peice about this is the actual Quantity or Purchase Quantity. The thing to keep in mind here when mapping and filling this field with data, is that in reality it's two fields: QtyOrdered, PurchQtyThis is a key peice of data that you must first fill to build everything in the Quantity tab from. The next field that needs to be explained and understood is the Deliver Remainder field on the Qty tab. This field specifys how much of the purchase qty is left to be delivered to the specified delivery address. As long as there is data in this field then the given purchase order is still marked as Open. This field, is actually two fields in the table: RemainInventPhysical, RemainPurchPhysicalOur next field to look at is the Invoice Remainder. This field tells you how much of the purchase qty, that has been recieved, but not yet been invoiced. This field is actually one field called: RemainPurchFinancial.The next two fields we are going to talk about is the Invoiced and Recieved fields in the tab. These fields are actual not fields in the PurchLine database, but rather are driven from Display methods off of the PurchLine Table itself. These display methods are called: Recieved = PurchLine.receivedInTotal(), Invoiced = PurchLine.invoicedInTotal(). What you need to keep in mind here is that these fields are acutally built off of the vendPackingSlipTrans table (Recieved) and the vendInvoiceTrans table (Invoiced). These tables must have values in them, as they represent actual receiving actions doen to the given purchase order line, and invoicing done. This is something that can be tricky, and must be done correctly, as if done wrong you can have incorrect data in these two tables that can cause reports to be off, etc. A lot of people / companies at this point decide to back out of the recieved and invoiced values and then for each open PO, redo these actions from within axapta in order to make sure all reporting and values are accurate and percise to maintain data integrity. The last field we will review, which happens to be the first field in the tab is the Recieve Now field. This field, when supplied with a value, can be used to mark a given qty for the specified line, during a packing slip update to be marked as recieved. Now we can go further into the details of this and how each field pertains to different actions, etc. What most important to understand is this base knowledge though and from there build upon that during your use of Ax. To Re-cap below is a list of these Field names, and then there actual field name in the table. Also I have included the logic for how Ax determines the status of a given PO or SO:1. Quantity = PurchLine.QtyOrdered, PurchLine.PurchQty2. Deliver Remainder = PurchLine.RemainInventPhysical, PurchLine.RemainPurchPhysical3. Invoice Remainder = PurchLine.RemainPurchFinancial4. Invoiced = PurchLine.invoicedinTotal() [Display Method]5. Recieved = PurchLine.recievedInTotal() [Display Method]Status Logic:If anything exists in the Deliver Remainder then the PO is open.If Nothing exsists in the Deliver Remainder, and all Qty Ordered exist in the Recieved then the PO is recievedIf all qty has been recieved, and all has been invoiced, then the PO is invoiced.

P/S: There is a bug in Axapta which will be fixed if you know above useful information!!!

Sunday, 4 January 2009

New year, new HOPES

A new year is comming and our real works with Microsoft is come true!!!!
Last Friday, I sent an email to Dynamics Axapta Build team to ask them about our license in Axapta. And out of my supprise, the replied my email quickly. I really appreciate their helps and I also know that right now our new hard challenges is comming too. I like challenge!!!
Our main duties with Microsoft is Axapta bug fixing.

Wednesday, 17 September 2008

Windows Test Technicque For Axapta

Last weeks, I recevied some  resources from our Ukraine about Test Automation. It's called WTT. Unfortunately, we didn't understand what  it is about. We just read the document and we was really in a circle. Where could we start? What is the first step to deal with Axapta Test Automation?
It were hard questions for me because I never deal with test automation before. (I just know UniTest)
But, lucky me, my dear friend Danang sent us videos to demonstrate how to deal with WTT.
Right now, with all of our Celenia Vietnam mates, I think we are ready for implementing real testcase.
I also hope that we will deal with Axapta 2009 as much as possible.