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 :
Microsoft Dynamics AX (Archived)

Cannot create record. The Record already exists.

(1) ShareShare
ReportReport
Posted on by

Dear All,

when i create new line in salesorder form showing this error "

Cannot create a record in Order lines (SalesLine). Sales order: 000002, S0007.
The record already exists "

" in salesLine table no record showing.

Could somebody give me some suggestions on what might be wrong and how to fix it?

*This post is locked for comments

I have the same question (0)
  • Ludwig Reinhard Profile Picture
    Microsoft Employee on at

    Hi subh,

    Have you checked the number sequence that is used for creating your sales orders/order lines and whether some numbers might be hanging there in the status form?

    Ludwig

  • Mea_ Profile Picture
    60,286 on at

    Hi subh,

    There are couple of unique indexes you can find on salesLine, this message means that you are trying to insert data that violates one of them. You need to put breakpoint somewhere on insert, check what values get inserted and see if you already have these index values in DB.

    As Ludwig mentioned It could be number seq issues, that generates numbers already used.

  • kbendrikar Profile Picture
    65 on at

    This is due to uncommited transaction! Resarting AOS solved my problem

  • joelhtown80 Profile Picture
    32 on at
    I also have the same issue but with Purchase Orders. I used Logic Apps in creating the record. Here are my steps:
     
    1. Check if the PO already exists in F&O. There is none.
    2. Created the PO header in PurchaseOrderHeadersV2. It was successful.
    3. Check if there are line items for the PO in PurchaseOrderDetailsV2. There is none.
    4. Created the PO Line item in PurchaseOrderDetailsV2. It was an 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!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Joris dG Profile Picture

Joris dG 5

#2
Alexey Lekanov Profile Picture

Alexey Lekanov 2

#2
Henrik Nordlöf Profile Picture

Henrik Nordlöf 2 User Group Leader

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans