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 NAV (Archived)

Quantity Decimals - Piece

(0) ShareShare
ReportReport
Posted on by 373

Dears

The items in the inventory module are linked to a UOFM (Piece), although, when dealing with these items I want to prevent entering decimals because the item doesn't have any fractions .. It should be sold and purchased in pieces 1 , 2, 3, 4 ...etc.

I want to prevent entering anything wit decimals, the quantity should have integer number.

How can this be done ?

*This post is locked for comments

I have the same question (0)
  • RobertasR Profile Picture
    5,004 on at
    RE: Quantity Decimals - Piece

    Hi,

    I understand your frustration, but the requirement is very much based on your business model rather than a 'common practice'. If you look at a food sector - any grading product or by-product/waste that are measured in KGs need to have decimals as finished goods and raw material, as well as anything involving cutting as cables (meters), metal sheets (Square meters), etc.

    Ask your NAV partner to modify the system or make sure your users are trained well. I would go with the training but that is purely your choice.

    Robertas

  • Suggested answer
    Zaid Tariq Profile Picture
    2,274 on at
    RE: Quantity Decimals - Piece

    Yes you right, but you can prevent this without even doing any modifications. Create an event and subscribe to the OnBeforeValidate event of the quantity field. If decimal then show error.

  • Ahmad_Safadi Profile Picture
    373 on at
    RE: Quantity Decimals - Piece

    NAV is so flexible ... in certain cases it is a disadvantage

    After all, I need to ensure that the system is enforcing the business requirements rather than allowing mistakes which may sometimes be due to bad users.

    How can NAV allow quantity field to be decimals for Finished goods and Raw materials !! for me this is business critical.

    Anybody has suffered from this ?

  • Suggested answer
    RobertasR Profile Picture
    5,004 on at
    RE: Quantity Decimals - Piece

    Hi,

    Dynamics NAV is not constrained in this area (as well as in many other areas). I would question a requirement in itself - it should be 'common sense' to put pieces and not decimals when selling cars or pants. Why would anyone put decimals there? And how customers would order or accept such strange orders?

    If any users put decimals, they have to have a good training on the system rather than having any bespoke development. 

    Robertas

  • Ahmad_Safadi Profile Picture
    373 on at
    RE: Quantity Decimals - Piece

    I don't really understand the logic beyond such functionality

    The quantity field in my company is used for raw materials and finished product, raw materials are Gram .. so Decimals is required. At the same time, finished goods can not be sold in decimals, for instance I could not sell one pant and a half !!

    Why do I need to customize such simple requirement ??

  • Suggested answer
    CDsilva Profile Picture
    4,188 on at
    RE: Quantity Decimals - Piece

    Hi

    The Standard functionality has Quantity field data type as Decimal. You'll need to customize tour requirement by adding code on validation as mentioned by other memebers

  • Ahmad_Safadi Profile Picture
    373 on at
    RE: Quantity Decimals - Piece

    So there is no out of the box functionality to prevent decimals for Finished Goods products !! For instance, I want to sell one car, not one and a half car

    Isn't there something on the setup which prevents this ?

  • Suggested answer
    Suresh Kulla Profile Picture
    49,097 Super User 2025 Season 2 on at
    RE: Quantity Decimals - Piece

    Add the validation on the quantity field of the sales line, check the conditions if the item belongs to that group or not if so then use MOD (Modulus) operator calculate reminder with 1 and check if it is decimal or not.

  • Suggested answer
    Amol Salvi Profile Picture
    18,698 on at
    RE: Quantity Decimals - Piece

    You neeed to put validation on entry screen if it is for some of the items

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…

Mansi Soni – Community Spotlight

We are honored to recognize Mansi Soni as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans