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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

salesparmtable contains old transactions with parmjobstatus still at waiting

(0) ShareShare
ReportReport
Posted on by 145

Hi everybody,

Is there a way to clean up the transactions in salesparmtable and salesparmline tables.  What is the impact of deleting these old records?

Thank you in advance.

Steeve

*This post is locked for comments

I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    301,079 Super User 2025 Season 2 on at

    Hi Steeve,

    These tables gets created when you try to post e.g. a confirmation, packing slip or invoice. When the posting really is not pending anymore, you can clean up the tables. Then there is no impact. When you have scheduled a batch to update some invoices and delete also these records, the invoices will be skipped as there is no record anymore. That is no problem as you can restart updates.

    Also check the tables salesparmupdate, salesparmsubtable and salesparmsubline

  • Steeve Profile Picture
    145 on at

    Hi Andre,

    Thank you for your reply.  

    In fact I do clean the tables once a month using the sales update history cleanup batch job.  However, the job only deletes the executed and erroneous lines.  I have some 3,000 old transaction lines which have remained at  'waiting status' in the salesparmtable which I would like to clear.  I don't really know why these have not being processed.

    The reason I'd like to clean these lines is that I suspect it might be affecting the performance of AX when we create sales orders (For info we are using the eDCCM Orderpad module).  

    I might be wrong but anyway these transaction lines should not be lying in these tables.

    I was wondering if there's a way to clean these old lines with 'waiting' status.

    Kind regards,

    Steeve

  • Suggested answer
    Community Member Profile Picture
    on at

    There is no issue deleting these records

  • André Arnaud de Calavon Profile Picture
    301,079 Super User 2025 Season 2 on at

    Hi Steeve,

    The cleanup job indeed does not delete these lines. You can go to the AOT, select a table and delete the records from the table browser. Or create an SQL script to do it.

    I wonder how you got these records in  your system.

  • Mariano Gracia Profile Picture
    on at

    Do it inside Dynamics, if you delete those records in SQL, delete actions won't be triggered, delete SalesParmUpdate as it will delete all the salesparm tables, lines sublines and so on

  • Steeve Profile Picture
    145 on at

    Hi Mariano,

    Thanks for your advice.  However, I'm not an AX developer, would it be possible to get a script to delete the records? I can run it in my test environment.

    Thanks in advance.

    Steeve

  • Suggested answer
    Community Member Profile Picture
    on at

    Open salesparmtable table in table browser and delete the records

  • Community Member Profile Picture
    on at

    Hi,

    I suggest to delete records with SQL script because if you have milions of record, you can create some problems with Log. AX job do the deleting with one big transaction.

    DELETE
    FROM SALESPARMTABLE
    WHERE SALESPARMTABLE.CREATEDDATETIME <= 'write the data'

    DELETE SALESPARMSUBTABLE
    FROM SALESPARMSUBTABLE
    LEFT OUTER JOIN SALESPARMTABLE on
    SALESPARMSUBTABLE.PARMID=SALESPARMTABLE.PARMID AND
    SALESPARMSUBTABLE.TABLEREFID=SALESPARMTABLE.TABLEREFID
    WHERE SALESPARMTABLE.PARMID IS NULL

    DELETE SALESPARMUPDATE
    FROM SALESPARMUPDATE
    LEFT OUTER JOIN SALESPARMTABLE on
    SALESPARMUPDATE.PARMID=SALESPARMTABLE.PARMID
    WHERE SALESPARMTABLE.PARMID IS NULL


    DELETE SALESPARMLINE
    FROM SALESPARMLINE
    LEFT OUTER JOIN SALESPARMTABLE on
    SALESPARMLINE.PARMID=SALESPARMTABLE.PARMID and
    SALESPARMLINE.TABLEREFID=SALESPARMTABLE.TABLEREFID
    WHERE SALESPARMTABLE.PARMID IS NULL


    DELETE SALESPARMSUBLINE
    FROM SALESPARMSUBLINE
    LEFT OUTER JOIN SALESPARMLINE on
    SALESPARMSUBLINE.LINEREFRECID=SALESPARMLINE.RECID
    WHERE SALESPARMLINE.RECID IS NULL

  • Christiaan Profile Picture
    380 on at

    Hi Andre, I came across this article and it closely affects a client of mine.  I have a couple of questions surrounding the use and affect of the purge (SQL) below this thread:

    1. Restart updates; what AX process is meant here? Does the existing invoice Batch not do this already.

    2. Most of the records are in waiting status for this client. do you know the meaning of that? the SQL seems to purge those out as well.

    These tables are the largest for this client and it includes some custom indexes which grow with it as records get added. it will have a large impact on the Invoice batch processing with multi-threading turn on

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans