The best way to kill Business Central performance with a single line of code

Поделиться
HTML-код
  • Опубликовано: 5 янв 2025

Комментарии • 13

  • @sendit2jason
    @sendit2jason 3 года назад +2

    I would say it's pretty rare to modify records as you're retrieving to a List Page. If I really had to this, then I would use a temporary copy of the record and populate the field, then reference that temp table.field in the column; thus keeping it all in memory. On page.close you could write to the real table from temp table.

  •  3 года назад +2

    What does InDataset do?
    Can you explain it deeoer?
    Thank you ever so much

    • @Hougaard
      @Hougaard  3 года назад +2

      Will put it on the list :)

    • @kilianespunkt8214
      @kilianespunkt8214 3 года назад

      @@Hougaard this would be awesome. :)

  • @realeques
    @realeques 2 года назад +1

    3:58 i'd say most pages are not edible , great work though 😂

    • @Hougaard
      @Hougaard  2 года назад +1

      Sorry, I had a speech deficit as a kid and English is my second language, still learning every day, trying very hard not to make these mistakes, sorry again.

    • @realeques
      @realeques 2 года назад

      ​ @Erik Hougaard i'm just messing with you , i started working full time as a developer this month and we are migrating from navision 2009 to business central , i don't know what i would do without your videos 😁

  • @TheJulietteCharlie
    @TheJulietteCharlie 3 года назад +1

    Modify on each or many scrolled lines in a List? I‘d never have done this, really. Buffering in a temp table behind the scenes must be done properly and could lead to even more problems. The buffer could grow fast and on saving the results on closing the page could take time as well.
    Don’t mess with too much UI features and do not mess with database transactions. The NAV/BC are kind of weird. But until you use COMMIT; carefully if justified, then it’s better than handle it properly by your own.
    What is still unclear for me is how to use OnAfterGetCurrentRecord instead of the OnAfterGetRecord.

  • @carstenhansen3979
    @carstenhansen3979 3 года назад +1

    Use cases:
    - You need sorting and filter (I would use TMP table)
    - You need to log that the user have seen the record (use TMP table like classic report logging). Maybe you can recommend something else?

    • @niccoweb9628
      @niccoweb9628 3 года назад

      i guess you mean if an user open a card page because in a list i think it´s difficult to know what record the user has seen, in card page i would log on OnOpenPage.

  • @chriswatson2407
    @chriswatson2407 3 года назад +2

    Thanks for your 'Worst Practice' tips. Of course, I would never do anything like that...

    • @Hougaard
      @Hougaard  3 года назад

      Of course not :)

  • @plymouthfop
    @plymouthfop 3 года назад

    Thanks!