Saturday, November 15, 2008

What's New in Microsoft Dynamics AX 2009 for Developers

The following information provides descriptions about many of the features that are available in Microsoft Dynamics AX. Updated and additional developer documentation for Microsoft Dynamics AX can be found at the Microsoft Dynamics AX Developer Center on the Microsoft Developer Network (MSDN). The following features are described in this document.

http://doc.qiuhao.com/ax5/html/87b44ddc-5504-4877-ae74-4c10cc5b30a4.htm

Wednesday, August 6, 2008

How to do Make to Order (MTO) in Axapta

TO do Make to order in AX you should do these steps:
1:- first go to sales order create new one and select the item.
After That go to setup tab
2:- Leave today’s date as the Delivery date. Axapta will tell
us the exact date that the order can be delivered.
Since this item is a make to order item.
3:- the next step is to run the master schedule to be able to
see when we can deliver the goods.
4:- We have two ways of running the master schedule, we can
either go to the Master Planning a Periodic Master
Scheduling session, or we can run it just for this
item right from the sales order lines.
5:- Sales order explosion gives you the ability to break down
a BOM item, and calculate an earliest possible delivery
date based on route and incoming items using
Available-to-promise (ATP), which calculates delivery
date based on available inventory and current production
orders, and Capable-to-promise(CTP), which calculates
delivery date based on available materials and
production capacity.
6:-We will run the master schedule straight for the sales order,
to do so,click on the inquires button and select the option
explosion.we can see our request date, but to find out if
we can actually satisfy the requested delivery date we need
to run the master plan.
7:-Press the update button, which will run the Master Planning engine
for this item/sales order. The following screen will come up.
The system is also showing us that in reality we will only be
able to satisfy this customer at a later date; that date is
showed in the future date field.

This is the Make to order in Axapta

Friday, August 1, 2008

New book on AX 5.0/2009 development

On Amazon I stumbled on this new book: Microsoft Dynamics AX 5.0 Programming Unleashed

I have been doing some work on 5.0 / 2009 the last few weeks and there really is a lot of new stuff to write about, so I'm looking forward to the release.

Monday, July 28, 2008

GRC: Big Thing in Dynamics AX 2009 RTM

GRC. You probably haven't heard or read a lot about it, but it will be a major topic of conversation at the upcoming Convergence conference in Orlando next month, and beyond.

It stands for ‘Governance, Risk and Compliance Platform', and it will be one of the major new features in the new release of Dynamics AX 2009, due out about the middle of this year (aka: DAX 5.0).

GRC is being talked about a lot by the top level management of Microsoft Business Solutions because of its growing importance in managing corporate governance and regulatory matters. CVP Kirill Tatarinov discussed it at this past year's EMEA Convergence in October of 2007.

"GRC, Governance, Risk and Compliance platform, delivered within the AX product, will be one of the more significant and important" upcoming features, - Tatarinov stated.

This was the first real recorded mention of GRC being slated as one of the more significant new offerings in Dynamics AX 2009..

At Convergence, I would expect the features of GRC in AX 2009 to get a lot of attention-especially in terms of where it fits for Sarbanes-Oxley (SOX), and other possible compliance requirements. Its relationship to risk and governance tells us GRC inclusion could lead to more business process management layered functionality for Dynamics AX 2009, instead of being outside of Dynamics AX.

If you want further proof GRC is going to be a hot topic as a major new feature in Dynamics AX 2009, Tatarinov, on Feb. 4th released a Dynamics AX video in which he discussed the upcoming release of Dynamics AX 2009,including further mention of 'Governance, Risk and Compliance Platform' or GRC being a major part of that upcoming release.

For both public and private companies, this new offering is going to significantly open the door for obtaining valuable insights into underlying business processes. This could in turn lead to more processes being tracked and adapted to urgent business issues at hand via Dynamics.

STEPS BEFORE ERP IMPLEMENTATION:-

1 System Study
2 Gap analysis
3 Mapping with business process
4 Filling the process gap
5 Preparation of Master Data
6 Checking of Master Data
7 Authorization/ Approval of Master data
8 Uploading of Master Data
9 Testing the Processes
10 Checking of Reports & Documents
11 Core user training
12 End user training
13 Pre-go live approval
14 Golive
15 Post Implementation support

Thursday, July 24, 2008

difference between call by value and call by reference

Call by value :-
Call by Value means that the calling program is passing the value of the literal, or identifier, not a reference to the sending item. The called program can change the parameter in the called program. However, because the subprogram has access only to a temporary copy of the sending item, those changes don't affect the argument in the calling program
Example
static void Classes_CallByValue(Args _args)
{
MyClass_PassingValues passingValues = new MyClass_PassingValues();
Counter counter = 100;
;

info(strFmt("%1", counter));
info(strFmt("%1", passingValues.callByValue(counter)));
info(strFmt("%1", counter));
}
Call-by-reference
Call-by-reference is a way to pass an object as a parameter to a function,that any changes made by the subprogram to the variables it received are visible by the calling program.
Example
static void Classes_CallByReference(Args _args)
{
CustTable custTable;
TmpAccountSum tmpAccountSum;
MyClass_PassingValues passingValues = new MyClass_PassingValues();
Counter counter;
;

while select custTable
{
counter++;

if (counter > 5)
break;

tmpAccountSum.accountNum = custTable.accountNum;
tmpAccountSum.insert();
}

select tmpAccountSum;

info(tmpAccountSum.accountNum);
passingValues.callByReference(tmpAccountSum);
info(tmpAccountSum.accountNum);
}

Unbalanced TTSBEGIN/TTSCOMMIT

fix for unbalanced TTS

This usually leaves your Ax session in an unusable state that you can’t close properly. However, there’s no need to get out the big guns and kill the process with the Task Manager.

Instead, if possible, open the AOT and run this job:

static void resetTTS(Args _args)
{
    while (appl.ttsLevel() > 0)
        ttsAbort;
}
It It simply rolls back any pending transactions until the TTS level is back at zero.

Open web pages from X++ code or Run External Application

Run External Application

The interesting part is that executing external application is fairly effortless in Dynamics Ax. X++ is capable of calling Microsoft Windows Application Programming Interface (API). The common functionalities of the Win API have been built in classes WinAPI, WinAPIServer, WinGDI and WinInet. Running external application could be achieved through the static method WinAPI::shellExecute.

Static Method WinAPI::shellExecute

This method takes six parameters where five of them are optional parameters. The following code segment shows the interface of this method.

client static int shellExecute(
Filename _lpFile,
str _lpParameters = '',
str _lpDirectory = '',
str _lpOperation = #ShellExeOpen,
int _show = #SW_SHOWNORMAL,
boolean _waitForCompletion = false
)

The interface might look complicated but the first parameter is usually all we need to assign. It is sufficient to achieve most of the scenarios. The second parameter allows us to execute an executable with parameters. We will look at examples where this second parameter comes into play later.

Class SysShellExecute

The class SysShellExecute facilitates calling WinAPI::shellExecute. This class has a main method that call the method WinAPI::shellExecute using args.parm() as the first parameter. This enables WinAPI::shellExecute to be called from menu item with ease. This is important Dynamics Ax bring up windows through menu item. Menu item works with buttons with ease.

The previous approach opens the file or URL in the default application. There are cases where you need to specify the application to open the file with. You may achieve this with static method WinAPI::shellExecute.

Let say the default browser for your computer is FireFox and the website you are opening requires Internet Explorer. You may use the following code to open the URL with Internet Explorer.

WinApi::shellExecute("http://www.yahoo.com");

Using Info Class

use urlLookup() method of infoclass
If you want to open the Internet Explorer with a certain web page directly from X++ code, you can use the following statement:

infoLog.urlLookup('http://www.yahoo.com');

Thus, your browser will open and display the URL.

Tuesday, July 22, 2008

Reverse Engineering Microsoft Dynamics AX

New Layers in Dynamics AX 2009


New Layers in Dynamics AX 2009


4 layers have been renamed in Dynamics AX 2009 . DIS / DIP / LOS / LOP have become HFX / SL1 / SL2 / SL3 respectively. HFX is reserved for releasing hot fixes, and the 3 new solution layers (SL1/SL2/SL3) will be used to release Microsoft Dynamics Industry Solutions.

The purpose of having 3 solution layers is to enable side-by-side install of Industry Solutions. At deployment time any SL1 layer can be renamed to SL2, SL3, BUS or BUP through a regular file rename. The AOS will recognize the layer, and honor its position in the layer stack. This will enable installing up to 3 Industry Solutions on the same system (or up to 5 Industry Solutions if the BUS and BUP layers are vacant.)

Another aspect of side-by-side installation is conflicting names and IDs in the model. The AX platform requires unique names and IDs of all model elements, we will ensure uniqueness across Industry Solutions through our engineering processes. Naturally there will be logically overlayering conflicts for certain elements; but as the Industry Solutions by nature are verticals we anticipate very few of these. These conflicts will need to be resolved; one way is to reclaim one of the SLx layers as an adaptation layer. More information on this will be available as the Industry Solutions become available.

How can I validat the date

static void validatedate(Args _args)
{
int num1,num2;
str datevar;
date date1;
datevar = "31.4.2007";

date1 = str2date(datevar,123);
print date1;
numbr1 = str2int(substr(datevar,0,2));
numbr2 = dayofmth(date1);
if (num1 > num2)
print "invalid date";
}