Quantcast
Channel: Microsoft Dynamics AX Forum - Recent Threads
Viewing all articles
Browse latest Browse all 72043

Job to fix intercompany orders delivery reminder leaves a purchTable record locked

$
0
0

Hi everyone,

I am a developer working on a job that my customer needs to fix some wrong intercompany orders. Don't ask me why or how they have done it, as I don't know what they have done to have this situation: I just know that they have some intercompany orders not aligned in delivery remain quantities between the purchase and the sales order and I have been ask for a job that should show a dialog to select a specific purchase or sales order and a lot ID and update its delivery reminder fields to zero.

After some work I have managed to get the job work: tested on the first purchase line of a purchase order, it puts zero on the right fields and still keep the intercompany connections and the rest of the orders fields safe.

But if I load the job a second time and use it to fix a second line of the same purchase order, then I get the error "Cannot edit a record in Purchase orders (PurchTable). An update conflict occurred due to another user process deleting the record or changing one or more fields in the record."

It seems that the first execution of the job leaves the updated purchTable record occupied, and it cannot be updated or deleted anymore, and I am not able to understand why: I put all the modifications to database fields insite da ttsbegin-ttscommit block, so when the first execution of the jobs finish it should unlock any of the used records.

I have read somewhere on this forum that when "delivery reminder" functionality is in use, sometimes this thing could happen... but still I don't know how to fix my job to avoid this.

Is there anyone here that can help? Do you need any more informations?

Thank you!


Viewing all articles
Browse latest Browse all 72043

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>