Lock Error while sales import

schoolkidschoolkid Member Posts: 103
Hi,

Whenever i import a sales order i lock the table and once it is imported i commit and the lock is released,my problem is when the import fails it locks the Sales Header Table and it is locked for a longer period of time.

my code is like this
SalesHeader.LOCKTABLE;
IF(XMLPORT.IMPORT(50018,TestStream)) THEN BEGIN
Message('import complete');
ELSE
Message('Import Failed');
Commit;

Tried to find why the lock wont release but in vain..

Any help would be great

Comments

  • kinekine Member Posts: 12,562
    Some versions of NAV (specific builds) have bug, that locks are not released until you close all messages/error dialog boxes. It seems that you are using one of them...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
Sign In or Register to comment.