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".


Solutions:

+ 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.
http://blogs.msdn.com/b/emeadaxsupport/archive/2009/04/24/side-by-side-installation-of-dynamcis-ax-4-0-client-and-dynamics-ax-2009-client.aspx

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 http://blogs.msdn.com/b/mikhailarkhipov/archive/2007/12/14/compatibility-problem-between-vs-2008-and-office-2000-and-how-to-fix-it.aspx

+ If your VS is 2008 and your MS office is 2010, refer to http://blogs.msdn.com/b/webdevtools/archive/2008/10/03/troubleshooting-visual-studion-2008-design-view-hangs-issues.aspx

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.

Enjoy!!!

Monday 26 April 2010

Display Inventory onhand in Sales order line


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

Solution:
-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 =
InventOnhand::newParameters(_salesLine.ItemId,
_salesLine.inventDim(),
inventDimParm);
return inventOnHand.availPhysical();
}

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

salesLine.modifyItemDim(inventDim,fieldnum(InventDim,InventBatchId),InventTable::find(salesLine.ItemId).DimGroupId);

if (salesLine.DeliveryDateControlType)
SalesCalcAvailableDlvDates::modifiedField(salesLine,0,false,false,inventDim);

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

Enjoy!