Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Setup a new unit of measure conversion X++

(0) ShareShare
ReportReport
Posted on by

I'm attempting to write a job to setup a number of unit of measure conversion based on information from a CSV file.

I've created an instance of UnitOfMeasureUnitConversion and added UnitOfMeasureUnitConversion_Conv to it to as a new conv but I'm not sure what service I would use to release this to the database. Can anyone help?

*This post is locked for comments

  • Suggested answer
    Ivan (Vanya) Kashperuk Profile Picture
    on at
    RE: Setup a new unit of measure conversion X++

    Hmm.

    The below code should be sufficient to create a conversion. not sure why you are trying to do more:

        UnitOfMeasureConversion unitOfMeasureConversion;
    
        unitOfMeasureConversion.FromUnitOfMeasure   = _fromUnitOfMeasure;
        unitOfMeasureConversion.ToUnitOfMeasure     = _toUnitOfMeasure;
        unitOfMeasureConversion.Product             = _product;
        unitOfMeasureConversion.Factor              = _factor;
        unitOfMeasureConversion.Numerator           = _numerator;
        unitOfMeasureConversion.Denominator         = _denominator;
        unitOfMeasureConversion.InnerOffset         = _innerOffset;
        unitOfMeasureConversion.OuterOffset         = _outerOffset;
        unitOfMeasureConversion.Rounding            = _rounding;
        unitOfMeasureConversion.insert();


  • Suggested answer
    Bashir Ahmad Profile Picture
    5,248 on at
    RE: Setup a new unit of measure conversion X++

    This may help:

    amllpdynamics.blogspot.com/.../unit-of-measure-conversions-in-microsoft-dynamics-ax-2012.html

  • Community Member Profile Picture
    on at
    Re: Setup a new unit of measure conversion X++

    Thanks Abdel, but that seems to be a 2009 solution and I'm working with 2012. No worries though I've solved the problem now.

  • Abdel Fatah Ahmed Profile Picture
    on at
    Re: Setup a new unit of measure conversion X++

    hi Dan Griffiths look at my blog you will find some code lines it will helping you to create unit of conversion and also you will find how to read the data from excel sheet

    i hope that what you want

    dynamics-abdelfatah-elminisy.blogspot.com

    Best regards,

  • Community Member Profile Picture
    on at
    Re: Setup a new unit of measure conversion X++

    After looking into it I have found services to use, delete or edit unit conversions in near every way but not one that allows you to insert conversions in the way you can with products.. Anyone have any ideas?

    I've had similar problems with the prices and costs of products. There's a service in place to activate prices but not add them to the tables.

    Neither of which is a terribly serious problem as both can be solves simply by inserting data directly into the tables but I've been trying to avoid this I'm always unsure if additional tables need to be updated for the program to function correctly. Does anyone know if diagrams of the table structures and relations are available for AX 2012?

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

Jainam Kothari – Community Spotlight

We are honored to recognize Jainam Kothari as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Mohamed Amine Mahmoudi Profile Picture

Mohamed Amine Mahmoudi 100 Super User 2025 Season 1

#2
Community Member Profile Picture

Community Member 50

#3
shanawaz davood basha Profile Picture

shanawaz davood basha 6

Featured topics

Product updates

Dynamics 365 release plans