web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Cannot create a record in Purchase orders (PurchTable).

(0) ShareShare
ReportReport
Posted on by 4,131

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, Vendor01
The record already exists."

However I did not find any PO with PurchID 'PO90890802342' in the system. 

Any hints?

Thanks,

I have the same question (0)
  • Suggested answer
    SouravDam Profile Picture
    11,732 on at

    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.

  • WillWU Profile Picture
    22,363 on at

    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 = 

  • Suggested answer
    Rahul Mohta Profile Picture
    21,046 on at

    your number sequences for PO and the data in the import file should match

    should not have duplicates

  • Suggested answer
    Vamsi Pranith Profile Picture
    684 on at

    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.

  • Yuji Profile Picture
    4,131 on at

    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?

  • Suggested answer
    Rahul Mohta Profile Picture
    21,046 on at

    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

  • Suggested answer
    Ludwig Reinhard Profile Picture
    Microsoft Employee on at

    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

  • Suggested answer
    SouravDam Profile Picture
    11,732 on at

    Hello Yuji,

    Is this sorted out or still any challenges left?

    Best regards,
    Sourav Dam

    Kindly mark this thread 'Yes' if this is answered your query which may help other community members in this forum.

  • Suggested answer
    Rahul Mohta Profile Picture
    21,046 on at

    hope our response helps

    your primary key fields are important and in this case the PO number

  • André Arnaud de Calavon Profile Picture
    304,739 Super User 2026 Season 1 on at

    Hi Yuji,

    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.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

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

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 620

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 521 Super User 2026 Season 1

#3
CP04-islander Profile Picture

CP04-islander 430

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans