web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

different unit of measures based on the vendors in purchase lines

(1) ShareShare
ReportReport
Posted on by 254
Hi everyone!
I hope you are doing well!
Is it possible the UOM (Unit of Measure) is filled automatically based on vendors. I mean, for a particular item, the unit of measure is filled in purchase order based on the vendor.
For example, for item 1, if vendor is A, UOM will be Lit, and if the vendor is B, UOM will be KG.
I tried with item reference, but unfortunately we have to select item reference manually to be filled automatically. 
Also I tested 'Purchase Price' and it does not work also.
Is there any solution out of the box?
Thanks in advance!
 
I have the same question (0)
  • Verified answer
    Ramiz Profile Picture
    597 on at
    Hi, 

    You can use Item Reference with customization. There is a field Item Reference Unit of Measure and you can show that.

    Regarding filling it automatically, the system does fill the Item Reference No automatically based on some filters including Item Unit of Mesure but in your case you can subscribe to the event OnAfterFindItemReferenceForPurchaseLine in codeunit Item Reference Management and reset the unit of measure filter. 
     
    [EventSubscriber(ObjectType::Codeunit, Codeunit::"Item Reference Management", OnAfterFindItemReferenceForPurchaseLine, '', false, false)]
        local procedure OnAfterFindItemReferenceForPurchaseLine(var PurchaseLine: Record "Purchase Line"; var ItemReference: Record "Item Reference"; var Found: Boolean)
        begin
            ItemReference.SetRange("Unit of Measure");
            if ItemReference.FindFirst() then
                Found := true;
        end;
     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,926 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,158 Super User 2026 Season 1

#3
Khushbu Rajvi. Profile Picture

Khushbu Rajvi. 533 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans