Skip to main content

Notifications

Announcements

No record found.

Supply Chain Management forum
Under review by Community Managers

Under review

Thank you for your post! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

How to get only "loadId" for each distinct "WmsLocationID" when exporting data entity

Posted on by 30
Hello,
This is my specific requirements

The entity should not be able to return more rows than there are locations in the specific parameter table (JDBBaydoorLocationPowerApp).

It is possible for multiple /LoadID/ to be assigned to the same /WMSLocationID/.  In this case, it is necessary to identify the /LoadID/that is the first to arrive chronologically. To do this, i shouls to take the first /LoadID/ of the day whose status is different from /shipped/ (based on the /Scheduled Shipping Date and Time/ field).

I created a custom entity and this is its datasource
 
 
and i add two virtuel fileds to this entity ( LoadedPalletNumber, TotalPalletNumber)
LoadedPalletNumber= The number of workID related to the loadID whose container number is not empty and whose work status is closed
TotalPalletNumber=The number of WorkID related to the LoadID whose container number is not empty and whose Work status is not canceled.
so i use the method postload
But When exporting the data from my entity, I receive a list of /loadIds/ that share the same /WmsLocationID/. However, I aim to obtain only the /loadId/ that happens to be the first to arrive for each distinct /WmsLocationID/.
I wish to know where exactly the problem lies in my reasoning and my code. Please help me find the solution
Categories:

Helpful resources

Quick Links

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans