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

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Missing AX 2012 Table Methods

(0) ShareShare
ReportReport
Posted on by

Please help me understand why some table methods are not available. For example, MSDN list several dozens of methods for the DimensionAttributeValueSet table. But when I check table methods in AOT, only select few are available. The ::getDimAttrNames static method is listed on MSDN but not in AOT. The method is also not listed in the override menu option.

Thanks 

*This post is locked for comments

  • Suggested answer
    Ivan (Vanya) Kashperuk Profile Picture
    on at
    RE: Missing AX 2012 Table Methods

    I see that particular method in AOT on that table.

    8 methods in total for that table in my install, and that also matches the description on MSDN

  • Suggested answer
    Ivan (Vanya) Kashperuk Profile Picture
    on at
    RE: Missing AX 2012 Table Methods

    Just to add - it's all (the entire table and all methods) in the Foundation model in SYS layer, so not sure why you would see some but not other methods.

    Here's the code from that method, if that's the one you are specifically interested in:

    /// <summary>
    /// Gets a comma separated list of the dimension attribute names.
    /// </summary>
    /// <param name="_defaultDimension">
    /// The default dimension.
    /// </param>
    /// <returns>
    /// A comma separated list of the dimension attribute names.
    /// </returns>
    public static str getDimAttrNames(DimensionDefault _defaultDimension)
    {
        DimensionAttributeValueSetItem valueSetItem;
        DimensionAttributeValue dimAttrValue;
        DimensionAttribute dimAttr;
        str dimensionAttributeNames;
    
        dimensionAttributeNames = '';
    
        while select Name from dimAttr
            exists join dimAttrValue
                where dimAttrValue.DimensionAttribute == dimAttr.RecId
            exists join valueSetItem
                where valueSetItem.DimensionAttributeValue == dimAttrValue.RecId
                    && valueSetItem.DimensionAttributeValueSet == _defaultDimension
        {
            if (strLen(dimensionAttributeNames) > 0)
            {
                dimensionAttributeNames += ', ';
            }
    
            dimensionAttributeNames += dimAttr.Name;
        }
    
        return dimensionAttributeNames;
    }


  • André Arnaud de Calavon Profile Picture
    on at
    RE: Missing AX 2012 Table Methods

    Hi,

    If you are running the RTM version of AX 2012, the method does not exist. It is added in AX 2012 R2. Probably the method is added in a cumulative update or hotfix as well, but I'm not aware if that is really the case.

    If you think you need it, you can add it yourself. Ivan provided the contents.

  • honeyBadger Profile Picture
    on at
    RE: Missing AX 2012 Table Methods

    My bad, that wasn't a method I was actually looking for. You said that you saw 8 methods, which I was able to see as well. However, if you go to MSDN, you'll see a lot more methods: http://msdn.microsoft.com/en-us/library/dimensionattributevalueset.aspx .

    Thank you

  • honeyBadger Profile Picture
    on at
    RE: Missing AX 2012 Table Methods

    Is there any way to get code for any of the methods I'm not able to find in AOT but are listed on MSDN?

    Thanks

  • Verified answer
    André Arnaud de Calavon Profile Picture
    on at
    RE: Missing AX 2012 Table Methods

    Hi,

    I think you are referring to aosValidateDelete etc?

    The methods listed are inherited from a base object which exists in the kernel.

    If needed you can override these methods to be used on several tables. So in fact you can use the methods without being inherited on the table itself.

  • Verified answer
    Ivan (Vanya) Kashperuk Profile Picture
    on at
    RE: Missing AX 2012 Table Methods

    The 8 methods that are in AOT are visible in the left panel through the above link

    The rest that are in the table are inherited from the base "Common" entity. These are kernel and you cannot view their code. They however have standard implementation for all tables. You can override the behavior for a particular table by overriding the method from AOT

  • Verified answer
    Martin Dráb Profile Picture
    on at
    RE: Missing AX 2012 Table Methods

    I see exactly 8 methods defined on DimensionAttributeValueSet table. And MSDN says exactly the same thing. All other methods are inherited, as you can clearly see in methods' description. For example:

    delete Deletes the current record from the table. (Inherited from xRecord.)

    You can see that the method is inherited from xRecord class. Because it's a kernel class, you can't see its code.

    Update: I didn't want to repeat the same thing, I was just slow in answering. It's great that there are so many people answering at the same time. :-)

  • honeyBadger Profile Picture
    on at
    RE: Missing AX 2012 Table Methods

    Thanks guys!

    It makes sense. I wasn't paying attention. I confused some other method which I thought wasn't inherited :)

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans