Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Suggested answer

Deleting Sales Order freezes AX

(0) ShareShare
ReportReport
Posted on by 135

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 135 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 135 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 135 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 135 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 135 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 135 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,642 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 135 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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey Pt 2

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,514 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans