Purpose of Code in CU23

matttrax
matttrax Member Posts: 2,309
Could someone tell me what the purpose of the following code is:

IF INCSTR("Journal Batch Name") <> '' THEN BEGIN

I mean obviously I know what it does, but why is it there? Basically it checks if the Item Journal Batch Name has a number on the end of it and increments it. It's messing up an automatic process / post I have. So it'll work the first time, but then the batch gets renamed and it can't find it when it runs again.

Version NAV 5.0 SP1, Codeunit 23

Thanks

Comments

  • ara3n
    ara3n Member Posts: 9,258
    This is std nav feature. You can comment the code or write an if statement to only do it because of setup.

    The other option is not to have a batchname that ends with number.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • matttrax
    matttrax Member Posts: 2,309
    It actually still does it if it starts with a number too.

    I was just curious if there was a reason behind it. Seems like it should be out-of-the-box as you said, a setup option.

    Thanks
  • kine
    kine Member Posts: 12,562
    It is used mostly for periodic journals, where you have new journal for new month etc.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.