My 2p about ERP Solutions, Information Worker Solutions and other software products (mainly Microsoft Dynamics AX and Microsoft SharePoint).

19 July 2010

Add Supplementary items functionality to Project Item Requirements

Business Requirement: Supplementary items functionality on Project Item Requirements

In standard Dynamics AX, the Supplementary Items functionality to calculate the number of supplementary items to be added to an order line is not available for item requirements. It can be added however easily to Project Item Requirements.

Solution: add the Supplementary Items functionality to Project Item Requirements

  1. Add a new MenuItemButton to the MenuButton control ButtonLinePriceCalc on the ProjSalesItemReq form.
  2. Set following properties on the newly added control:
    MenuItemType: Action
    MenuItemName: SuppItemCalc_Sales
    DataSource: SalesTable
  3. Override the clicked method of the newly added control and add following code:
    void clicked()

    {
        Args        _args = new Args();
        ;


        _args.record(SalesTable::find(salesLine.SalesId));
        SuppItemCreate::main(_args);

        salesLine_ds.reread();

        salesLine_ds.refresh();

        salesLine_ds.executeQuery();

    }





Do the necessary setup of a trade agreement of the supplementary items kind for a specific item. Add an item requirement for that item. Execute the Calculation of Supplementary Items: you’ll see the results according to your created trade agreement.


Continue reading......

by Patrik Luca 0 comments

17 July 2010

Add method of Styles class failed

Problem description: Add method of Styles class failed

Upon exporting some Dynamics AX data to Microsoft Excel, I ran into an Error, mentioning the cryptic Add method of Styles class failed.

Solution: Rename the added Style

I described in a previous post Export to Excel with X++ code: the sequel, how formatting can be added to the exported AX data in Excel by using the Styles class. This error message occurs when the collection object of the same class and name already exists, and you attempt to add it a second time with the same name. So apparently I had already a Style in my Microsoft Excel file with the same name as I was adding through my X++ code. I changed the name of my added Styles in my X++ code an my export went fine afterwards.


Continue reading......

by Patrik Luca 0 comments

Patrik Luca, Ieper, BELGIUM
Feel free to use or spread all of the content on my blog. In return, linking back to my blog would be greatly appreciated. All my posts and articles are provided "AS IS" with no warranties.

Subscribe feeds via e-mail
Subscribe in your preferred RSS reader

Subscribe feeds rss Most Read Entries

Categories

Recommended Books


Subscribe feeds rss Recent Comments

This Blog is part of the U Comment I Follow movement in blogosphere. Means the comment field of this blog is made DOFOLLOW. Spam wont be tolerated.

Live Traffic Feed

Recent Visitors

Blog Archive

My Blog List

Followers

Guest Links