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 :
Finance | Project Operations, Human Resources, ...
Unanswered

Sorting issue while importing data using data entity.

(0) ShareShare
ReportReport
Posted on by 110

Hi experts,

We have extended EcoResReleasedProductV2Entity and made customized Data Entity to upload Items based on defined Item Group in Data Entity. As 'ItemNumber' is a mandatory field, we have to provide some distinct values in 'ItemNumber' column in data entity.  

We have added custom code in 'postGetStagingData()' to manipulate the records and updating 'Item Numbers' based on given groups before inserting to target table.

Issue- 

If we have next value for 'RM' (Raw Materials) item group as RM0001 and we are uploading below items along with other details -

ITEMNUMBER INVENTORYUNITSYMBOL
PRODUCTGROUPID
PRODUCTDESCRIPTION
Item-6 Pcs. RM Item-6
Item-7 Kg RM Item-7
Item-8 Pcs. RM Item-8
Item-9 Kg RM Item-9
Item-10 Kg RM Item-10

While importing the data in dev environment and Testing01 (Tier 2) environment, our result is coming as expected - 

ITEMNUMBER INVENTORYUNITSYMBOL ITEMMODELGROUPID PRODUCTDESCRIPTION
RM0001  Pcs. RM Item-6
RM0002 Kg RM Item-7
RM0003 Pcs. RM Item-8
RM0004 Kg RM Item-9
RM0005 Kg RM Item-10

but when importing data in UAT (Tier2) environment, the results are coming as -

ITEMNUMBER INVENTORYUNITSYMBOL ITEMMODELGROUPID PRODUCTDESCRIPTION
RM0001  Pcs. RM Item-10
RM0002 Kg RM Item-6
RM0003 Pcs. RM Item-7
RM0004 Kg RM Item-8
RM0005 Kg RM Item-9

Requesting the help / opinion / advice on why in certain environment Item-10 is being considered at first then others and assigned first number sequence whereas it should be Item-6 as RM0001. 

  • No sorting applied on data.
  • Product version and platform version and code is same across all the platforms. Product version: 10.0.30, Platform version: Update54
  • Using same MS Office version to import to all environment. 
I have the same question (0)
  • Martin Dráb Profile Picture
    237,643 Most Valuable Professional on at
    RE: Sorting issue while importing data using data entity.

    Will you get the same result if you set Import task count for the entity to one (in Entity import execution parameters)?

  • Mohit Rampal Profile Picture
    12,565 Moderator on at
    RE: Sorting issue while importing data using data entity.

    Hi Piyush, As you mentioned you have extended postGetStagingData method to manipulate Item Number so i am assuming it might be occuring due to that code and probably existing data. Can you share the code and also try importing UAT database in your Devbox so can you can debug why Item-10 is considered first.

  • piyush004 Profile Picture
    110 on at
    RE: Sorting issue while importing data using data entity.

    Hi Martin,

    Thanks for responding. Big fan of your work and contributions.

    Yes Martin, we are still getting the same results after keeping Import task count as 1. 

    There are more findings as below- 

    • If we keep the 'ItemNumber' in excel as Item-06 (not Item-6), the number sequence assignment is proper as long as number wont exceed from Item-99 to Item-100.
    • If we sort the 'ItemNumber' column in excel, the numbers are getting sorted in similar way as they are getting inserted in staging table 
      • Item-10
        Item-6
        Item-7
        Item-8
        Item-9

    Eventually we found the solution which is to keep the number of digits same.

    Let say if we have 100 items to upload, we have to give 'ItemNumber' in excel like Item-001. With series of Item-001, Item-002..Item-999, we can import upto 999 items at once. But the moment we will use Item-1000 along with series of Item-0001, Item-1000 will be assigned to number sequence first thenItem-001, Item-002..Item-999

    Not sure why it is happening, we are considering this as workaround but still have to provide RCA for this issue. 

  • piyush004 Profile Picture
    110 on at
    RE: Sorting issue while importing data using data entity.

    Hi Mohit,

    Thank you so much for responding.

    We doubt the same thing first but we believe that's not the case. We have written our logic to modify the data after getting into Staging table in postGetStagingData method.

    We are not able to regenerate the same issue in other testing environment except one. We also debugged by linking UAT DB to Dev environment. In that way only we found that data itself is coming in wrong sorting order to staging table.

    Thanks.

  • piyush004 Profile Picture
    110 on at
    RE: Sorting issue while importing data using data entity.

    Hi Experts,

    Ludwig Reinhard , goshoom , Andre Arnaud de Calavon, nmaenpaa

    Please advise.

  • André Arnaud de Calavon Profile Picture
    300,680 Super User 2025 Season 2 on at
    RE: Sorting issue while importing data using data entity.

    Hi Piyush,

    The inventory unit symbol seems to be mixed up as well. I would suggest reviewing the customization or share the coding with us.

    Have you also considered providing the new item number already in the source file?

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 776 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 606 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 402 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans