Friday, February 24, 2012

Financials basic training

Again, another useful information shared by Dynamics AX Training team related to financials basic training. here is the link:
http://www.dynamicsaxtraining.com/financial-training/basic-concepts

Thursday, February 2, 2012

Release products to the legal entities using X++

In this post, I would like to share X++ Code that will help to release products to the legal entities from product master.

static void releaseProducts_Job(Args _args)
{
    EcoResProduct ecoResProduct;
    InventTable inventTable;
    InventTableModule inventTableModule;
    NumberSequenceTable numberSequenceTable;
    ItemId itemId;
    InventItemSetupSupplyType inventItemSetupSupplyType;

    EcoResStorageDimensionGroupProduct ecoResStorageDimensionGroupProduct;
    EcoResTrackingDimensionGroupProduct ecoResTrackingDimensionGroupProduct;
    EcoResStorageDimensionGroupItem ecoResStorageDimensionGroupItem;
    EcoResTrackingDimensionGroupItem ecoResTrackingDimensionGroupItem;
    ;

    select firstOnly ecoResProduct where EcoResProduct.DisplayProductNumber == "test"; //Audio system

    changecompany ('CEU')
    {
        ttsBegin;
        inventTable = null;
        inventTableModule = null;
        inventItemSetupSupplyType = null;
        ecoResStorageDimensionGroupProduct = null;
        ecoResTrackingDimensionGroupProduct = null;
        ecoResStorageDimensionGroupItem = null;
        ecoResTrackingDimensionGroupItem = null;

        numberSequenceTable = InventParameters::numRefItemId().numberSequenceTable();
        //get item id from:
        //1. Product number if number seq for item ID is not set up or manual or return blank value
        if (!numberSequenceTable.RecId || numberSequenceTable.Manual)
        {
            itemId = ecoResProduct.productNumber();
        }
        else //number sequence auto, get a number
        {
            itemId = NumberSeq::newGetNumFromId(numberSequenceTable.RecId).num();
        }

        inventTable.initValue();
        inventTable.initFromEcoResProduct(ecoResProduct);
        inventTable.ItemId = ItemId;
        inventTable.NameAlias = ecoResProduct.SearchName;
        inventTable.insert(true);

        // Create inventTableModules

        inventTableModule.initValue();
        inventTableModule.ItemId = inventTable.ItemId;
        inventTableModule.ModuleType = ModuleInventPurchSales::Invent;
        inventTableModule.insert();

        inventTableModule.initValue();
        inventTableModule.ItemId = inventTable.ItemId;
        inventTableModule.ModuleType = ModuleInventPurchSales::Purch;
        inventTableModule.insert();

        inventTableModule.initValue();
        inventTableModule.ItemId = inventTable.ItemId;
        inventTableModule.ModuleType = ModuleInventPurchSales::Sales;
        inventTableModule.insert();

        //Create inventItemLocation
        InventItemLocation::createDefault(inventTable.ItemId);

        // Creates a new item default order type for the product that is released.

        inventItemSetupSupplyType.initValue();
        inventItemSetupSupplyType.ItemId = inventTable.ItemId;
        inventItemSetupSupplyType.ItemDataAreaId = inventTable.DataAreaId;
        inventItemSetupSupplyType.insert();

        //create relationship tables to dimension groups.

        ecoResStorageDimensionGroupProduct = EcoResStorageDimensionGroupProduct::findByProduct(ecoResProduct.RecId);
        ecoResTrackingDimensionGroupProduct = EcoResTrackingDimensionGroupProduct::findByProduct(ecoResProduct.RecId);

        if (ecoResStorageDimensionGroupProduct.RecId)
        {  
            // mandatory storage dimension group for the product
            ecoResStorageDimensionGroupItem.ItemDataAreaId = inventTable.DataAreaId;
            ecoResStorageDimensionGroupItem.ItemId = inventTable.ItemId;
            ecoResStorageDimensionGroupItem.StorageDimensionGroup = ecoResStorageDimensionGroupProduct.StorageDimensionGroup;
            ecoResStorageDimensionGroupItem.insert();
        }

        if (ecoResTrackingDimensionGroupProduct.RecId)
        {
            // mandatory tracking dimension group for the product
            ecoResTrackingDimensionGroupItem.ItemDataAreaId = inventTable.DataAreaId;
            ecoResTrackingDimensionGroupItem.ItemId = inventTable.ItemId;
            ecoResTrackingDimensionGroupItem.TrackingDimensionGroup = ecoResTrackingDimensionGroupProduct.TrackingDimensionGroup;
            ecoResTrackingDimensionGroupItem.insert();
        }
       
        ttsCommit;
       
        info("Product successfully released to CEU legal entity");
    }
}

Wednesday, February 1, 2012

Logon failed for the unattended execution account

Following are steps that need to be performed if you start getting login failed for unattended execution account error.

“An error occurred during client rendering.
 The report server has encountered a configuration error. Logon failed for the unattended execution account
 Logon failed (rsLogonFailed) Logon failure: unknown user name or bad password.”

If this happens then it means there are unattended execution account was configured and there is some problem with the account mentioned in the configurations. Either it has changed in Active Directory setup and the password has been expired or changed. This is optional setting but if you have configured it then it must be updated when there is change in the account information or password. Otherwise you may start getting the aforementioned error message.

 To configure the account:

 Launch the reporting services configuration manager and connect to the report server.

  1. Go to Execution Account and select the Specify an execution account checkbox.
  2. Enter the account information and click on Apply button. This must be the domain account.
Go to the report manager and access the reports and it should now run properly.

Friday, January 13, 2012

Create a public Enterprise Portal site

Happy New Year 2012 !!!!!

Due to my busy schedule here in USA, I was unable to share any new post with you guys.
But here is the very nice artical about How to create/expose enterprise portal site publically.
http://technet.microsoft.com/en-us/library/hh285823.aspx

Sunday, November 27, 2011

Monday, November 21, 2011

What type of companies can use Dynamics AX 2012



  1. Customers with 500 to 5000 employees in Public Sector, Manufacturing and Retail industries only
  2. Customers with over 5000 employees 
  3. Customers with between 200 and 7500 employees in all industries. The solution includes out-of the box capabilities for Manufacturing, Construction, Retail, Services, and Public Sector industries.
  4. Customers with between 200 and 7500 employees in all industries except Public Sector


Dynamics AX 2012 Cumulative Update 2 is released

Last week Microsoft announced the Cumulative update 2 for Dynamics AX 2012. Please review the Support KB Article for more details. This cumulative update include
For more details on fixes included please review the Support KB Article

Friday, November 11, 2011

Debugging in Dynamics AX 2012 as a non-admin Role

To access breakpoints as a limited user:
1. open dynamics as admin
2. add yourself to your favorite role (in addition to admin)
3. shift control w to open a workspace.
4. insert a break point into a well know x++ class that the role accesses.
5. create a new job
6. insert this:
static void NonAdmin(Args _args)
{

securityutil::sysadminmode(false);
}
7. run job
8. control w to open regular workspace (or open it from the menus, sometimes its sticky)
9. Open the form/class via navigation

observe that you can now stop in debugger as "limited" user

Wednesday, November 9, 2011

Microsoft Dynamics Sure Step 2012 Launched

Microsoft Dynamics Sure step 2012 is officially launched, please read the following article for more details:

Monday, October 17, 2011

Set focus on specific control when opening form

To set the focus on specific control when form is open, you need to override the firstField() method of the form and set your desired control after super() call.

public void firstField(int _flags=1)
{
    ;
    super(_flags);
    desiredControlName.setFocus();
}

Dynamics AX 2012 SSRS reports patterns

Here are the design pattern/changes that we need to make sure for AX 2012 SSRS report development:


Functional Area
AX2009
AX2012
Input parameters (definition)
Report
Data contract (*)
Input parameters (validation)
Report
Data contract (*)
Input dialog (simple)
Report
Data contract (*)
Input dialog (complex)
Report
UI Builder (*)
Input parameters (modification)
Report
Controller (*)
Dynamic query
Report
Query
Report data
Report
Table (temp)
Business logic
Report
RDP
Report layout
Report
SSRS Report

Dynamics AX 2009 and Dynamics AX 2012 modules comparisons

Following are the enhancements made by Microsoft on Dynamics AX 2012:
For example, GL module in AX 2009 is now break into GL and Fixed assets in AX 2012.

AX 2009 Module
AX 2012 Module
General LedgerGeneral Ledger
 Fixed Assets (New)
BankCash and bank management
Accounts PayableAccounts Payable
 Procurement and sourcing (New)
Accounts ReceivablesAccounts Receivables
 Sales and Marketing (New)
Inventory ManagementProduct information (New)
 Inventory  and warehouse management
Expense managementTravel and expense management
ProductionProduction control
ProjectProject management and accounting
 Compliance and internal control (New)

Saturday, September 24, 2011

Change company logo on EP home page

Here is the very useful link for displaying/changing the Dynamics AX 2009 EP home page.
Display Company Logo on Dynamics EP Site and Hide Page Title

alternatively/in dynamics ax 2012, you can change the logo from C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\ep\images\ location and change the name you your logo file to DynamicsLogo64x64.png