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, ...
Suggested answer

Duplicate Products Due to Leading Zero in Barcode

(3) ShareShare
ReportReport
Posted on by 6

Hi all,

 

We accidentally uploaded product data from another store into our current D365 F&O environment, which created duplicate items with only one difference: the barcode.

 

Example:

 

  •  

    0788821150202 (from another store)


  •  

    788821150202 (our correct one)




  •  
  •  
 

Same product name, but different prices and transactions. The wrong one is already linked to purchase/sales orders, so deletion isn’t possible.

 

Problems:

 

  •  

    Duplicate SKUs


  •  

    Wrong item used at POS


  •  

    Pricing conflicts




  •  
  •  
 

Looking for advice on:

 

  •  

    Merging or handling duplicates safely


  •  

    Preventing this in the future


  •  

    Keeping system clean without breaking references




  •  
  •  
 

Has anyone fixed this before? Any help would be appreciated.

 

Thanks,

Ghulam Ahmed

Categories:
I have the same question (0)
  • Suggested answer
    Satyam Prakash Profile Picture
    622 on at
    Duplicate Products Due to Leading Zero in Barcode

    To resolve the duplicates, deactivate the incorrect items by stopping them in all dimensions, renaming them (e.g., “Do Not Use”), and removing them from POS, catalogs, and price lists. Keep them for historical reference, but prevent future use. Enforce barcode uniqueness, validate all imports in a staging environment, and implement checks in your data templates to avoid similar issues as we advance.

  • André Arnaud de Calavon Profile Picture
    297,200 Super User 2025 Season 2 on at
    Duplicate Products Due to Leading Zero in Barcode
    Hi Ghulam,
     
    This is a serious challenge. Are you able to restore a database back in time before the import was executed or does that have too much of impact as well?
     
    Correcting the data will be very hard. You mentioned the creation of purchase and sales orders. What is the status of these? If postings were done, do these also have wrong prices?
     
    You would need to identify all tables and records which are incorrect. Then you can check if a correction job can be written. There can be two approaches: 
    • Merging the released products
    • Replacing the wrong item on all transactions with the correct one. 
    Both will require deep testing and validating all related tables. Both approaches will require to run a consistency check with the option Correct for the inventory module to get the on-hand recalculated correctly. 
     
    In future you can prevent it by implementing additional validations on the barcode table. E.g. not allowing a leading zero or a maximum number of characters. There are barcode mask options where you can set a maximum length and it can validate a check digit. 
     
     

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…

Mansi Soni – Community Spotlight

We are honored to recognize Mansi Soni as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

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

#1
Sohaib Cheema Profile Picture

Sohaib Cheema 665 User Group Leader

#2
Martin Dráb Profile Picture

Martin Dráb 595 Most Valuable Professional

#3
Yng Lih Profile Picture

Yng Lih 558

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans