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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

How to open Product Dimensions form?

(0) ShareShare
ReportReport
Posted on by 2

Hi guys,

I am trying to open the product dimensions from from a custom form using the following code

void clicked()
{
    EcoResProduct   ecoResProduct;
    Args            args = new Args();
    //super();

    ecoResProduct = EcoResProduct::find(InventTable::find(BOM.ItemId).Product);

    args.record(ecoResProduct);
    
    new MenuFunction(menuItemDisplayStr(EcoResProductMasterDimensionAction), MenuItemType::Display).run(args);

}


This opens the expected form but the data isn't filtered to the particular product I provied. Instead it is showing all the dimensions.

I have debugged through the init method of the Form 'EcoResProductMasterDimension' and the only thing it used from the args passed to it is the record 'EcoResProduct' which I am providing but it isn't working as expected.

Any ideas?

Thank you.

*This post is locked for comments

I have the same question (0)
  • Johnkrish Profile Picture
    781 on at

    Hi Haris Adil,

    * First you have to use the EcoResProduct Table as your Datasource for the form. Then

    Try this code it will work.

    Here no need of using tihs -- EcoResProduct ecoResProduct;

    void clicked()
    {
    Args args = new Args();

    args.record(EcoResProduct);

    new MenuFunction(menuItemDisplayStr(EcoResProductMasterDimensionPerCompany), MenuItemType::Display).run(args);
    }

    Regards,

    Johnkrish.

  • dynamics developer Profile Picture
    2 on at

    Hi John,

    I tried adding the datasource (EcoResProduct) on the form and initialized it when modifying the itemId on my grid but it still gives the same result. Note that I don't need the EcoResProduct on the form it is just acting as a dummy.

    Regards,

    Haris

  • Suggested answer
    dynamics developer Profile Picture
    2 on at

    OK I found out the problem.

    the form 'EcoResProductMasterDimension' takes the record from 'EcoResProductMaster' and not from 'EcoResProduct'. After passing the EcoResProductMaster buffer the dimensions filtered accordingly.

    Best Regards,

    Haris.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Sagar Suman Profile Picture

Sagar Suman 2 Super User 2026 Season 1

#1
Alexey Lekanov Profile Picture

Alexey Lekanov 2

#1
Pratik Bhosle Profile Picture

Pratik Bhosle 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans