Posts

Showing posts from October, 2022

Recurring Sales in Business Central

Image
Introduction In this blog, we’ll be looking at how to reduce manual work in creating Sales Line in Business Central. For this, we’ll be using the Out of the Box feature of “Recurring Sales Lines.” Pre-requisites Business Central OnPrem or Cloud References Standard Recurring Sales - Microsoft Docs Configuration Search for Recurring Sales Lines in Business Central global search and then click on New. Enter a Code for Identification, a short description and the Currency Code, if applicable. In the Lines, enter the Sales Line which are to be re-created. You can also define a Quantity if you want, it can be easily over-written if necessary. Go to the Customer Card for whom the Recurring Sales Line we created is going to be applicable. Then Go to Related > Sales > Recurring Sales Lines. Set the Code of the Recurring Sales Line, we just created and set the Valid From and Valid to Dates. The Insert Rec. Lines have the following options which have the following impact:  Manual - System a

Adding Edit in Excel for Custom Listparts

Image
Introduction Business Central provides us an easy method of modifying our data from within Excel using Web Services commonly found in the Edit in Excel action. This can be seen in the commonly used List Pages for example Payment Terms. However this functionality can be missing for certain pages or you might want to have additional logic or filtering before executing this. For this I’ll be demonstrating how to add the “Edit in Excel” action in Business Central pages. Pre-requisites Business Central Cloud References Viewing and Editting in Excel - Microsoft Docs Configuration In the above piece of code, I’ve added the “Edit in Excel” action onto the Blanket Sales Order SubForm to allow for easily adding lines using Excel. Firstly, we define the filters that we will be using on the page that we will be passing in the “EditWorksheetInExcel” procedure of the “OdataUtility” codeunit. Note that these filters are defined as Odata expressions as the “Edit in Excel” functionality uses Excel behi

Caching in Business Central

Image
References Data Access - Microsoft Docs Select Latest Version - Microsoft Docs Explanation Caching is one of the methods which systems use to improve performance and respond to requests rapidly. In a Business Central system, caching is done at two levels: Business Central Server Instance Data Cache. SQL Server Data Cache. Whenever a User requests data from Business Central, it firsts check whetherThe data is available in the Server Instance’s cache, If not, then it checks the SQL Server Data Cache, And if not here then it fetches the data from the database. The Business Central Server Instance’s Cache is accessible to all the Users connected to that Server Instance. There are two types of cache stored here,Global Cache Private Cache Global cache is the one which is accessible to all the Users connected to the SQL Server. Private cache is only accessible over a transaction, for a particular User, for a particular company. This cache is cleared as soon as the transaction is completed. Wh

Apply Multiple Entries to Each Other in AL

Image
Introduction While trying to implement a functionality of automatically applying any open invoices for a Customer with the open Payments for the said customer; I observed that there was no quick and easy method to post the application directly. This can be very useful in environments where Payment Entries are created via Integrations without specifying the invoice it needs to be applied to. I read around online but couldn’t find any blogs with the latest method of doing so in Business Central. As such, I spent a good portion of my day debugging the process of applying entries, from start to end as written by Microsoft and to save your time I’m going to jot down my findings here. Pre-requisites Business Central OnPrem/Cloud Configuration Here as an example I’m using a processing report to iterate over all the open Payments in the system and the indented dataitem will iterate over all the open Invoices of the same Customer. The method of iteration and validations may vary however the gen