Exception Handler..

jumpjump Member Posts: 15
hi,
I built a codeunit that builds a Blanket Order for a specific Customer adding specific Items.. if some errors occur during these operations, Navision returns its marvellous msgbox reporting the error.
So, I've a question: is there a way to catch these errors with/without displaying the msgbox?

thanks to all.

Comments

  • iceborgiceborg Member Posts: 67
    Use the Codeunits OnRun trigger and check the return value for the codeunit when executed Ret := Codeunit.RUN(Rec);
    It's the only way to really catch any type of errors in NAV.

    You have samples of this in the Convert Quote to Order and batch postings routines.
  • kinekine Member Posts: 12,562
    And to read the error you can use the new commands in NAV 5.0 if you are lucky and you are using v5.0...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
Sign In or Register to comment.