Announcements
No record found.
Hi,
When I use the standard data management framework to import PO, and I got the error when copy data from Staging to target "Cannot create a record in Purchase orders (PurchTable). Purchase order: PO90890802342, Vendor01The record already exists."
However I did not find any PO with PurchID 'PO90890802342' in the system.
Any hints?
Thanks,
Hello Yuji,
Kindly check if there is any chance that this PO was created and deleted also. After that, the number sequence for PO is changed to some other format due to which you are possibly getting this error!
Best regards,Sourav Dam
Kindly mark this thread 'Yes' if this is answered your query which may help other community members in this forum.
Hi Yuji,
Do you have any custom code ?
Please try another code to create this PO and ckeck whether new code working or not to make sure there isn't any duplicate record in tables.
If there isn't any duplicate record, please try to run sql to update the RecId of the table.
SELECT MAX(RecId) FROM UPDATE SystemSequences SET NextVal = 1 WHERE TabId =
your number sequences for PO and the data in the import file should match
should not have duplicates
Try to see if there is any number sequence cached for the PO. Usually, if there are imports and if client crashes, there is a possibility that these numbers would be cached in the status list of the document's number sequence and would usually cause these type of errors.
I know it seems the inventTransID was blank, and this is causing the problem. But from PurchPurchaseOrderLineV2Entity, where can I find the code to generate the inventTransId for PurchLine?
if using PO lines entity then D365FO auto create invent trans on line PO creation
if not creating then could go to entity mapping in the data import project and in the field mapping make it auto generated
Good morning Yuji,
How do you define the purchase order number that you import?
Do you specify the number as a fixed value or do you let D365FO select the number when you import the PO?
Best regards,
Ludwig
Is this sorted out or still any challenges left?
hope our response helps
your primary key fields are important and in this case the PO number
You mentioned that it could be caused by a missing InventTransId, but I don't think so as you get the error on the Purchase orders (PurchTable) and not the lines.
Can you check if there is a customization on indexes? Did someone add another index which does not allow duplicates? In that case, you also get the same error.
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.
Congratulations to our 2026 Super Stars!
We are thrilled to have these Champions in our Community!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Giorgio Bonacorsi 620
André Arnaud de Cal... 521 Super User 2026 Season 1
CP04-islander 430