Business Central Archives - Page 9 of 12 - - Page 9

Tag Archives: Business Central

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!

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.

How to resolve Error: Report _ does not have a layout of type None

Introduction Have you ever faced the error: “Report ___ does not have a layout of type None.” Here’s how you can resolve it. Pre-requisites Business Central OnCloud/OnPrem References https://community.dynamics.com/business/b/think-about-it/posts/how-do-i-fix-error-report-x-does-not-have-a-layout-of-type-none Configuration With the earlier versions of Business Central, you were allowed to run a report without specifying a layout, even if it was not a processing only report. However with the recent version of Business Central it is mandatory to specify both the “DefaultLayout” and the path to the layout via the “RDLCLayout” or “WordLayout” or “ExcelLayout” properties. Once these properties are the defined the error is resolved. Furthermore you can also resolve this error by using the report rendering section which has been made available since runtime 9.0. However be sure to define the “DefaultRenderingLayout” property for the report to specify which of the layouts defined should be considered as default. Conclusion: Thus we saw how we can resolve the error: “Report ___ does not have a layout of type None.” Happy Coding!

Using Dialogs to enhance User Experience in Business Central

Introduction We’ve all faced situations where we’ve had an operation take a long while which made the User wonder whether the system is stuck with something or is still processing. We can use simple dialogs which can enhance the User experience by showing User the progress of the operation. Some Business Central operations have out of the box dialogs which indicate progress like Posting documents or entries, Running reports with large data sets. Pre-requisites Business Central OnCloud/OnPrem References Dialog Data Type – Business Central | Microsoft Docs Dialog.Open(Text [, var Any,…]) Method – Business Central | Microsoft Docs Configuration While using the Dialog for creating windows, there are 3 procedures that we are going to be using. Open – It creates the window which we will be displaying the messages in. Update – It updates the content of the window based on the values that we pass in it. Close – It closes the window. We can create a simple Progress Window using the below piece of code. And this is the result for it. Please note that because there were two # in the Label, system has broken them into two separate lines. To avoid creating multiple lines within a single dialog box, we can use the StrSubstNo procedure which compresses the number of updates that we call to 1. We can now see that the content is visible in a single line. In Business Central 14 or previous versions of Business Central (which used windows client) it was possible to show the progress indicator in percentages using native APIs, however this functionality is not supported in Web Client. However we can still simulate it using text and creating our own basic procedure which converts the values to a String which will be used to indicate the progress. Conclusion: Thus we saw how we can use Dialogs to enhance User Experience and allow Users to visualize the processing of some long running task.

How to Create Inventory Period in Business Central.

Inventory periods are used to keep track of when inventory adjusting entries are posted. Unless inventory periods are closed on a monthly basis, adjusting entries will post in the same period as the original transaction. Inventory adjustments will not be posted in that period if you create and close inventory periods. If the initial transaction was posted during a closed inventory period, the adjustments’ value is posted on the first day of the first open inventory period. This ensures that once the financial statements have been printed for a month, the G/L value of inventories, costs, and cost of goods sold do not change. CREATING INVENTORY PERIOD Many companies manage inventory the same time they manage accounting Period. Steps to access inventory period: Go to ‘Accounting Period’ Click on ‘Process’, there you find ‘inventory period’  OR You can simply Go to ‘Inventory Period’ from Global Search. STEPS TO CREATE AN INVENTORY PERIOD. Click On the search icon and enter Inventory Period, select relevant link.  Create a new line In the Ending Date Field, enter the last date in the inventory period that you want to define. When the period is closed, you will not be able to post inventory changes before this date. Enter a descriptive name in the Name field. CLOSING INVENTORY PERIOD. The Closed parameter specifies whether the inventory period is closed to changes in inventory value. This field is not editable. You can close any inventory period if the following conditions are met In that time period, there are no open outbound item ledger entries, showing negative inventory. The Adjust Cost – Item Entries batch job was used to adjust the cost of all goods. This means that any outbound transaction quantities must be applied to existing inventory numbers, such as those from sales orders, outbound transfers, sales invoices, buy returns, or purchase credit notes. TO CLOSE AN INVENTORY PERIOD Before closing an inventory period, choose the Adjust Cost – Item Entries action to ensure that all cost adjustments are posted.Run the Close Inventory Period – Test report to determine if there are any open outbound item entries within the inventory period or any items whose cost has not yet been adjusted. Choose the Close Inventory Period – Test action.Run the Post Inventory Cost to G/L batch job to ensure that all costs are posted to the general ledger. Choose the Post Inventory to G/L action. On the Inventory Periods page, select the inventory period you want to close. Choose the Close Period action. After the inventory period has been closed, you cannot post inventory changes before the ending date. The cost of all items must be adjusted with the Adjust Cost – Item Entries batch job before you close the inventory period. Choose the Yes button to confirm that you want to close the period, or choose No to cancel the closing. The inventory period is closed and a confirmation message is displayed when it is finished. REOPEN INVENTORY PERIOD It is not possible to delete an inventory period once it has been closed. You can, however, reopen it if you want to allow posting before the inventory period’s expiration date. When you reopen a period, it also reopens other inventory periods with ending dates later than the reopened period. TO REOPEN AN INVENTORY PERIOD Choose the icon, enter Inventory Periods, and then choose the related link. Select the inventory period you want to reopen. Choose the Reopen Period action. Confirm that you want to reopen the period. All inventory periods with ending dates later than the period you selected are reopened. Thank you for reading. Hope this helped. 🙂

Undo Bank Reconciliation in Business Central.

If you find a mistake in a posted bank reconciliation, you can correct it using the Undo action on the Bank Acc. Statement page. Steps to undo a Bank reconciliation: 1. Go to ‘Bank Account’ from the global search icon. 2. Select the bank account for which you want to undo the statement. 3. Open the Bank account Card Page, select ‘Bank Account’ and then ‘Statement’ 4.Select the statement for the bank account reconciliation that you want to reverse, and select Undo. 5. Select Yes When you undo a previously posted bank reconciliation, the entries are relocated to the Bank Reconciliation page and are marked as Open, indicating that they have not been reconciled. The bank reconciliation can then be corrected and re-posted. The bank account card provides the bank statement number and the balance from the last bank reconciliation. This indicates that the new bank reconciliation has a different number than the cancelled one. You can use the Change Statement No. action on the Bank Acct. Reconciliation page to use the same number as the cancelled bank reconciliation. Follow these steps to modify the number of a bank account reconciliation: 1. Go to Global Search icon and type in Bank Account Reconciliation, and then select the relevant link. 2.Change Statement No. after selecting Actions. 3. Enter the number you want to use in the New Statement No. area, then click OK. The Last Statement No. and Balance Last Statement fields on the bank account card are updated after the bank reconciliation is posted. This means that if the bank reconciliation you just completed isn’t the most recent, you may need to manually edit the Last Statement No. and Balance Last Statement fields on the bank account card. Thank you. Hope this helps! 🙂

Create Accounting period in Business Central.

CREATION OF ACCOUNTING PERIOD. Step1. Globally search “Accounting Period” and click on the related link. Step2. To create a new accounting period, select process and then click Create year. Step3. By default, system will have a starting date as per the last created accounting period. The no. of periods is 12 by default Period length usually is 1M but can be modified to weeks or quarters. Click ok and a new accounting period is created. CLOSE ACCOUNTING PERIOD Step1. Select Process action and then click on Close Year Step2. System pops up a message stating the start and end date and once the period is closed it cannot be undone. Once you click OK, the closed and data locked column is check true. After Closing the accounting period, we need to close the Income Statement. Step1. Globally search “Close Income Statement” and select the related link Step2. The Fiscal year ending date is automatically filled by the system Step3. Select the journal template you need to post. For Journal batch, create a new batch that can be uniquely identify year end. Step4. Fill in all the necessary details. Click OK and Journal lines are created Step4. Navigate to General Journal and select the batch name Check if the balance is correct before posting.  (First preview post the entries to verify the G/L entries) Step5. Post the journal lines. After posting check the retaining earning account. Hope this helps! Thank you.

Configuring NAS in LS Central for automating Data Director jobs

Introduction LS Central Scheduler Jobs are used for automatic background processing. These jobs use the NAS Service under the hood. We are going to see how to configure the NAS Service for LS Central. References https://help.lscentral.lsretail.com/Content/LS-Insight/Setup/LS-Central-In-Cloud-LS-Insight-In-Azure/3-Machine-Or-VM.htm Pre-requisites LS Central v16.4 – OnPrem Data Director Configuration Create a new Server Instance and name it appropriately.  Ensure that the account for this new Server Instance is set to User and the User has Administrator privileges.  In the General tab, update the “Service Default Company” and “Service Default Time Zone.” In the NAS Services tab, set the following fields: Run NAS Services with Admin Rights: True Startup Argument: NASID,TYPEFILTER=,LOG=1,REPEAT=1 Startup Codeunit: 99001468 Startup Method: LSRSCHEDULER Restart the Server Instance. Open the Scheduler Setup in LS Central and set the “Enable NAS Scheduler” to true.  Refresh the page. Conclusion: Thus we saw how to configure NAS Services in LS Central. Happy Coding!

Using Automated Testing in POSTMAN for Business Central Web Services

Introduction: While using Business Central Web Services or APIs, we often use POSTMAN for testing the request and the responses. Today we’ll see how we can automate this testing to a certain extent using the inbuilt features of POSTMAN. We can have testing logic that runs before every request, after every request or logic that tests on particular request. In the below demonstration, we’ll write automated test to check for GET, PUT, POST and DELETE operations for a single record on a custom API. Postman itself provides a bunch of standard procedures or boiler plate code which we can modify as per our requirements. As this uses Javascript we can also use additional JS features here. Pre-requisites: Postman Business Central OnCloud or OnPremise References: Writing tests | Postman Learning Center Announcing Postman for the Web, Now in Open Beta | Postman Blog Configuration: Post Request – So first we are going to be creating a record in the Customer Table with the following fields. One of the common things to be testing with Custom APIs is to verify whether the request is being created successfully (1) and what we are sending and what is being stored in the record are the same(2). As we are using Javascript, the response is stored in the jsonData variable and we can access any of the fields of the response as a property on the jsonData variable.  As the rest of our automated tests are doing to be performed on this same record, we need to store the Identifier for this record inside some variable which exists outside the scope of this request, here we are using a variable with the Collection scope. If you want to use the same variable outside of this collection, you can also define Global variables.  GET Request – In a simple GET request, the only thing we are concerned with here, is whether the request is executed successfully or not. For this we are simply going to be checking the Status Code. PUT Request – In a PUT request, we are going to be modifying the record that we previously created, here I’m going to update the name of the record. A common test-case for PUT requests would be to ensure that (a) the request is completed successfully and (b) what is being sent in the request is what is updated on the record and is available in the response. DELETE Request – In a simple DELETE request, the only thing we are concerned with is whether the requested is executed successfully and here we will be simply checking the Status Code returned. Once all the Automated Tests are written, you can either execute them from the Collection Level or from a folder level. Here we will be executing our tests from the folder level.  We can also define the Run Order for the requests.  Once the Tests have run, we can get a summary of the results as well as detailed version of the results.  Conclusion: Thus we saw how to use Automated Testing in POSTMAN to reduce re-work and increase efficiency while testing. A bonus tip – you can now use POSTMAN Web Version to create requests instead of download the POSTMAN app and the entire blog above was written using the Web App of POSTMAN. Do note that not everything that can be done on the Windows App can be done on the Web App. Happy Coding!

Using Task Scheduler in Business Central

Introduction: In Business Central, we can use Task Scheduler to utilize background processing to ensure that Users do not have to wait for completion of long operations. Task Scheduler provides us an easy to use and monitor way to offload tasks from the main thread. It creates separate sessions for processing and it allows creating multiple sessions which can be used to run tasks in parallel. It also allows us to define the company in which the processing will happening which is useful when we have to perform operations across all available companies, for example initialization of certain fields or creation of certain records on extension installation. Pre-requisites: Business Central OnCloud or OnPremise References: TaskScheduler Data Type – Business Central | Microsoft Docs Task Scheduler – Business Central | Microsoft Docs Configuration: The following procedures are available for the Task Scheduler data type: CanCreateTask() – Checks whether it is possible to create a new task in this session. CreateTask() – Creates a new task with the specified codeunit, we also specify which Codeunit to run if the main codeunit fails, whether the starts of this task would be Ready when it is created, the company this task will be running under and the time after which this task is to be run. TaskExists() – Checks whether the specified Task exists or not. SetTaskReady() – Sets the specified task status to Ready, a Task can only begin processing if it is in Ready state. CancelTask() – Sets the specified Task’s status to Cancel. A Task can only be set to cancel if it is in pending state. A task that is in progress cannot be cancelled. In case the main Codeunit hits an exception then there are two cases: The exception is retriable :- Business Central will re-try the main codeunit a specific number of times with a specific time interval, if it is unable to complete then the task is failed. The exception is not retriable :- The task fails and the session is deleted. Further if there is a failure codeunit defined then Business Central will run the Failure codeunit instead of failing the task and similarly if the Failure Codeunit hits an exception that is it unable to handle then there are same two cases: The exception is retriable :- Business Central will re-try the main codeunit a specific number of times with a specific time interval, if it is unable to complete then the task is failed. The exception is not retriable :- The task fails and the session is deleted. I have created an action which creates a simple task for all the companies available to the User. After that action is called, we can see that there are four separate sessions created with the same codeunit for different companies. The below is the screenshot of the page – Scheduled Tasks Conclusion: Thus we saw how to create and use Scheduled Tasks in Business Central for background processing. Business Central OnPremise requires some configuration before Task Scheduler can be used you can refer to the below link for the same.Microsoft Dynamics 365 Business Central Server Configuration – Business Central | Microsoft Docs

SEARCH :

FOLLOW CLOUDFRONTS BLOG :

FOLLOW CLOUDFRONTS BLOG :


Secured By miniOrange