to continue the processing after the system error occurs

durgadurga Member Posts: 8
Hi friends,

One of our client has a requirement to customize this way. we need to continue the process after a system error occurs.
For example, if the length of code variable is '2' and the incoming data is of '3' (or the value assigned to the code variable is of length '3'), then the system throws the overflow error and the entire process stops. But we need to customize as such the entire process should not stop, it should continue the process after displaying the system error message. can any one suggest me on how this can be achieved. Kindly provide your suggesstions at the earliest, as this is very urgent.

Thanks in advance.


Regards,
Durga

Comments

  • David_SingletonDavid_Singleton Member Posts: 5,479
    Make the field length 3.
    David Singleton
  • einsTeIn.NETeinsTeIn.NET Member Posts: 1,050
    I assume two is the correct length of the values that will be imported. Thus you try to import/enter something that is not allowed for this field. If that's the case then you should teach the users in a better way or force them to work more accurate or you should get sure that the imported data has the correct format.
    "Money is likewise the greatest chance and the greatest scourge of mankind."
  • durgadurga Member Posts: 8
    hi friends,

    i have given that code variable as an example. In navision if any system error occurs then the entire process gets stopped but my customization should not stop the process after the occurence of system error. The entire process should run without issues.

    In other words my requirement can be said as below,
    the system error should just be displayed as a warning to the users and should not stop the process.

    kindly provide any suggessions to achieve this.

    thanks ,
    durga
  • Luc_VanDyckLuc_VanDyck Member, Moderator, Administrator Posts: 3,633
    durga wrote:
    the system error should just be displayed as a warning to the users and should not stop the process.
    A system error is what it is: a serious error. It's doubtful that the process can just continue, without any intervention from the user.
    No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
  • einsTeIn.NETeinsTeIn.NET Member Posts: 1,050
    :?: :mrgreen: :?:

    System: "Attention! There's something wrong within your application or the way you handle it. Please do something!"
    User: "Ok, I will ignore that stupid message and go on like before."

    I think that is not what you want to achieve.
    "Money is likewise the greatest chance and the greatest scourge of mankind."
  • David_SingletonDavid_Singleton Member Posts: 5,479
    durga wrote:
    hi friends,

    i have given that code variable as an example. In navision if any system error occurs then the entire process gets stopped but my customization should not stop the process after the occurence of system error. The entire process should run without issues.

    In other words my requirement can be said as below,
    the system error should just be displayed as a warning to the users and should not stop the process.

    kindly provide any suggessions to achieve this.

    thanks ,
    durga

    And people keep asking me why I still after so many years still have plenty of work fixing up Navision disasters. ](*,)
    David Singleton
  • kinekine Member Posts: 12,562
    I hope that the primary purpose of the question is to handle errors in some "sub transaction" and continue in the main process, like batch posting - catch error for each posting but continue the whole batch...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • David_SingletonDavid_Singleton Member Posts: 5,479
    kine wrote:
    I hope that the primary purpose of the question is to handle errors in some "sub transaction" and continue in the main process, like batch posting - catch error for each posting but continue the whole batch...

    That was also my original assumption, which is why I suggested increasing the field length, the next step being to add a flag to show there is an error and then having a user filter on the error lines and decide how to fix them.

    but the next replies shows that this is not the case.
    David Singleton
  • kinekine Member Posts: 12,562
    The question is, what does it mean:
    the system error should just be displayed as a warning to the users and should not stop the process.

    If it is "the error should be displayed, record skipped, and process must continue on next one..." than it is just language problem...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • vaprogvaprog Member Posts: 1,139
    If you want to catch error conditions do what you need to do in code i.e. do not use a Dataport but use a variable of type File, read, split, check, evaluate and assign the data using your own code in which you need to check for and handle any condition that could lead to an error.

    And then, also check Documentation on Codeunit.RUN, GETLASTERRORTEXT, and CLEARLASTERROR.

    ... and you have been warned in the preceding posts. [-o<
  • JDVyskaJDVyska Member Posts: 179
    And people keep asking me why I still after so many years still have plenty of work fixing up Navision disasters. ](*,)

    I hear that. Fairly often I feel like my official title should be NAV Janitor.
    JEREMY VYSKA
    CEO, Spare Brained Ideas, Göteborg, Sweden
    New (April 2021) Getting Started with Microsoft Dynamics 365 Business Central Book Available: "Your First 20 Hours with Business Central"
Sign In or Register to comment.