Sunday, November 28, 2010

AX 2009 VPC(Refresh 4) available for download

Hi All,
A new Virtual PC for AX 2009(Refresh 4) is available for download from the below specified link.This virtual machine is configured for Windows 2008 Hyper-V and can’t be used with VPC (or Windows 7 Virtualization). https://mbs.microsoft.com/Cms/Templates/document/General.aspx?NRMODE=Published&NRNODEGUID={6CCBE1D6-1CF9-4D11-AEBE-9377E3175834}&NRORIGINALURL=/customersource/documentation/setupguides/MSDYAX2009_DemoToolkit_Refresh4&NRCACHEHINT=Guest&wa=wsignin1.0

Alternatively,you could download the Refresh 3 VPC available from the below link which is configured using the same Microsoft Virtual PC Software.
https://mbs.microsoft.com/customersource/documentation/setupguides/MSDYAX2009_DemoToolKit_Refresh3_5

The new licence key for the Refresh 3 is also available for download from the below link,so that you can update the licence key alone if you have the VPC already.
https://mbs.microsoft.com/customersource/documentation/setupguides/MSDYAX2009_DemoToolKit_Refresh3





Thursday, November 25, 2010

Dynamics AX 2009 Rollup 6 has been released

Hi All,
Dynamics AX 2009 SP1 rollup 6 has been released and it is available for downlaod as a Knowledge Base Article in the following link.
https://mbs2.microsoft.com/Knowledgebase/KBDisplay.aspx?scid=kb$en-us$2405516&wa=wsignin1.0
(Requires login to download)
This hotfix rollup contains all the fixes that were released in the previous Microsoft Dynamics AX hotfix rollup packages and country-specific updates for Microsoft Dynamics AX 2009 SP1. The build number of this hotfix rollup is 5.0.1500.3761.

Tuesday, November 23, 2010

Create Sales Order and Invoicing the Order using X++

Hi All.
The below Job creates the Sales order from X++ code and post the invoice by making use of SalesFormLetter class.

static void CreateSalesOrder_and_Invoice(Args _args)
{
NumberSeq numberSeq;
SalesTable salesTable;
SalesLine salesLine;
SalesFormLetter salesFormLetter;
;
ttsbegin;
numberSeq = NumberSeq::newGetNumFromCode(salesParameters::numRefSalesId().NumberSequence,true);
// Initialize Sales order values
salesTable.initValue();
salesTable.SalesId = numberSeq.num();
salesTable.CustAccount = '3001';
salesTable.initFromCustTable();

if (!salesTable.validateWrite())
{
throw Exception::Error;
}
salesTable.insert();
// Initialize Sales Line items
salesLine.SalesId = salesTable.SalesId;
salesLine.ItemId = '1101';
salesLine.createLine(true, true, true, true, true, false);
ttscommit;
salesFormLetter = salesFormLetter::construct(DocumentStatus::Invoice);

//Pass the salesTable buffer to the update method.Also you can pass optional parameters to the update method based on your need.
salesFormLetter.update(salesTable);

if(SalesTable::find(salesTable.salesId).DocumentStatus == DocumentStatus::Invoice)
{
info(strfmt("Posted invoiced journal for Sales order %1",salesTable.SalesId));
}
}


Thursday, November 18, 2010

Calling form method using X++

Hi All,
You can call form methods in X++ using the code below.
static void callingFormMethod(Args _args)
{
Args args = new Args("Address"); //Address is the FormName
FormRun formRun = ClassFactory.formRunClass(args);
;
print(formRun.owner().returnIntValue()); //returnIntValue is the dispaly method in Address Form
pause;
}

Tuesday, November 9, 2010

Get the filename from the File Path using X++

AX has a standard method in the Global Class to split the file name from the entire file path.The method is fileNameSplit().The method takes filepath as the parameter.It splits the filepath into three different strings filepath,filename,fileextension respectively.The usage of the function can be seen below.

Filename filepath;
Filename filename;
Filename fileType;
str fileNameString;
;
[filepath, filename, fileType] = fileNameSplit(fileNamePath);

fileNameString= filename + fileType;

Now the fileNameString will return you the filename with extension.
I have tested this for the file path in the dialog field.It works fine.

Thanks.