The Reservation Entry already exists
// mod to add qty validation before posting AllowToPost := TRUE; txtConfirmQty :=''; KTICOde := ''; TmpDetail.INIT; //tmpdetail is record var for Sales Line TmpDetail.SETFILTER("Document Type", 'Order'); TmpDetail.SETFILTER("Document No.", Rec."No."); TmpDetail.SETFILTER(Type, 'Item'); IF TmpDetail.FIND('-') THEN REPEAT IF NOT TmpDetail.Nonstock THEN BEGIN ItemLedger.INIT; // record var for Item Ledger Entry ItemLedger.SETCURRENTKEY("Item No."); ItemLedger.SETRANGE("Item No.", TmpDetail."No."); ItemLedger.SETRANGE(ItemLedger."Location Code", TmpDetail."Location Code"); ItemLedger.CALCSUMS(Quantity); QtyAtLoc := ItemLedger.Quantity; IF QtyAtLoc < TmpDetail."Qty. to Ship" THEN BEGIN IF STRLEN(txtConfirmQty) < 180 THEN BEGIN txtConfirmQty := txtConfirmQty + 'Item No. ' + FORMAT(TmpDetail."No.", 20); txtConfirmQty := txtConfirmQty + ' qty to ship = ' + FORMAT(TmpDetail."Qty. to Ship",7); txtConfirmQty := txtConfirmQty + ' qty-on-hand = ' + FORMAT(QtyAtLoc,8) + '\'; END ELSE txtConfirmQty := txtConfirmQty + '*\'; END; END; UNTIL TmpDetail.NEXT = 0; IF txtConfirmQty <> '' THEN BEGIN txtConfirmQty := txtConfirmQty + '\ Post Anyways?'; AllowToPost := CONFIRM(txtConfirmQty, TRUE); IF AllowToPost THEN BEGIN GetPassCode.OPEN('Enter code to force posting #1#', KTICode); GetPassCode.INPUT(1,KTICOde); GetPassCode.CLOSE; IF KTICode <> 'KTI' THEN AllowToPost := FALSE; END ; END; IF AllowToPost THEN PostYN.RUN(Rec) ELSE CurrForm.UPDATE(FALSE);
Comments
The error about reservation, is that a temporary table or actual table?
Set a break point on the error and try to post with super user and see if it tries to insert in the same code and if there is any if statements and what is different in there etc.
That's how I would attack this problem.
Also check out SP1 for 4.0 and see if you can reproduce the error.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
http://www.mibuso.com/forum/viewtopic.php?t=6267
It can be same problem...
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
I have tried ara3n's suggestion. They still get the error even though the trigger contains only the call to run the posting codeunit (no other processing at all). The good new is that they were able to get the error on a superuser account too, so I no longer need to cue the Twilight Zone theme when dealing with them
kine, where do I enter that code? somehwere in SQL Enterprise Manager?
Thanks to both of you.
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.