Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

Unit of Measure

Posted on by Microsoft Employee

Hi,

I Have created a page which uses the Warehouse Receipt Line Card and contains another page within Warehouse Receipt Pack Label. 

On the Page at the bottom you can see it says "Unit of Measure Code" and on the Warehouse Receipt Pack Label you can see there is a column called Pack qty. Currently you can only enter whole numbers into this Pack Qty. I need to adjust this to allow for Entry such as 29.5 if the Unit of measure code is Each. 

How can this be done? 

Thanks 

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Unit of Measure

    Well I've swapped it over, restarted the system however it seems to be throwing an error when it gets to this variable. The Variable is defined as a decimal as well. the error message I receive is stating that the data type has changed from Integer to decimal. However I haven't changed gdecTotal at all.  

     CLEAR(gdecTotal);

     recWarehouseCommentLine.SETRANGE("Table Name", recWarehouseCommentLine."Table Name"::"Whse. Receipt");

     recWarehouseCommentLine.SETRANGE(Type, recWarehouseCommentLine.Type::" ");

     recWarehouseCommentLine.SETRANGE("No.", "No.");

     recWarehouseCommentLine.SETRANGE("Document Line No.", gintDocumentLineNo);

     recWarehouseCommentLine.SETRANGE("Comment Type", recWarehouseCommentLine."Comment Type"::LabelPack);

     IF recWarehouseCommentLine.FINDSET(FALSE, FALSE) THEN REPEAT

       gdecTotal :=  //ERROR HERE

         gdecTotal +

         recWarehouseCommentLine."Pack Qty.";

     UNTIL recWarehouseCommentLine.NEXT = 0;

     gdecTotalOustanding := gdecTotalReceive - gdecTotal;

     CurrPage.UPDATE(FALSE);

  • Verified answer
    Suresh Kulla Profile Picture
    Suresh Kulla 43,745 on at
    RE: Unit of Measure

    Firstly you need to change the field to decimal, maybe i am missing something but what is stopping you entering that value once you change the field to decimal.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Unit of Measure

    Well actually yes it would be sorry

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Unit of Measure

    No Not always

  • Suggested answer
    Suresh Kulla Profile Picture
    Suresh Kulla 43,745 on at
    RE: Unit of Measure

    Do you always want to enter decimal value when the UOM is EACH ?

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Unit of Measure

    It's currently an Integer

  • Suggested answer
    Mohana Yadav Profile Picture
    Mohana Yadav 59,137 Super User 2024 Season 2 on at
    RE: Unit of Measure

    what type of field is Pack Qty.? Integer or decimal?

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Unit of Measure

    What would the syntax look like to do that? Such as

    "Pack Qty." := DECIMAL; for example??

  • Suggested answer
    Amol Salvi Profile Picture
    Amol Salvi 18,694 on at
    RE: Unit of Measure

    You can build a validation on Pack qty field to allow for decimal value when Unit of measure is each.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Unit of Measure

    99.PNG

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans