Skip to main content

Notifications

Microsoft Dynamics AX (Archived)

Not able to delete the sales order because of posted transactions

Posted on by Microsoft Employee

I am getting the error "The sales order cannot be deleted because related not posted transactions exist." even when there are no item lines on the sale order.

Any suggestion?

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Not able to delete the sales order in AX 2012

    Noticed, that in CU10 -version (and probably same in older ones) the record in SalesParmTable is created also, when printing just pro forma order confirmation. And status is set to "Waiting". This means, users can't delete orders anymore after printing. This is a bit problematic, but we decided not to do anything more about it. We just inform users, that this way it works. If there is a must to get order deleted, then our customer support can set that status to "Executed" and delete order.

    Anyway order lines can be deleted despite of this problem and this way nothing is visible for deliveries. It is just problem of having unnecessary sales order header without lines in system.

  • Suggested answer
    Mohamed lotfi Profile Picture
    Mohamed lotfi 255 on at
    RE: Not able to delete the sales order in AX 2012

    you can search for the related salesid in the salesparamtable and change the status of the paramjobstatus from waiting to any other value and you can finish deleting it

  • Niels Profile Picture
    Niels 10 on at
    RE: Not able to delete the sales order in AX 2012

    Hi,

    I tried to analyse these lines, looking at who did the posting it looks like wms-person1 ran the wms-pickinglist, wms-person2 registered the wms-pickinglist and made the Salespackingslip. Because of this way of working, the lines person1 made are still waiting, while there are lines for person2 completed for the wms-pickinglist and salespackingslip. The same with the invoices. personA generated the invoices, personB posted and printed them. The lines for personA on the invoice have status waiting, while the lines for personB are completed. All these orders have the status Invoiced. Technaly the lines can be deleted. TEST=> in your test enviroment take one of the waiting lines for a wms-pickinglist and try to post it. System will tell you someone else did so for this line

  • BeckyMidds Profile Picture
    BeckyMidds 20 on at
    RE: Not able to delete the sales order in AX 2012

    Hi Martin,

    I'm not sure of the cause either. Our particular sales orders did not have any transactions such as confirmations or picking lists. They had literally just been created and no transactions were on them!

    Even on some of them, they had deleted the lines so I just had a header and still they couldn't be deleted.

    Originally I thought it was something to do with automatic reservation but although this problem re deleting the orders was happening it seems to have stopped becoming an issue more recently and we haven't changed anything with the reservation.

    To be able to delete the sales orders that were getting this error I removed the records from the SalesParmTable that had a status of waiting or Errors. This then allowed me to delete them.

    Like you, I would love to know what causes the status to become waiting or error'ed though so we can try and stop it even happening.

  • Claus Jensen Profile Picture
    Claus Jensen 155 on at
    RE: Not able to delete the sales order in AX 2012

    We have these records in SalesParmTable with status Waiting, but cant seem to find the cause for them to be in this status. Nothing in the system indicates that the orders in question arent completed.

    The option Sales and Marketing module > periodic > Clean Up, only deletes records with status Executed, not the ones in status waiting.

    Does anyone know why the status is executing or have a solution for this?

    Kind regards

    Martin Hellerup Madsen

  • gpvdlinden Profile Picture
    gpvdlinden 1,200 on at
    RE: Not able to delete the sales order in AX 2012

    The salesParm tables are used when posting sales packing slips, confirmations and invoices. Sometimes some lines with status error or waiting are left behind when there is an error during the posting process.

    One of the options is to clean these lines is to use the 'Sales update history cleanup' in the Sales and Marketing module > periodic > Clean Up. With this option you can choose to clean finished update lines or error lines. Please use this option carefully and test it before use in a production environment.

    Another option is to delete the lines for the specific sales order from the salesParm tables using the table browser in the AOT.

  • BeckyMidds Profile Picture
    BeckyMidds 20 on at
    RE: Not able to delete the sales order in AX 2012

    Hi,

    I do have sales lines and there is data in the inventTrans for the sales order but I can delete the line no problem and still get the error.

    It does look linked to SalesPalmTable and status of Errors or Waiting as if you change this to executed you can delete it. What I'm not sure is why they have a status of Errors Detected or Waiting in the SalesPalmTable. What caused this to occur on these orders?

    Thanks

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Not able to delete the sales order in AX 2012

    There seems to be some data inconsistency

    This error is because related to sales Table .. invenTrans Exists for its salesLine and InventTrans is having status which cant be deleted.

    Please validate.

  • rhettjd Profile Picture
    rhettjd 185 on at
    RE: Not able to delete the sales order in AX 2012

    I looked trough the error code and found out that it has something to do with the SalesParmTable.

    If I enter the SalesParmTable, I see that the orders that cannot be removed, are located in the SalesParmTable with a ParmJobStatus of "Waiting". There are multiple records in the SalesParmTable for that order.

    If I change the status to "Executed"  , I can remove the order with no further errors.

    I get the same fun error from DAX 2009 and its been the only way i can get rid of these otherwise, by deleting the lines in the salespharmtable and then going to salestable and deleting the header is another way I can remove these sales orders. Btw these orders have all been canceled.

  • BeckyMidds Profile Picture
    BeckyMidds 20 on at
    RE: Not able to delete the sales order in AX 2012

    I'm also getting this issue - did you find any resolve to this?

    We can enter a sales order - add lines then remove lines and then cant delete the sales order

    We can enter a sales order - add lines then reaslise we want to delete and cant delete.

    Both have the same error 'The sales order cannot be deleted because related not posted transactions exist.' Problem is we haven't transacted on the sales order just keyed it in!

    Any suggestions greatly appreciated.

    Thanks

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans