Can I query half a record in AL and Business Central?

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

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

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

    Thanks, i didn't even know about this function and since we have a couple tables with millions of records which we are also extending i'm sure we can increase performance in many different places with this. 🥳

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

    Thank you for this tip , now I update my code to optimize my app.

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

    It would be great if the compiler can read ahead and auto determine the loadfields ..

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

    I was not using it. But as you said- I will use it from now on.

  • @Squadbustersgameplay-hj
    @Squadbustersgameplay-hj 11 месяцев назад

    How to get top N records to be displayed in a Page with same source table.

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

    why is Microsoft not using setloadfields on default tables.... ?

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

    Great video as always, how u measured the performence improvement?

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

      i guess you could for example implement this into an API call and just check the response time

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

    Why can't the compiler fill the setloadfields() or an studio extension which checks the code?

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

      Because... events and other things that might get triggered or called dynamically

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

    if we are loading a flowfield in the setloadfields (Example: Customer.Net Change (LCY)) that is calculated based on a flowfilter (ex: Customer.Date filter) or if the calculation is based on another flowfield, do we need to add the fields (Ex: Date Filter) used in the flow calculation to the setloadfields?Can we use a mix of fields from base app and extension fields in the same setloadfields?

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

      Great question, try it out and let me know :)

  • @MPL_14.1
    @MPL_14.1 2 года назад

    Thanks Erik great video. I've started using this feature since it first came out. I'm thinking of running a SQL profiler in my dev environment to see what the final BC query is that is passed to the DB when loading only extended fields. Just out of curiosity.

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

    The reason for a JIT load on delete is as follows:
    After the delete has happened, we can no longer do JIT loads, so to enable reading unloaded fields after the delete.
    cust.SetLoadFields(cust.No);
    cust.Delete();
    message(cust.Name);
    Above code throws without JIT. Before it would work fine.

  • @DenisErmakov-m2h
    @DenisErmakov-m2h 2 года назад

    Thank you Erik

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

    Awesome information Erik

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

    SetLoadFields is mainly recommended and useful when you are doing Read. If are doing Insert, Delete or Copy to temporary records, then it's not a very good idea to use it.

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

    Does anybody know if there Is a performance improvement, if you do a setloadfields on a table without further table extensions?

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

      Depends on record size I would imagine, try it out and let us know :)

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

      There's a mibuso 2022 video that shows this. The bigger the table, and more ext there is, the better the performance gains

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

    It makes me think of Entity framework's lazy loading =)