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 :
Finance | Project Operations, Human Resources, ...
Suggested Answer

How To Update Product's Dimension after it is released using x++ job

(0) ShareShare
ReportReport
Posted on by 10

1856.Untitled.png

I have the same question (0)
  • Suggested answer
    André Arnaud de Calavon Profile Picture
    301,069 Super User 2025 Season 2 on at

    Hi Wahdat,

    Can you elaborate on what you mean with the x++ job? Note that you can set the dimensions on two levels:

    - Global product

    - Released product.

    If you set it on the global product, you can't make distinctions on released products. If you have a dimension group on a released product, you can't change it on the global product. The error is trying to tell you that.

    To be able to change the dimension group, you now need to go to the released products form; not the (global) products.

    If you need to have the dimensions set on the global product, you need to change the x++ job to save the dimension groups in a table related to the product. (EcoResTrackingDimensionGroupItem versus EcoResTrackingDimensionGroupProduct)

  • Wahdat Said Profile Picture
    10 on at

    public void update_Dimension()

    {

      InventTable                            inventTable;

      EcoResTrackingDimensionGroup           ecoResTrackingDimensionGroup;

      EcoResTrackingDimensionGroupItem       ecoResTrackingDimensionGroupItem;

      EcoResTrackingDimensionGroupProduct    ecoResTrackingDimensionGroupProduct;

       select * from ecoResTrackingDimensionGroup where ecoResTrackingDimensionGroup.Name == 'Serial';

       select * from inventTable where inventTable.ItemId == 'testproduct';

       ttsBegin;

       select forUpdate ecoResTrackingDimensionGroupProduct

       where ecoResTrackingDimensionGroupProduct.Product == inventTable.Product;

       ecoResTrackingDimensionGroupProduct.TrackingDimensionGroup = ecoResTrackingDimensionGroup.RecId;

       ecoResTrackingDimensionGroupProduct.update();

       select forUpdate ecoResTrackingDimensionGroupItem

       where ecoResTrackingDimensionGroupItem.ItemDataAreaId == inventTable.dataAreaId

       && ecoResTrackingDimensionGroupItem.ItemId == inventTable.ItemId;

       ecoResTrackingDimensionGroupItem.TrackingDimensionGroup = ecoResTrackingDimensionGroup.RecId;

       ecoResTrackingDimensionGroupItem.update();

       ttsCommit;

    Actually i was asking about this! Done Thanks for your reply

  • André Arnaud de Calavon Profile Picture
    301,069 Super User 2025 Season 2 on at

    Hi Wahdat,

    Is your question answered now or do you still need some more help?

  • Wahdat Said Profile Picture
    10 on at

    Yes Dear solved the problem!

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 559 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 464 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 250 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans