The Window hangs after Error

sunnyksunnyk Member Posts: 280
Hi,
Similar to posting a journal where a window opens up and show the status like the record it is posting the line no etc, we made a posting routine for our customization. The problem is that when ever an error occurs in between the window remains. it wont close until we click cancel.

Answers

  • FDickschatFDickschat Member Posts: 380
    Try to pass the record from your journal as a local variable into your posting CU or use code similar to what MS does:
    Instead of:
    CODEUNIT.RUN(CODEUNIT::"Item Jnl.-Post",Rec);
    Do this:
    ItemJnlLine_Local.copy(Rec);
    CODEUNIT.RUN(CODEUNIT::"Item Jnl.-Post",ItemJnlLine_Local);
    

    Or do this in your posting function:
    CU OnRun:
    ItemJnlLine.COPY(Rec);
    Code;
    Rec.COPY(ItemJnlLine);
    

    One other reason could be that you use a single instance CU which opens the dialog while posting. In this case there is no solution. This is just bad design and should not be used.
    Frank Dickschat
    FD Consulting
  • sunnyksunnyk Member Posts: 280
    thanks. Its working now. :)
  • Ravi_ThakkarRavi_Thakkar Member Posts: 392
    In Payment Journal Page in, if Suggest Vendor Payment functionality does not find any records, then Window saying "Processing Vendors #1######" remains open many times, eventhough Window.CLOSE is already defined inside.

    What can be the issue? Any suggestion for solution?
    Ravi_Thakkar
    Ahmedabad, Gujarat, India
    E Mail : ravi.thakkar@hotmail.com
Sign In or Register to comment.