Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 Community / Forums / Finance forum / Reverse Inventory Clos...
Finance forum
Answered

Reverse Inventory Closing error

Posted on by 60

Hi everyone,

I've run inventory closing. Then I wanted to reverse it and encountered these isues:

  1. I launched the reversing batch job and it is running for more than 3 hours ( the closing took only 2 mins!).
  2. I cannot find the batch job in the "batch jobs" menu
  3. When I try to pause calculation i get the error "The inventory update has been canceled and deleted."
  4. I changed the session date to one day after the closed period and I'm still getting errors caused by the closing when I try to run some transactions.

Would you please help me solving this issue (it is URGENT) or at least give me possibilities to be able to run transactions after the closed period.

Thank you in advance!

Best regards,

Abderrahim SMARI

  • Verified answer
    Abderrahim Smari Profile Picture
    Abderrahim Smari 60 on at
    RE: Reverse Inventory Closing error

    Hi André,

    Thanks a lot!

    unfortunately, I am not quite the developer, therefore I contacted microsoft support and hereunder the solution that worked!

    1. Break the link between the closing record and the reverse record by running the following script

    UPDATE  INVENTCLOSING SET CANCELCLOSINGREFRECID = 0 , INVENTCOSTSTATUS = 0 , STOPRUNNING = 1 WHERE VOUCHER = 'XXXX-12008' AND DATAAREAID = 'XXXX'

    2. Select the closing record CLN-0000001 then click on the “Reverse” button

    3. Wait until the batch job is completed  and getting the closing record fully reversed.

    4. Run new inventory closing if needed.

    best regards,

    Abderrahim SMARI

  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 290,339 Super User 2024 Season 2 on at
    RE: Reverse Inventory Closing error

    Hi Abderrahim,

    Using the next link, there is some information about running custom scripts. It would require a runnable class with the logic to change the status of the closing task or delete the current calculation details. Run custom X++ scripts with zero downtime - Finance & Operations | Dynamics 365 | Microsoft Learn

  • Abderrahim Smari Profile Picture
    Abderrahim Smari 60 on at
    RE: Reverse Inventory Closing error

    Hi André,

    Exactly, the resume calculation is disabled.

    Therefore, would you share with me a link about data repair? Is it the same as data maintenance?

    Thank you so much.

    Kind regards,

    Abderrahim SMARI

  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 290,339 Super User 2024 Season 2 on at
    RE: Reverse Inventory Closing error

    Hi Abderrahim,

    On your screenshot, there is no indication if the reversal was started on the client or batch. For sure, it has been started as there is the "running" icon.

    Is the "Resume calculation" enabled? If not, indeed the reversal is stuck and would need some data repair.

  • Abderrahim Smari Profile Picture
    Abderrahim Smari 60 on at
    RE: Reverse Inventory Closing error

    Hi André,

    The reversal started as a batch, and I can know exactly how much time it has been running because I can consult it in the "closing and adjustment" form (picture below; line 2).

    pastedimage1665433585526v1.png

    However, I can't know its progress because I can't find it  in the "batch jobs" form. Anyway, it's been running long enough now to be able to safely assume that there's problem because as I said the closing didn't take more than 2 mins.

    Also, I checked the settlement lines in "Details > Settlements" for inventory closing (92 lines) and reversal (74 lines which are the same 74 last lines for the closing). So, that confirms that the processing was interrupted at some point and now the system is stuck.

    The batch job may has been deleted by mistake but that's what makes this more odd. If it's not completed how it can be deleted? and if it can be deleted why I can't stop it in "Closing and adjustment" ? (couldn't even do "Pause calculation" in "Calculation > Pause Calculation")

    PS: I'm waiting to get the access to LCS to open a ticket. though maybe I would find guidance here before.

    Thanks for your answer.

    Best regards,
    Abderrahim SMARI

  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 290,339 Super User 2024 Season 2 on at
    RE: Reverse Inventory Closing error

    Hi Abderrahim,

    Can you explain how you would know that the batch job is running for 3 hours when you can't find the batch job? Was the reversal actually started in the background as batch or directly on the client?

    Can you share some screenshots, so we would be able to know what is the situation in your environment?

    PS. If it is really urgent then open a support ticket at your partner or Microsoft Support. This forum is monitored by volunteers in their spare time.

Helpful resources

Quick Links

Dynamics 365 Community Update – Sep 16th

Welcome to the next edition of the Community Platform Update. This is a weekly…

Announcing Our 2024 Season 2 Super Users!

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

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,339 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,177 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans