Hi everyone! When i executed the “Carry out Action” from the Requisition Worksheet and an arror occured, an empty Purchase Order had been created. So, i tried to take away the COMMIT in function “InsertHeader” from Codeunit 333. After that everything seems to work perfectly. I am not sure if this is the optimal solution. Does anybody know a reason what purpose serves this COMMIT in the function “InsertHeader”? I menan: Do I really need this COMMIT though there is another one in the function “FinalizeOrderHeader”? Thx a lot!
That is an odd piece of code. The commit may be there to release the lock and commit the canges to the No. Series Line table. That table is a hot spot in the system and is locked durring the INSERT(TRUE). Just a guess. The odd part is that they release the lock on the purchase header and then only reestablish the lock in an SQL intallation?