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

  • Wahdat Said Profile Picture
    Wahdat Said 10 on at
    RE: How To Update Product's Dimension after it is released using x++ job

    Yes Dear solved the problem!

  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 292,494 Super User 2025 Season 1 on at
    RE: How To Update Product's Dimension after it is released using x++ job

    Hi Wahdat,

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

  • Wahdat Said Profile Picture
    Wahdat Said 10 on at
    RE: How To Update Product's Dimension after it is released using x++ job

    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

  • Suggested answer
    André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 292,494 Super User 2025 Season 1 on at
    RE: How To Update Product's Dimension after it is released using x++ job

    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)

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,494 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,305 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans