web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

A list of products and their dimensions

(0) ShareShare
ReportReport
Posted on by

Hi

I have now created a form with following datasources

DimensionAttributeLevelValue joined with DimensionAttributeValueCombination

DimensionAttributeValue joined with DimensionAttributeLevelValue

DimensionAttribute joined with DimensionAttributeValue

 

so far so good.

But I want to add my products to this list too, so I can select my products ID and theirs dimensions.

 

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Bashir Ahmad Profile Picture
    5,248 on at

    Include InventDIM and InventSum tables for product detail

  • 5400 Profile Picture
    7,162 on at

    what dimension are you want to attached with product. If it is default dimension, you can proceed with default dimension field in inventTable. as per your above table structure, it looks me you want to configure accounting structure with product wise. if yes why?

  • Suggested answer
    Community Member Profile Picture
    on at

    For adding ItemId to your form, you must add two dataSources: first 'inventSum' and second 'inventDim' (inventDim has innerJoin relation with inventSum).

    Then you can add the 'itemId' field from inventSum, and the 'inventoryDimensions' Group from inventDim table. You can also add a menu item to your form as 'Dimensions display' so that users can choose which dimensions to be displayed in the form.

    Please update and verify if this solved your problem.

  • Community Member Profile Picture
    on at

    Hi Mehrnoosh

    thanks a lot for your answer. It sounds like the right answer. I have right now the job below. If I must add InventDim table, which of these tables can I join it with?

     

    static void Job2(Args _args)
    {
        DimensionAttributeValueCombination dimAttrValueCombo;
        DimensionAttributeValueGroupCombination dimAttrValueGroupCombo;
        DimensionAttributeLevelValue dimAttrLevelValue;
        DimensionAttributeValue dimAttrValue;
        DimensionAttribute dimAttr;
    
        while select RecId from dimAttrValueGroupCombo
            //where dimAttrValueGroupCombo.DimensionAttributeValueCombination == 5637144576
        join displayValue from dimAttrLevelValue
            where dimAttrLevelValue.DimensionAttributeValueGroup == dimAttrValueGroupCombo.DimensionAttributeValueCombination
        join RecId, DimensionAttribute from dimAttrValue
            where dimAttrValue.RecId == dimAttrLevelValue.DimensionAttributeValue
        Join Name from dimAttr
            where dimAttrValue.DimensionAttribute == dimAttr.RecId
    
        {
            info(strFmt("Værdien af dimensionen %1 er %2", dimAttr.Name, dimAttrLevelValue.DisplayValue ));
        }
    }
  • Community Member Profile Picture
    on at

    My InventSum table is empty, so now Im a little bit confused with these dimensions. All i want is a list of released products with their dimensions. I have marked the info I want in the list with red. 

    Dimensioner.png

  • Community Member Profile Picture
    on at

    Please give more info about your purpose and what you want to show in your form.

    Also for showing a list of all products and their dimensions, you should add a grid view to your form design and assign its dataSource equal to 'inventSum'. then add your desired fields to this grid.

  • Verified answer
    Community Member Profile Picture
    on at

    I have solved the problem by using the below code :)

    But anyway thanks to everyone who tried to help :)

    static void Job2(Args _args)
    {
    
        InventTable inventTable;
        DimensionAttributeValueSet dimAttrValueSet;
        DimensionAttributeValueSetItem dimAttrValueSetItem;
        DimensionAttributeValue dimAttrValue;
        DimensionAttribute dimAttr;
        InventPosting inventPosting;
        MainAccount mainAccount;
        DimensionAttributeValueCombination dimAttrValueCombo;
        
        while select inventTable
            join dimAttrValueSet
            where inventTable.DefaultDimension == dimAttrValueSet.RecId
            
            Join dimAttrValueSetItem
            where dimAttrValueSetItem.DimensionAttributeValueSet == dimAttrValueSet.RecId
            
            join dimAttrValue
            where dimAttrValue.RecId == dimAttrValueSetItem.DimensionAttributeValue
            
            join dimAttr
            where dimAttr.RecId == dimAttrValue.DimensionAttribute
            
            join inventPosting
            where inventPosting.ItemRelation == inventTable.ItemId
            
            join dimAttrValueCombo
            where dimAttrValueCombo.RecId == inventPosting.LedgerDimension
            
            join mainAccount
            where mainAccount.RecId == dimAttrValueCombo.MainAccount
            
        {
            info(strFmt("%1,%2, %3, %4",dimAttr.Name, dimAttrValueSetItem.DisplayValue, InventTable.ItemId, mainAccount.MainAccountId));
        }  
            
    }


  • Community Member Profile Picture
    on at

    Hi Mehrnoosh

    My InventSum table was empty. thats why I needed to try another way to get that list. See my solution. But if I had data in inventSum, then it would be the best solution to use. and by the way thanks for accepting my request on LinkedIn :)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans