Skip to main content

Posts

Report Region Format and Language finally changeable without Developer intervention

  Report Region Format and Language finally changeable without Developer intervention Did you notice? As of BC23 reports have new settings on the request page that can set the output of the report to the desired Region Format and print them in other languages! New advance functionality is designed to override default settings from my settings and customer it means you can now print report in any language (if you have it installed) and in any desired format. So, let’s take a quick look at it.  Regular quote base system settings: Language: German (Germany) Format region: Italian (Switzerland) WOW! I know strange combination nevertheless superb outcome! And it works in RDLC and Word layouts! And for your consideration this will work only and only if you do not specify a specific format for the field in RDLC. So, in RDLC field has to have format set from the dataset.
Recent posts

Prepare For Certification - MB-820: Microsoft Dynamics 365 Business Central Developer

And finally, after around 10 years there is a certification again for Business Central Developers. Since there is no official book there are few ways to prepare by using online resources. Do not take this exam for granted event the old one was not easy even for the experienced developers :D nevertheless I hope that following links will help you prepare as best as possible. Review the study guide: Study guide for Exam MB-820: Microsoft Dynamics 365 Business Central Developer | Microsoft Learn Complete the training: Course MB-820T00---A: Dynamics 365 Business Central Developer - Training | Microsoft Learn There are also instructor materials available on GitHub that you can access for free: MicrosoftLearning/MB-820-Business-Central-Developer-Certification (github.com) What can I say more happy preparation 😊

SetLoadFields, for your Consideration!

Nice little feature in AL when thinking about performance is SetLoadFields Function. It sets the fields to be initially loaded when the record is retrieved from database, meaning that for example if you do define Item.SetLoadFields(Description) only Description Field will be retrieved from the database along with the fields that always selected for loading: Primary key, SystemId, and data audit fields SystemCreatedAt, SystemCreatedBy, SystemModifiedAt, SystemModifiedBy, fields that are filtered upon, and all other fields will be unloaded.   Also, a good method to use is SetBaseLoadFields(), that will omit loading of fields that are coming from table extensions so, you have only fields that are from base table to work with, not worrying about how many extensions are installed and lowering performance of your own code for which extensions are usually irrelevant. And now comes the “Be careful” part if you in want to use “Description 2” for example in your later process you will receive ni

How to? Debug a live session

Did you ever encounter a situation where you cannot replicate the behavior of the bug someone reported, in a test or local environment? Microsoft just made your life a bit easier! As of version 23 access to a session in purpose of debugging is available from the web client. If you go, (screenshots below), to “Help” then “Help and Support” scrolling down a little bit to a troubleshooting tab you will see “Attach debugger to this session” this not only that will jump you to a Visual Studio Code it will also either create a new project for the purpose of debugging or if you have your project open create a launch configuration for the current session, of course after login you will be able to download symbols and attach debugger using one of the created launch configurations. Great, isn’t it? 😊
3 Ways to GET a Record We all know to do a GET of one record based on values of the primary key fields. The standard syntax is as follows: [Ok :=] Record.Get(PK1[Value], PK2[Value],...). Example would be like: SalesHeaderFind.FindFirst(); SalesHeaderGet.Get(SalesHeaderFind."Document Type", SalesHeaderFind."No."); The most used one, isn’t it? What if I tell you that there is a way to make this code shorter. SalesHeaderGet.Get(SalesHeaderFind.RecordId); Yes! It will! This is because RecordID is already the primary key itself and not one of the fields that forms it, as the method expects. Also be aware that in case that the primary key field is of type RecordID you cannot use GET. In this case you will have to use the SetRange method. And the last one as of Business Central 2019 release wave 2 there is a new method, GetBySystemId. The syntax is as follows. [RecordExists := ]  Record.GetBySystemId(SystemId: Guid) Example would be like: SalesHeaderGet.GetBySystemId(Sales