Doufudoufu.hashnode.dev·Feb 11, 2024A Lesson in Using the Right Function for the JobThe dreaded mental block struck again and I was left pondering on how to remove spaces from a text variable for quite a while. The most straightforward way, a bit primitive, was to loop through each character and append those without spaces to a new ...msdyn365bc
Doufudoufu.hashnode.dev·Dec 17, 2023A Convert Text to Title Case Function for Business CentralI realized that there seems to not have a conversion to title case function in Business Central codes, nor have I seen it online. So, sharing is caring 😀 procedure ConvertTitleCase(var InputText: Text): Text var TextList: List of [Te...msdyn365bc
Doufudoufu.hashnode.dev·Dec 3, 2023CLEAR vs INIT functions in Business CentralWhat is the difference between CLEAR and INIT functions? Clear(Record) vs Record.Init() CLEAR function When used on a variable, i.e. Clear(SomeVariable), it simply clears the value that is stored to its default state. For example, if it is a number v...msdyn365bc
Doufudoufu.hashnode.dev·Nov 12, 2023Renaming Function in Business CentralMost of the time, you won’t get to use the rename function in Business Central unless you are patching some data that requires the updating of table keys. Changing of table's primary key(s) is a straightforward process. However, some limitations need...msdyn365bc
Doufudoufu.hashnode.dev·Oct 29, 2023Code vs Text Data Type in Business CentralWhen I first started doing NAV/BC development, I would get a bit confused over the purpose of Code and Text data type from time to time. After all, they are quite similar in function and role. Both of them store a string of text. It is also quite nov...msdyn365bc
Doufudoufu.hashnode.dev·Oct 15, 2023How to Ignore Shipment Date Before Work Date Validation in Business CentralOne of our customers has a customization request to ignore the "Shipment Date Before Work Date" validation for unposted sales lines due to their internal processes. A sample of the validation message is shown below. How we did it was to modify the "...msdyn365bc
Doufudoufu.hashnode.dev·Sep 24, 2023How To Mask Password or Text Fields in Business CentralIs it possible to mask a data field on a page, similar to the password field on a login page? Yes, and it is simple. It was just one line of code. ExtendedDatatype = Masked; How it is being used is shown below. field(50; "Password"; Text[50]...105 readsmsdyn365bc
Doufudoufu.hashnode.dev·Sep 16, 2023Should We Avoid Using DeleteAll Function in Business Central?Typically when we need to delete a list of filtered records in Business Central, we would either loop through the recordset to delete each of the records or use the "DeleteAll" function. However, it is not recommended to use the "DeleteAll" function....msdyn365bc
Doufudoufu.hashnode.dev·Sep 10, 2023Copying files between Host and Business Central Docker InstanceRecently, I had to recall how to update the license for the Business Central On-Premise setup and figured that I could do it in my Business Central docker instance instead. Then I realized I do not have a file management interface like Windows Explor...msdyn365bc
Doufudoufu.hashnode.dev·Aug 26, 2023How to Remove Non-Numeric Characters in a Text in Business CentralThere are scenarios whereby you are required to sanitize certain data, especially in integration projects, to remove errand text characters before inserting them into the ERP system. In the "simplified" case below, I will receive a text from a 3rd pa...msdyn365bc