Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 Community / Forums / Finance forum / How to best check exis...
Finance forum
Unanswered

How to best check existence of UOM conversion

Posted on by 177
Hello:
I have a requirement to create a report for our sales department of all items sold and invoiced. The issue is we have products in a variety of UOMs and they would like the conversion of all these various UOMs to tons. I know how it sounds, but please bear with me. Anyway, the concern is not that we can convert them to tons - there is a chart. The issue is, I have a bit of code to do the conversion of 'from unit' to 'to unit', but if a conversion is missing, then the report will fail. What I would like to do is check for the existence of a unit conversion (standard, intra, or inter), and if none exists, I would mark it on the report accordingly. Right now, I think I would have to do multiple check against the UnitOfMeasureConversion table looking for ones without Product for standard, then with Product but same UnitOfMeasureClass (intra) and different UnitOfMeasureClass (inter). Hoping someone knows if there's a more straightforward way to check. 
  • CU29041349-0 Profile Picture
    CU29041349-0 177 on at
    How to best check existence of UOM conversion
    Hoping against hope someone will offer some help :D

    Actually, did a bit more scouring and found UnitOfMeasureConversion::findyByConversion(...) method. Seems to do the job. 

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 287,914 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,549 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans