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, ...
Answered

Duplicate SOP Number and duplicate Master number

(0) ShareShare
ReportReport
Posted on by 10

Good day,

I am seeing a document with the same SOP number, same customer, and the same master number, the only difference is one posting status is 'posted' and the other is 'unposted'. The items have no allocation.

What I have read are instances with same master but different customer, as well as different SOP numbers.

Not sure how to proceed, thanks.

Regards

Rosemary

Categories:
I have the same question (0)
  • Verified answer
    Richard Wheeler Profile Picture
    75,852 Moderator on at

    Sounds like an incomplete posting. I would start by running check links on the sales series. If that does not correct it, check to see if you see the corresponding AR document. If the AR document is there check the order in history. Did all the lines get invoiced? If yes, you can delete the order from the unposted batch. If there are still lines to be invoiced then there is no issue. A new invoice will go to history with the same master number but a new invoice number. Make sure you perform a backup before running check links.

  • Rosemary Profile Picture
    10 on at

    Thanks for your response.

    A check links was done, no change.

    The document is on the customers account, it was already applied to an invoice, I am seeing it in history.

    The system is not setup to delete can I just void?

    Regards

    Rosemary

  • Richard Wheeler Profile Picture
    75,852 Moderator on at

    Voiding will most likely result in a duplicate key message. Do you know how to run SQL scripts? The problem is you have the same SOPNUMBE/SOPTYPE combination in both the unposted and sales posted tables. When you post an invoice and all lines are complete what is in the unposted tables moves to the posted tables.  The tables in question here are the SOP10100 AND SOP10200 tables. Is this document an order(SOPTYPE=2) or an invoice(SOPTYPE=3)?

  • Rosemary Profile Picture
    10 on at

    It's a Return, and yes I am seeing the document number in the SOP10100 the posting status there is 14, one line with the total.

    SOP10200 has both line items.

    Regards

    Rosemary

  • Verified answer
    Richard Wheeler Profile Picture
    75,852 Moderator on at

    I do not see a status of 14 for sop10100.sopstatus. This is the order header. My SDK only list values from 1-9. If all looks well on the AR side and you can see the posted return under sales order inquiry then these two commands will purge this return.

    DELETE SOP10100 WHERE SOPNUMBE='The return number' and SOPTYPE=4

    DELETE SOP10200 WHERE SOPNUMBE='The return number' and SOPTYPE=4

    These scripts will remove this return from the unposted tables. You will want to run check links again after removing these records. Make sure you perform a backup before doing anything.

  • Rosemary Profile Picture
    10 on at

    The 14 is for 'PSTGSTUS', this from a document I found online, which is 'verifying total detail amounts match header amount'.  

    When I run a Smartlist, Sales Transactions, the document number comes up twice, document status is 'posted' and 'unposted'.

    Which of these is the 'unposted table', I am usually hesitant with the word delete. When the check links is run afterwards will the document be recreated?

    Thanks for the scripts.

  • Richard Wheeler Profile Picture
    75,852 Moderator on at

    SOP10100 and SOP10200 - unposted

    SOP30200 and SOP30300 - posted

    What most likely has happened is that something got interrupted during the posting process. If this return was complete it should have been completely removed from the unposted tables. You are only removing the unposted records not the posted records. There is no document to be recreated after running check links. If this works you will see only one return in Smartlists. Remember to perform a backup before deleting anything.

  • Rosemary Profile Picture
    10 on at

    Thank you, will let you know.

  • McNiel289 Profile Picture
    5 on at

    I'm constantly searching on the internet for posts that will help me. Too much is clearly to learn about this.

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 617

#2
André Arnaud de Calavon Profile Picture

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

#3
Syed Haris Shah Profile Picture

Syed Haris Shah 298 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans