Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

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

Deleting Sales Order freezes AX

(0) ShareShare
ReportReport
Posted on by 139

Is anyone familiar with this issue? When I tried to delete a Sales Order it freezes AX, i've tried debugging the issue and it just goes through the normal standard codes, but I noticed that it just loops through the same standard methods.

  • Sean The Michael Profile Picture
    Sean The Michael 139 on at
    RE: Deleting Sales Order freezes AX

    Hi Nikolaos,

    As per checking the table DocuRef standard method existAnothervalue is causing the issue, it is most likely related to an indexing issue.

  • Suggested answer
    Sean The Michael Profile Picture
    Sean The Michael 139 on at
    RE: Deleting Sales Order freezes AX

    Hello everyone,

    I have finally found the cause of the issue, and it is standard code. It seems that the existAnothervalue method in DocuRef is causing the issue, because there are a lot of notes attached to the sales order, this method is slowing down the whole deletion process, because each note takes about 5-7 minutes each to delete, which causes the freezing I have stated. To resolve this issue temporarily, I added a firstOnly to the query in existAnothervalue method to speed things up.

    Thanks for all your help guys.

  • Sean The Michael Profile Picture
    Sean The Michael 139 on at
    RE: Deleting Sales Order freezes AX

    Hi Nikolaos, as per checking it seems that the issue is being caused by the attachments, as there are a lot of attachments on the SO that i have just checked.  Initially i thought it was looping but after further checking it seems that there are just a very substantial amount of attachments on the SO. Will check if this is truly the cause of this issue.

  • nmaenpaa Profile Picture
    nmaenpaa 101,156 on at
    RE: Deleting Sales Order freezes AX

    DocuRef is used to add attachments (text or files) to basically any record in AX. If the parent record (such as order) is deleted, also the attachments related to it are deleted. Still I think there most likely is some customization that explains your issue. Have you checked if you have some customization in DocuRef? Are there any details that you didn't yet share with us? Such as the methods that you see when "it just loops through the same standard methods.".

  • Sean The Michael Profile Picture
    Sean The Michael 139 on at
    RE: Deleting Sales Order freezes AX

    Hello everyone,

    Good day, I have tried removing all customizations but to no avail, it is still freezing. but after checking the freezing seems to be occurring at the DocuRef\Methods\Delete method. Can anyone explain to me the use of the DocuRef table or link me a website with information pertaining to the table?

  • Suggested answer
    nmaenpaa Profile Picture
    nmaenpaa 101,156 on at
    RE: Deleting Sales Order freezes AX

    Next just remove all customizations from this table (or any related tables which might have delete actions), and add them back one by one to find the issue.

  • Sean The Michael Profile Picture
    Sean The Michael 139 on at
    RE: Deleting Sales Order freezes AX

    Good day Nikolaos,

    Thank you for your input.

    I keep freezing in the delete method in the SalesTable methods. Also if I try via job to use delete() or update(), it also freezes AX, only on that specific SO.

  • Sean The Michael Profile Picture
    Sean The Michael 139 on at
    RE: Deleting Sales Order freezes AX

    Good day,

    An update on this.

    I've tried deleting the record from the SalesTable via X++ Job in our test environment, but even through the backend it still freezes only on that Specific SO. Also i've tried updating any value on that specific SO, it will also freeze AX.

  • Suggested answer
    Hossein.K Profile Picture
    Hossein.K 6,646 on at
    RE: Deleting Sales Order freezes AX

    Hi,

    Do you set any security role, XDS, workflow or ...?

  • Sean The Michael Profile Picture
    Sean The Michael 139 on at
    RE: Deleting Sales Order freezes AX

    Hi all,

    I have disabled all customizations with association with the delete process, and it is still freezing, will try to check the standard delete method again.

    Thank you.

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,399 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans