Use a Query Object if you have an urge for SQL in Business Central

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

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

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

    Thanks a lot Erik, even before watching, please make for us a video on partial records. Thanks!

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

    Hej Erik, Thanks for your great videos which are sometimes also funny to watch. Thanks. Because you mentioned: pls make for us a video on partial records. Thanks!

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

    Loving your videos and the amount of tabs in your browser. Feeling right at Home 😅
    Thanks for your efforts, really helpful stuff!
    You just earned another sub ;)

  • @nickblackburn6543
    @nickblackburn6543 2 года назад +2

    Hey Eric,
    Top man, excellent channel, thanks for sharing your knowledge.
    Please can you do a video on partial records?
    Thanks,

  • @tarekdemiati9991
    @tarekdemiati9991 3 месяца назад

    Great content as usual.
    I would have love to be able to use RecordRef and FieldRef inside a query, so I was wondering if it's possible to generate a query object in the fly as a text object and then execute it ?

  • @plymouthfop
    @plymouthfop Год назад

    In a Record you can use FilterGroup(-1) for an OR filter.. aka cross field filter. I need to do the same in a query.. how do I say filter (Field1 = true OR Field2 = true)?

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

    Hi @eric can we have any video related to performance tool kit extension or BCPT Suite

  • @kf5ydu
    @kf5ydu Год назад

    Hi Erik,
    As always your videos are incredible. I was wondering if there is a way to do something similar to a union in sql, where you can combine multiple similar datasets. An example would be a combined list of sales invoice and credit memo lines. I’m thinking the only way to do this might be some sort of conditional join on the item ledger based on the document number series if that is possible?

    • @Hougaard
      @Hougaard  Год назад +1

      From Customer Ledger Entries would probably be best.

  • @lmsf_data-ip9gg
    @lmsf_data-ip9gg 4 месяца назад

    This is a great intro video, but is there also a way to add functionality to a query object to return all data for all companies? Not just the context you are in at the moment? I've seen CHatGPT suggest the use of DataScope=AllCompanies, but would this be able to be used in a query?

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

    Very interesting. I met my first query challenge this week. I need to extend “Calc. Warehouse adjustment” that’s build on a query. But now I need to extend the standard bc query with a reason code field. But is that even possible? Has MS burned a bridge here?

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

      You cannot do that, there's no query extension object..

  • @jerrycic7866
    @jerrycic7866 Год назад

    Thank You Sir! Is there a way to implement "Cross Apply"? for example I just want to retrieve the first row from a secondary table ordered by some date column. I am trying to convert all my stored procedures and SQL views to work similarly when we migrate to the BC 365 cloud from on prem Nav.

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

    Hello Erick
    One question is that I need to make a range in a query that only shows me a range of specific rows. For example, I need it to show me from 1 to 20,000 and from 20,000 to 4,000. The range must be with the rows. thank you very much for your help

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

      You can set filters on the elements.

  • @ExcelObianyiscoarts
    @ExcelObianyiscoarts 28 дней назад

    Hi Erik. Is there a way we can use the query to update a record in another table? So after opening the query and we select a record, can we use that record to update another table?

  • @brianhubbard251
    @brianhubbard251 Год назад

    Hi Erik, Have you tried adding an extension column to a query at version 23? It's busted.

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

    Hey Erik -
    Is there any way to see the resulting SQL statement for the above query, what I mean is SELECT SH FIELDS ... and so on anywhere in AL or any other place where it stores the SQL statement.

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

    Hi eric, thanks for your video. could you tell me the name of the al dev tools?

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

      That's the AZ AL Tools

  • @dmichalopoulos4239
    @dmichalopoulos4239 3 месяца назад

    Query object needs Work from microsoft , they blocked access to SQL and we cant even union or distinct and many other sql features when will microsoft update that object?!

    • @Hougaard
      @Hougaard  3 месяца назад

      What work are you missing?

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

    Right /left join doesn't have same behavior as t sql
    Does this have been fixed in latest version?

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

      I am having the same issue.

    • @doffo748
      @doffo748 Год назад

      I have the same issue. LeftOuterJoin does not work. It keeps showing me only the records that are within my filter.

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

    Dear Eric,
    Is there any method to get the company logo and add it to the email body?
    For example: when you make a video on send attachements by email, we need also to add company logo in the email body.
    Best Regards,
    Nav

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

      Embed the image bits in the src parameter

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

      Dear @@Hougaard As you know in business central, if we use embed src img file we need to put the path of the image which is saved on the server, but what if the user try to send the email from his own side. the picture will not appear since it is saved on the server.
      Any idea how to solve this issue?
      For email: I am using Email Item record.
      Best Regards,
      Nav

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

      @@navnav3134 no, you can embed base64 image in the src parameter

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

    can we do a not exist join ?

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

      Here's your options: learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/properties/devenv-sqljointype-property

  • @ara3n
    @ara3n 7 месяцев назад

    The query objects needs to be redesigned. It was built with designer for non developer. MS needs to redesign it to write Linq queries. The current syntax / structure is horrible.

    • @Hougaard
      @Hougaard  7 месяцев назад

      Why Linq? That has no place in the world of BC...

    • @ara3n
      @ara3n 7 месяцев назад

      @@Hougaard I'm not sure what you mean. The goal linq and BC Query is to write a query. It's just one is easier/ faster to write than the other. For example
      var query = from header in salesHeaders
      join line in salesLines on header.OrderNo equals line.OrderNo
      select new
      {
      OrderNo = header.OrderNo, ItemNo = line.ItemNo, Quantity = line.Quantity
      };
      It's 4 lines of code