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 :
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
    different unit of measures based on the vendors in purchase lines
    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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

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

#1
Sumit Singh Profile Picture

Sumit Singh 3,165

#2
Sohail Ahmed Profile Picture

Sohail Ahmed 2,682 Super User 2025 Season 2

#3
Nimsara Jayathilaka. Profile Picture

Nimsara Jayathilaka. 2,299

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans