Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Error when changing UOM in the Movement Page (source warehouse activity line table)

(0) ShareShare
ReportReport
Posted on by 5,136

HI Experts,

I am really stumped with this error.  When I have a movement for a specific item, then I highlight the place row, click onto Functions - Change Unit of Measure, I get the Page Whse. Change Unit of Measure (7314 Report - request page is shown). Then in the To DDList, I select the available UOM for that specific item.  The DDList (the Item Unit of measure page) displays correctly and I am able to choose the desired destination UOM.  However, when I tab out of the UnitOfMeasure field (source is the global Variable UOMCode), I get an error: The Item Unit of Meausure does not exist.  Identifcation fields and values: Item <itemno> code <UOM code that wasn't the one I chose...this UOMcode doesn't exist in the ItemUOM>.  I traced the code but for the life of me, I am unable to trace where the UOMCode is updated.  After the lookup of the UnitofMeasureCode (UOMCode is the source), I don't see any code that updates the global variable UOMCode.  I have been dealing with this for hours now.  I must be missing something.  I hope you guys can help shed some light.  Thank you in advance.

*This post is locked for comments

  • Verified answer
    mbr Profile Picture
    5,136 on at
    RE: Error when changing UOM in the Movement Page (source warehouse activity line table)

    Hi Suresh and all Nav Developers!  I found the culprit.  This seems to be a Nav Bug.  I never modified 7314 Whse. Change of Unit of Measure Report.  That's why I was perplexed as to why it seems to give me the incorrect UOMCode even though I selected a different one.  This was actually reported back in Jan 2015 in below link.  

    community.dynamics.com/.../149282

    So to fix the problem, in the 7314 Whse. Change of Unit of Measure report - Request Page - UOMCode field, I removed the TableRelation property of the UOMCode field.  Then I readded it back but also linked to the item as in below:

    "Item Unit of Measure".Code WHERE (Item No.=FIELD(Item No.))

    Then I recompiled 7314 report and now, everything is working!

    I hope this can help other developers as well.

  • mbr Profile Picture
    5,136 on at
    RE: Error when changing UOM in the Movement Page (source warehouse activity line table)

    I see that the text is var.  But I don't see how the UOMCode is modified to a value different than what I have chosen from the lookup. :(  E.g., when text comes back it comes back as value 'ABC'.  But when I walk through the ONVALIDATE...the value is not what I chose. :(  See below.  This is why I am perplexed.  I have spent hours trying to figure where I am unable to walk through the code?  After onlookup, what's the next event?  In theory, isn't it ONValidate?  But when I get to validate, the UOMCode is modified to another value.  

    See below.

    UnitOfMeasureCode - OnValidate()

    MESSAGE('UOMCODE ONVALIDATE:about to validateUOM item%1 UOMCode=%2',"Item No.",UOMCode);  //mbr test ----IT GIVES the value other than 'ABC'.  

    ItemUOM.GET("Item No.",UOMCode);

  • Suggested answer
    Suresh Kulla Profile Picture
    47,789 on at
    RE: Error when changing UOM in the Movement Page (source warehouse activity line table)

    OnLookUP has the Reference parameter Text which is how the value is assigned to the UOMCode.

  • mbr Profile Picture
    5,136 on at
    RE: Error when changing UOM in the Movement Page (source warehouse activity line table)

    Hi Suresh. I did trace the code and I am puzzled as to how the uomcode is updated. I traced the onlookup validate. Basically, it just goes to the item uom page as modal form. Once the user selects from the selection, it exits with true value. Somehow the value of the uomcode is then updated. Note that the uomcode is a global variable. Then I traced the onvalidate event. But as u enter the onvalidate event, the uomcode is already updated. So my biggest problem is how the uomcode is validated. I can't seem to find the event that updates this global variable.

  • Suggested answer
    Suresh Kulla Profile Picture
    47,789 on at
    RE: Error when changing UOM in the Movement Page (source warehouse activity line table)

    UOM-Code-on-Report-Request-Page.png

    Have you looked on the Request Page field OnValidate and ONLookup, check the screenshot below

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Microsoft Dynamics NAV (Archived)

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans