Showing posts with label ax 2012. Show all posts
Showing posts with label ax 2012. Show all posts

June 14, 2015

Dynamics AX 2012 R3, CU9 is out in market.

Hi Folks,

Finally CU9 is released this week.
Here is some more details about this Cumulative update.

New Highlights

1. Introduced new features into HR, Transportation Management,Warehouse Management and Retails modules.
2. Many county-specific regions updates including US, UK, INDIA, Poland, Belgium, Brazil, Europe, Germany, India, Italy, Lithuania, Mexico, Netherlands, Russia, Spain, Austria and Poland

General Information
1. Installation Guide
2. What’s new in CU9
3. Build No: 6.3.2000.326
    Kernel: 6.3.2000.326

Download Option:
1. From LCS
2. From Partner/Customer resource

- Harry

April 08, 2015

How to deploy Dynamics AX instance on Azure through LifeCycle Service (LCS)- Part II

Hi All,

In my previous post we discussed how to configure your Azure account with LCS services and how upload LifecycleServicesDeployment certification on Azure portal.
In this post i will show you how to deploy the AX using LCS on Azure.
Step: 1 Login into your LCS account, select the project you want to deploy. Go to environment and click on ‘+’ symbol

image

In next screen you need to choose topology to deply.
DEMO: for demo purpose
DEVTEST: For development or testing
Here we will use DEMO topology, click on DEMO
image ‘'

On next screen you need to choose Product version. Click on “Demo AX 2012 R3 CU8”
image

On the next screen give a name for this instance. (You can select a different size). Click on next.
image

It will ask for a confirmation for deployment. Click on deploy.
Now LCS will deploy the environment on Azure, this may take some time to complete this step.
image


Now on right side tile click on VM Name “DEMO####”
image

It will download a RDC file. Save this file and open with user name and Password.
image

Your Cloud VM is ready for use.
- Harry

March 23, 2015

How to deploy Dynamics AX instance on Azure through LifeCycle Service (LCS)- Part I

 
Hi All,
In this post I will demonstrate how to configure your Azure account  with LCS(LifeCycle services) project to deploy the AX on Azure cloud.
In second part of this post I will share how to actual deploy the AX on Azure.
Here is quick steps to setup/configuration your Azure with LifeCycle services
Step 1: Login you LCS services
Step 2: Create a new project or you can use any existing project as well. Here in this tutorial I will take an example with new instance creation.
clip_image001
Click on + button and fill the details and click on create.
clip_image002
After create a new project below screen will come which shows, your project created successfully.
clip_image003
Step 2: Now click on Microsoft Azure setting under environments
clip_image004'
To proceed further you need you Azure subscription id. To find your subscription id Login into your Azure management portal.  Scroll down click on setting and copy from here
clip_image005
Paste this Subscription id in below field
clip_image006
Step: 3 Download management certification (file name : LifecycleServicesDeployment.cer)
This certificate will enable Lifecycle Services to communicate with Azure on your behalf. Download this management certificate to your local computer. Then, upload the management certificate to the Azure management portal (Settings > Management Certificates).
To  upload this certification Login into your Azure management portal.  Scroll down click on setting click on Management Certificate than click on “Upload Management certification”
clip_image007
Upload the “LifecycleServicesDeployment.cer” file here.
Step :4 Now on LCS window click on next and select Azure region and click on “Connect”.
clip_image008 '
So here we completed the setup of LCS with Azure.
In my next post i will share how to deploy the AX on windows Azure environment. How to host AX on cloud.
- Harry

March 19, 2015

Workflow setup in AX2012 R3 CU8

Hi Folks,

Here is the steps to setup the workflow in CU8. To setup workflow for first time, we need to setup it first.

1. First of all we need a batch group which can handle the workflow triggers and proceed workflow task, also send the the notification to users.
 Go to System admin-> Setup -> Batch Group
Add a new batch group for workflow,

clip_image001

Add batch server accordingly.
clip_image002

2. Now we need to setup the workflow parameters 
Go to System Admin -> Setup -> workflow -> Workflow parameter
image  

Select workflow email template. (You may need to create a new workflow Email template)
clip_image003

3. Go to System Admin -> Setup -> workflow -> click on Workflow infrastructure Configuration
Now a wizard will open and Follow below steps
clip_image005

4. Configure the workflow message processing batch job
Select Batch group in below screen. (This may be not editable if already some records exists in respective tables)
clip_image007

5. Configure the workflow due date processing batch job
On next screen select same batch group and enter the number of hours for recurrence interval
clip_image009

6. Configure the line-item workflow notification batch job
In this screen we need to select a batch group and the number of minutes for recurrence interval of this job
clip_image011

7. As next screen you will have below screen to finish this process
clip_image013

So…. Now your system is ready for workflow process.

-Harry

December 23, 2014

How to Attachments button on a new form DAX 2012 R3

Hi Friends,

Here is another post to share with you all.
In this post will will demonstrate how to add a button for document handling on a new AX Form. To add this functionality you may need to perform following steps.

Step 1. Open your form in AOT and Go to from Design node.

Step 2. Add new button group under ActivePanTab.

Step 3. Add new command button under this new button group.

clip_image001

Step 4. Set following properties of this button

clip_image002

Now you need to do one functional setup for this new customization

Step 5: Open below from
 Organization administration/SetUp-> Document Management -> Active Document Table

Step 6: Add your table details here and click on Always enable.

clip_image003

Step 7: So its done now.
Open your form and click on Attachment button , below form must open.

clip_image006
Enjoy……
Merry Christmas to all of you.

-Harry

October 30, 2014

Get Default Workflow list in AX 2012

How to Fetch Default Workflow list in AX 2012

Hi Folks,

Here is a job to fetch existing workflows in AX 2012.

static void TheAxapta_WFList(Args _args)
{
#AOT
Treenode                workflowTypesNode, workFlowNode;
int                     i;
int                     nodeCount;
str                     workflowName;
SysDictWorkflowType     sysDictWorkflowType;
SysDictWorkflowCategory sysDictWorkflowCategory;
;
workflowTypesNode = treenode::findNode(#WorkflowTypesPath);
nodeCount = workflowTypesNode.AOTchildNodeCount();
workFlowNode = workflowTypesNode.AOTfirstChild();
for (i=1; i<=nodeCount; ++i)
{
workflowName = workFlowNode.AOTgetProperty("Name");
try
{
sysDictWorkflowType = SysDictWorkflowType::newTypeName(workflowName);
sysDictWorkflowCategory = new SysDictWorkflowCategory(sysDictWorkflowType.category());
info(sysDictWorkflowCategory.label() + ";"
+ sysDictWorkflowType.label() + ";"
+ sysDictWorkflowType.help());
}
catch ( Exception::Error)
{
exceptionTextFallThrough();
}
workFlowNode = workFlowNode.AOTnextSibling();
}
}

Your output must look like below

image
- Harry






October 09, 2014

ValidTimeStateFieldType Property on Table- AX 2012 R2, R3

ValidTimeStateFieldType Property on Table- AX 2012 R2, R3

What is the use of “ValidTimeStateFieldType” property on table

Date effective data is tracked in a table that has its ValidTimeStateFieldType changed from its default value of None. Also, an index with its ValidTimeStateKey set to Yes must be added on the table. The system automatically adds the fields named ValidFrom and ValidTo to the table, which will be of type date or utcdatetime. The system automatically prevents overlap between the date ranges in these two fields among rows that track the same entity.

clip_image001

clip_image003

How to fetch records from this type of tables

The following code sample returns the records that are effective during 1/1/2001 and Current date:

static void theAxapta_ValidTimeState (Args _args)

{

vendTable vendTable;

TaxRegistration TaxRegistration;

DirPartyLocation DirPartyLocation;

date ToDate = today();

date FromDate = 01\01\2001;

while select validtimestate(fromdate, ToDate) * from TaxRegistration

join DirPartyLocation

where TaxRegistration.DirPartyLocation == DirPartyLocation.RecId

{

select vendTable where vendTable.Party == DirPartyLocation.Party;

info(strfmt(“%1”, VendTable.Name));

}

}

For more details

http://msdn.microsoft.com/en-us/library/gg861781.aspx

White papers

http://download.microsoft.com/download/4/e/3/4e36b655-568e-4d4a-b161-152b28baaf30/using_date_effective_patterns_ax2012.pdf

http://www.microsoft.com/download/en/details.aspx?id=20864

 

-Harry

August 11, 2014

Error: “The CIL generator found errors and could not save the new assembly.”

Error: “The CIL generator found errors and could not save the new assembly.”





Updated: April 19, 2016.

Error: When run full or incremental CIL , system showing below error
“The CIL generator found errors and could not save the new assembly.”

clip_image001

Possible reason: This might be CIL generation issue.

Suggested Solution:

Step I: Stop AX services

Step II: Delete all isolated files from below path (Please Note: Delete only files which are not in any folder)

C:\Program Files\Microsoft Dynamics AX\60\Server\MicrosoftDynamicsAX\bin\XppIL directory

clip_image003

Step III: Start AX service

Step IV: Synch DataDictonary

Step V: Full Compile

Step VI: Full CIL Compile

Note: These all operation must be perform in the same sequence. (I also tried this only :P )

Now try to reopen you AX client. It should be work.

Update: April 19, 2016
You can rename the exist folder (e.g. XPPIL_BackUp12042016) and than start your AOS and do a full CIL. Its more effective than deleting only outer files.

- Harry

April 08, 2014

MICROSOFT DYNAMICS AX 2012 R3 LAUNCH EVENT

MICROSOFT DYNAMICS AX 2012 R3 LAUNCH EVENT
Hi All, 

Finally MS comes to lunch DAX 2012 R3.... WOW..
Many of us are waiting for this since a long. Here is some important details for this event

1. Date: April 10, 2014
     Time(s):

2. Agenda

Topic
Overview
Introduction to Dynamics AX 2012 R3
Meet representatives from the Microsoft Dynamics team as they highlight the new features of AX 2012 R3
Business Achievement Showcase
Learn from New Belgium Brewer and Lotus F1 Team on how they have achieved success with Microsoft Dynamics
Analyst Interview
Hear Gartner's Principal Analyst Nigel Montgomery talking about how Business Decision Makers are responding to today's rapidly changing market conditions and the role they are playing to ensure organizations adapt accordingly.
Engage with Customers in their Terms
Learn from the CIO from Ashley Furniture on how they have reimagined their customer experience
Watch a demo on some of Dynamics AX 2012 R3 new capabilities (Retail eCommerce enhancement, new mobile POS and more)
Run Dynamics Operations
Learn how organizations have been able to improve their operations
Watch a demo on some of Dynamics AX 2012 R3 new capabilities (New Transportation capabilities and more)
Expand Rapidly
Join the CEO of Kathmandu as he explains how Dynamics has helped them expand their business
Watch a demo on some of Dynamics AX 2012 R3 new capabilities (New Warehousing capabilities and more)
Special guests
Engage with Microsoft special guests!.
Closing Comments
Learn how you can take the next steps to transform your company into a dynamic business that delivers amazing customer experiences

3. Registration Link   (I just did it :)


Guys don't miss it.....


-Harry

September 12, 2013

X++ code to create & post General Journal

X++ code to create & post General Journal

Some time we need to generate a General Journal through X++ code rather than go to GL module. For eg. WE are creating a journal after completion of some particular condition.
Try following code to create a General Journal and than post in in the same code through X++.

static void theaxapta_CreateGLJournalPost(Args _args)
{
AxLedgerJournalTable journalTable; // class
AxLedgerJournalTrans journalTrans; // class
container acctPattern;
container offSetAcctPattern;
LedgerJournalTable ledgerJournalTable; // table
ledgerJournalCheckPost ledgerJournalCheckPost;// table
;
journalTable = new AxLedgerJournalTable();
journalTrans = new AxLedgerJournalTrans();
//Journal Name
journalTable.parmJournalName("GenJrn");
journalTable.save();
journalTrans.parmJournalNum(journalTable.ledgerJournalTable().JournalNum);
journalTrans.parmTransDate(systemDateGet());
journalTrans.parmCurrencyCode("USD");
journalTrans.parmAmountCurDebit(1200);
journalTrans.parmAccountType(LedgerJournalACType::Ledger);
acctPattern = ["21345-Disp","211345", 2, "Department","0000114","CostCenter", "0000087"];
journalTrans.parmLedgerDimension(AxdDimensionUtil::getLedgerAccountId(acctPattern));
journalTrans.parmOffsetAccountType(LedgerJournalACType:: Ledger );
offSetAcctPattern = ["40100-Disp","40100", 4, "Department","0000114","CostCenter", "0000087", "CustomPurposeA","Nile", "CustomPurposeB", "Site1"];
journalTrans.parmOffsetLedgerDimension(AxdDimensionUtil::getLedgerAccountId( offSetAcctPattern));
journalTrans.save();
ledgerJournalCheckPost = ledgerJournalCheckPost::newLedgerJournalTable(journalTable.ledgerJournalTable(),NoYes::Yes);
ledgerJournalCheckPost.run();
info(strFmt("Journal No. %1.", journalTable.ledgerJournalTable().JournalNum));
}


Other Related Posts:
Inventory Transfer Journal through X++ code

-Harry

September 07, 2013

Method Types in Dynamics AX Classes


Method Types in Dynamics AX Classes

There are many different types of methods. Some of the more common types are
1. Static Methods
2. Main Method
3. Display Methods
4. Accessor Methods

1. Static Methods

Static methods are attached to a class. However, they do not need that class to be instantiated to execute that method. They are not within the scope of the class, so any class variables are not available in a static method.
Static methods are declared static by using the Static method modifier.
Static methods are called using the class name followed by two colons (::) and then the methods name.
The following example shows a static method declaration, and a call to that static method.

static public void myStaticMethod()
{
}
myClass::myStaticMethod()

2. Main Method

The main method is a static method that can be used to call a constuctor. It is special because its name is required to be "main". It is used by the system when the class is run directly from a menu item and it takes a parameter of type args. 
Args is a class that is used to pass parameters between objects, for instance, various parameters can be set on the properties on a menu item. When the menu item calls a class, the args class containing those property values is passed to the main method using the args parameter.

3. Display Methods

Display methods are used on forms. They are commonly created on the table, and can also be defined on the form. Display methods return a value that is displayed on the form or report. They are often used to display a calculation, or to look up a single field from another table. 
The following example shows how to display the item name on a form that displays data from a table containing the item id.

// BP Deviation documented
display itemName itemName()
{
inventTable inventTable
select name from inventTable
where inventTable.itemId == this.itemId;
return inventTable.name;
}

The first line in this code is a comment to the compiler indicating that a Best
Practice deviation is considered and evaluated as reasonable. The deviation is
because a display method is able to return any data from any table or field in the system, and so the security implications should be considered.

4. Accessor Methods

Accessor methods enable other elements to set or get the values of variables in a class and it is common that they do both. The following example accepts a value as a parameter, sets a class variable to this value and then returns the value. The parameter has a default value set to the class variable value, so if the method is called without a parameter, it returns the value of the class variable. If it is called with a value in the parameter, then the
class variable is set to this value.

public str myName(str _myName = myName)
{
myName = _myName;
return myName;
}

-Harry

September 06, 2013

Simple Dialog Box in Axapta 2012

Simple Dialog Box in Axapta 2012






Hi Folks,

The following example displays the dialog box and prints the value entered to the screen.

Code:
static void theAxapta_DialogBox(Args _args)
{
dialog              dialog;
dialogGroup    dialogGroup;
dialogField      dialogField;
;
dialog              = new Dialog("Simple Dialog");
dialogGroup    = dialog.addGroup("Customer");
dialogField      = dialog.addField(extendedTypeStr(custAccount));
if (dialog.run())
{
print dialogField.value();
pause;
}
}

Output:
















Note:

    1.   The dialog.run() method returns true if OK is clicked, and false if Cancel is     clicked.
    2.   Dialog Group is used to group dialog fields which are logically same.

-Harry

September 04, 2013

How to create a lookup on Dimension(SysDimesion) ENUM

How to create a lookup on Dimension(SysDimesion) ENUM

Note:
1. DimentionSetCombination is the table in Which dimension hierarchy stored 
2. MachineHour is a customized table in this example, you can use your own logic in the same
3. fieldId2Ext is an X++ keyword which is used to access a particular array index value.
 example:  fieldId2Ext(fieldNum(DimensionSetCombination,Dimension),4)


public void lookup()
{
    SysTableLookup       sysTableLookup =      SysTableLookup::newParameters(tablenum(DimensionSetCombination), this);
    Query                query;
    QueryBuildDataSource queryBuildDataSource;
    QueryBuildRange      queryBuildRange, queryBuildRangeDlvryWH;
    ;

    sysTableLookup.addLookupfield(fieldId2Ext(fieldNum(DimensionSetCombination,Dimension),4), true);

    query                   =   new Query();
    queryBuildDataSource    =   query.addDataSource(tablenum(DimensionSetCombination));
    queryBuildRange         =   queryBuildDataSource.addRange(fieldId2Ext(fieldnum(DimensionSetCombination,Dimension),3));

    queryBuildRange.value(MachineHours.CostElement);
    sysTableLookup.parmQuery(query);
    sysTableLookup.performFormLookup();
}

-Harry

June 06, 2013

Changed, and Deprecated Features for Microsoft Dynamics AX 2012

Hi Folk,

As we all know, there are many new changes came in AX2012 and many few are depreciated from earlier version. Recently while searching over internet i come across one book that will provide all such information. Below is the link to download this book.

New, Changed, and Deprecated Features for Microsoft Dynamics AX 2012, available for download here.

-Harry

May 24, 2013

Custom lookup for Dialog fields in Axapta [AX2012]

Custom lookup for Dialog fields in Axapta





Overriding the event methods (e.g. custom lookup, modify, validate, selectionChange) on dialog controls is not as straight forward as it is on form controls, but the good news is that it is possible!
In order to override the event methods on dialog controls, the following needs to be done.
class TestDialogFields
{
    Dialog                   dialog;  
    DialogField           newProdIdField;
}
public static void main(Args args)
{
    TestDialogFieldstestDialogFields = new TestDialogFields();
     DialogRunbase               dialogRunbase;
    ;
    dialogRunbase = DialogControlOverload.showDialog();
    if(dialogRunbase.run())
    {
        // code for update  once the use selects a record from the lookup and click 'ok'
     }
}
Dialog showDialog()
{
    FormRun     formRun;
    ;
    dialog = new Dialog('Dialog fields test');
    newProdIdField = dialog.addField(typeId(ProdId));
    dialog.run(true);
    dialog.formRun().controlMethodOverload(true);
    dialog.formRun().controlMethodOverloadObject(this);
    return dialog;
}
If we want to create a Custom lookup
public void Fld1_1_lookup()
{
    FormStringControl control = dialog.formRun().controlCallingMethod();
    boolean ret;
    SysTableLookup          sysTableLookup =  SysTableLookup::newParameters(tablenum(Prodtable, control);
    Query                   query = new Query();
    QueryBuildDataSource    queryBuildDataSource;
    QueryBuildRange         queryBuildRange;
    ProdTable               prodTable;
     ;
   prodTable = ProdTable::find(prodId);
sysTableLookup.addLookupfield(fieldnum(ProdTable, ProdId));
    sysTableLookup.addLookupfield(fieldnum(ProdTable, Name));
  //You can add the ranges for filtering
   sysTableLookup.parmQuery(query);
    sysTableLookup.performFormLookup();
}
We can add all the other methods  as follows
public void Fld1_1_modified()
{
  // modify code goes here
}
public void Fld1_1_validate()
{
// validation code goes here
}
 
-Harry