Category Archives: D365 Business Central
Master Data Sync across Companies in Business Central
Introduction In many Business scenarios we have two or more companies which work with the same Customers or Vendors or has same data that is to be shared with multiple legal entities. For such cases, manually making sure everything is in sync becomes difficult as the number of entities increases. For this, Business Central now comes with the functionality to sync master data across multiple companies. This can also be used by consultants for one time syncs if they simply need the setups from one company in another instead of going through the Configuration Package route. Pre-requisites Microsoft Dynamics 365 Business Central (Cloud/OnPrem) References Set up and sync master data across companies | Microsoft Learn Set Up Companies to Synchronize Master Data – Business Central | Microsoft Learn Configuration First, I’ve created two companies in a Sandbox Box which are going to have a uni-directional sync between them. It is possible to have a bi-directional sync however it may cause issues and may cause over-write of data if it isn’t configured properly. Here we can specify which company the data is going to be pulled from and whether we want to enable the synchronization or not. So, I’ll select “CRONUS USA Inc.” as the Source Company and then I’ll click on the “Synchronization Tables” action to show the list of the tables that I want to synchronize. Here by default, all the tables are enabled, I’ve disabled most of them and only selected a few.You can add your custom tables as well. Further, there’s also the option to add filters so if we only want data that fulfils a certain criterion to be pulled into this company that can be managed from here. An example of this would be, a Parent company which has Customers globally which has a local company in a particular country and only wants customers from the said. Further, we can also specify which exact fields we want to sync and whether we want to over-write the data if, there is any present in the current company, during the sync. After that, we go to the “Master Data Initial Sync.” action on the “Master Data Management Setup” and we see the list of the tables that are to be synced along with the “Sync. Mode”. We can change the Sync modes using the action at the top (“Use Full Sync” or “Use Match Based Coupling”) In either case, if we want the data in the Parent Company to over-ride the data in the child company, we have to set the “Overwrite Local Change” field either at the field level or the table level. If it is set to false, then the change fails, and we can see the same in the Synchronization Log. Once this is done, we can click on “Start All” which will start the synchronization process. It is only meant to be run once, as after this the synchronization jobs will take over. Once, everything is done syncing, we get the results as well. After this, as long as the “Enable Synchronization” is set to true on the “Master Data Management Setup” the jobs will keep the data in sync between the two companies. As an example, I’ve created a customer in the parent company and the same gets created into the child company directly within a few seconds. Conclusion Thus, we saw how we can use the native functionality of Business Central to sync data across companies. Happy Coding!
Share Story :
Attach a debugger to an Active User Session in Business Central
Introduction Business Central has recently introduced the functionality to attach a debugger to an active User session. This was previously available in NAV however it has only recently become available for Business Central. Pre-requisites Business Central Cloud/OnPrem References https://learn.microsoft.com/en-us/dynamics365/release-plan/2023wave1/smb/dynamics365-business-central/attach-al-debugger-active-session-or-next-session-specific-user Configuration To use this functionality, we simply need to create an entry in the launch.json file. Also, I tried using it for a Production Environment and as expected it didn’t work. Snapshot debugging it is then! Conclusion Thus, we saw how we can attach a debugger to an active user session in Business Central. Happy Coding!
Share Story :
Use of Standard Journal in Dynamics 365 Business Central
Introduction In this blog, I will demonstrate using Standard Journal functionality in Dynamics 365 Business Central. Standard Journal Standard Journals provide users with the benefit of saving transaction details and utilizing them at a later stage. Consider monthly expense payments, users will manually enter the details for the current month’s initial payment and save the journal line entries for future usage. Steps to save Standard Journal Enter the ‘Code’ and ‘Description’ to uniquely identify the journal. Users can even enable the ‘Save Amount’ toggle button to save the amounts on the journal. Steps to Reuse Standard Journal Please note: The changes made on journal lines will not reflect on the saved template. Conclusion This feature of Dynamics 365 Business Central is very useful for users who are working with Journals that are recurring in nature. Hope this helps!
Share Story :
Copy data between different companies using Configuration Worksheet
Introduction In this blog, I will demonstrate how to copy data between different companies using configuration worksheet. Previously we could only use Configuration packages or copy the company to copy data between companies. By using the Configuration worksheet users can copy data from specific tables in companies to their respective table in the current company. Pre-requisite Microsoft Dynamics 365 Business Central (On-premise/SaaS) Steps Globally search for “Configuration Worksheet” and click on the related link. Configuration Worksheet page opens up. Fill in the table you want to copy. Then click the ‘Copy Data from Company’ button on the action bar as shown in the below screenshot. Also, to use this function the ‘copy data from’ company table must have records and the ‘copy data to’ company table must have no records. A Pop- up page appears allowing the user to select the company from which data will be copied. The no. of records will be shown of the selected table. If the table selected has no records then the line won’t appear. If there are no issues, click on ‘Copy data’ action and a confirmation message will pop up before proceeding. A confirmation message pops up mentioning the data has been copied successfully. Other Actions Get Tables: Click on ‘Prepare’ on the action bar, there you will find the ‘Get Tables’ button. This lets the user add tables by using filters as shown in the below screenshot. Get related tables: User can find another button by clicking ‘Prepare’ and in that ‘Get related Tables’. This function adds all Vendor-related tables and fields anchored on other tables. Please note: Table relation with filtered view and conditional table relations are not considered here. Delete Duplicate lines: Users will find this button under the ‘Prepare’ action. This function deletes duplicated lines as shown in the below screenshot. The vendor line was repeated, by using this function it deleted duplicate lines. Conclusion: In this blog, we learned about copying data from multiple companies into the current company by using a configuration worksheet. Hope this helps!
Share Story :
Business Central 2023 wave 1 (BC22) new features: AL Explorer and AL Home in Visual Studio Code AL extension
Introduction: Business Central 2023 wave 1 (BC22) new features: AL Explorer and AL Home in Visual Studio Code AL extension Steps : 1. Download and install the next major version of the AL Language extension. (v11). 2. Below is the download link of the AL Language below to experience the new features of the development. Click on this link Link: ALLanguage v11.0.759316. Extract that folder and we can see there is a VSIX extension file. 3. Uninstall your previous AL language extension from the visual code marketplace. 4: Go to visual studio code extension marketplace, then click on 3 dots -> click on-> Install from VSIX. 5 : Select vsix extension file, and click on Install. Here, we have successfully installed the AL language extension. 6. First of all, when we open the VS Code, we will see the AL Home below. 7. Another shortcut key for this AL Explorer: AL: Explorer: Ctrl + Shift + F12 Below is the AL: Explorer page. 8. We can View, search, and filter objects: a. Group By: b. Module c. Go to Source Code For a selected object, we can quickly jump to source code, whether to develop or read. d. Bookmark: We can bookmark objects. Below is the Bookmark object. e. API: AL Explorer also allows an overview of all APIs. f. Events: AL Explorer also allows an overview of all Events. g. Extensible Enums: AL Explorer also allows an overview of all Extensible enums. Thank you, I hope this helps!
Share Story :
How to create a Business Central free trial tenant
Introduction Hi, Readers. Today I would like to talk about How to create a Business Central free trial tenant. References https://www.microsoft.com/en-in/microsoft-365/enterprise/office-365-e3?activetab=pivot:overviewtab Steps: Step 1: Search Office 365 E3 on Google or click on the below link. https://www.microsoft.com/en-in/microsoft-365/enterprise/office-365-e3?activetab=pivot:overviewtab Click on the Free trial Fill in personal details which are required Step 2: In the next screen, enter the domain you want example bclearning.onmicrosoft.com Set a password and click on Next Step 3: Enter Any Registration no. (Ex. Any Unique no.) You have successfully created an Office 365 account. Ensure that you are logged in with this account. Step 4: Now you need to open this link in your browser https://businesscentral.dynamics.com/ Click on Continue. Step 5: You can create multiple users here. If you don’t want it, just select the skip option. Here is your Business Central free trial tenant. Now you can explore Business Central. Hope this help. Thanks for reading.
Share Story :
Creating Sales Order/Sales Quote from POS in LS Central
Introduction LS Central allows us to create a Sales Order or Sales Quote directly from POS. I will be demonstrating the same below in this blog. Pre-requisites LS Central v16+ Business Central OnPrem/OnCloud References Suspend Type, Sales Type (lsretail.com) Configuration Search for “Sales Type” in Business Central Create a new record titled “SALES ORDER” in it. Make sure to set the Suspend Type to Sales Order/Sales Quote as required. I am setting it to Sales Order for this example. Log In to your POS with a POS Super User account and Right click on a button and go to button properties, I’m using the default “SUSPEND” button for example here. Set the command to “SUSPEND” and the parameter to the “Sales Order” record you created a few moments ago. Once this is done, create a new Transaction with a Customer and then click on the button. In the confirmation box, click on Yes. If you check in Business Central now, you can see that a new Sales Order has been created. You can also see the same from POS itself if you click on the “Sales Order” button that we created just now. Conclusion: Thus we saw how to create a Sales Order/Sales Quote directly from POS. Happy Coding!
Share Story :
Working with OData Bound Actions
Introduction OData Bound Actions allows us to perform logic in Business Central by hitting specific end points. We can also pass in parameters and get results in response. It’s very similar to using Azure Functions but is natively built into Business Central at no extra cost! In this example, we’ll be returns the Base64 version of an Image of a Customer, we will also see how to get the Image for any other customer as well. Pre-requisites Business Central OnCloud/OnPrem References WebServiceActionContext Data Type – Business Central | Microsoft Docs Creating and Interacting with an OData V4 Bound Action – Business Central | Microsoft Docs Configuration OData Bound Actions are written on Pages or API – Pages that you are declaring as Web Services. In this example below, I’ve created a simple Customer Page with a few fields and kept the OData key field as the “No.” field. I’ve also defined this as a Web Service in Business Central. To create a OData Bound Action, we create a Global Procedure with the Service Enabled decorator. In this procedure, we have to create a WebServiceActionContext variable and set the “ObjectType”, “ObjectID” and Keys that we are using for this Web Service, which is “No.” in this case, after our processing is done we also need to set the “Result Code” for this request. In the above piece of code, I’ve written simple logic which converts the content of a Media Data Type (Image field) to Base64 Text and returns it. In Post-Man if you check of the metadata, you’ll be able to see this action defined in the metadata. Now, it’s time to test out OData Bound Action! To call the OData Bound Action, we need to be working with a single record. So we specify the “No.” field to identify a single record. Now, we append our procedure name as “NAV.[Procedure Name]” and make a POST request. If we put this Base64 through a Base64 to File Converter, we can see that the original data is recovered. Now, we create a new procedure, which will take the System ID as a parameter and return the Image data for that Customer Record. If you want to pass the parameters to the OData Bound Actions, you have to do it as the Body of the Request. Conclusion: P.S. I’ve tried but it seems polymorphism doesn’t work with this. I hope this was insightful and a quick start on how to write OData Bound Actions. Happy coding!
Share Story :
Sending Email in Business Central without SMTP Mail
Introduction With SMTP Mail being deprecated, Business Central now provides us with a new and enhanced way for writing custom logic to send emails. To use this new functionality you have to first configure Email Accounts in Business Central, which you can find here. Pre-requisites Business Central onCloud References Developing with the new enhanced email feature | Dan Kinsella Configuration The new method uses the Email Message (ID: 8904) and Email (ID: 8901) Codeunits. I’ve added multiple actions below and I’ll be describing what the expected behaviour is. This is the simple piece of code which sends an email with the specified Recipients, CCs and BCCs.We can specify multiple recipients and dynamically as the lists are not bound by size. We can also call a simpler version of this method, where we don’t need to specify the CC and BCC. Changing the “OpenInEditor” procedure of “Email” codeunit causes a page to be opened up where you can edit the message before you send it. You can also add attachments or you can save the message draft. Changing the “OpenInEditorModally” procedure of “Email” codeunit causes a page to be opened up (as “RunModal”) where you can edit the message before you send it. You can also add attachments or you can save the message draft. “SaveAsDraft” procedure saves the email as a draft and you can view it in the “Email Outbox” where you can make any changes if necessary and send it directly from there. You can also add attachments to the email directly from code. Conclusion Thus we saw how we can send emails in Business Central v20.
Share Story :
Blocking Items in LS Central from POS
Introduction LS Central has its own unique way of preventing Items from being sold which is different from the standard “Blocked” option field we get on the Item Card. It also comes with detailed and refined permissions which can fit most business needs. All of this is done using another related table known as “Item Status.” Pre-requisites: Business Central OnCloud/OnPrem LS Central v16 References: Item Status (lsretail.com) How to Block Items From Sale at the POS (navisiontech.com) Configuration Open the Item Card for the Item you want to block. Open the “Item Status” for that Item. Click on the “Status Code” and Click on “Select from full list.” Create a new record with code “BLOCKED” and enable all the fields. Here, you can see all the detailed controls available. Conclusion: Thus, we saw how we can Block Items on POS in LS Central and other finer controls available at our disposal in LS Central.
