'Get Receipt Line' cannot close, system is currently working

RoddyMcLeanRoddyMcLean Member Posts: 101
edited 2006-11-10 in Navision Attain
Hi,

I have added the code below to the Purchase Invoice - Get Receipt Lines functionality. This is producing the error message "'Get Receipt Lines' cannot close because the system is currently working". I have tried moving the code around the function and also playing with form modality to no avail. ](*,) Any suggestions?

Table 121 - InsertInvLineFromRcptLine(VAR PurchLine : Record "Purchase Line")

//MYCHANGE start
IF COPYSTR("Shortcut Dimension 2 Code", 1, 1) = 'S' THEN
IF NOT CONFIRM(Text50100, FALSE, "Shortcut Dimension 2 Code") THEN
VALIDATE("Shortcut Dimension 2 Code", '');
//MYCHANGE end

NextLineNo := NextLineNo + 10000;
IF "Attached to Line No." = 0 THEN
SETRANGE("Attached to Line No.","Line No.");

Best Regards
Roddy

Comments

  • Miklos_HollenderMiklos_Hollender Member Posts: 1,598
    I think it might be the CONFIRM - that it's not so good idea to ask for user interaction withing a transaction.

    You can just throw an message at the end of the function, that "Out of 9 lines, dimension Blah was reseted in 4 of them" and if they don't like it, they can change manually.
  • krikikriki Member, Moderator Posts: 9,112
    Or there is an error somewhere in the processing. This error generates generates your errormessage before the original error-message comes up.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • RoddyMcLeanRoddyMcLean Member Posts: 101
    Thanks,

    I will go with a slight re-design - handle it all at the end. Navision is good but sometimes its a bit strange!

    Regards
    Roddy
  • PhennoPhenno Member Posts: 630
    Thanks,

    I will go with a slight re-design - handle it all at the end. Navision is good but sometimes its a bit strange!

    Regards
    Roddy


    Imagine that you get a Confirm message inside (running) transaction block (which locks those affected records).
    Imagine that you get a phone call and forget to choose Yes/No on Confirm message.

    Now you can imagine how everybody in the company gets "Record locked by..." error until you come back (after an hour), cause your "unconfirmed" confirm message is still waiting for your input. :)
  • madmmadm Member Posts: 92
    we get the same error when part invoicing goods receipts (2nd invoice). in order to correct it, the qty to invoice is removed from the item tracking on the Purchase Order..

    Not sure if that could help with your problem! :)
Sign In or Register to comment.