Category Archives: D365 Business Central
Using Live Share in VS Code
Introduction VS Code has recently introduced a new feature using which multiple people can access the same workspace in VS Code and modify files at the same time. This is huge applications in teaching, code reviews as well as prototyping. You can edit modify separate files at the same time in the same folder. Pre-requisites VS Code References Use Microsoft Live Share to collaborate with Visual Studio Code Configuration Install the Live-Share extension in VS Code. Click on the “Live Share” button at the bottom left. Sign in using your Github or Microsoft Account. You can see the session details in the “Live Share” tab along with previously connected. Click on the “Invite Participants” to get the link what can be used to share the session. Now, you can collaborate with different Users and modify the same or different files together. Conclusion Thus we saw how, we can use Live Share for collaborating while developing or reviewing in VS Code. Special thanks to Vaishnavi Joshi for her help in this blog!
Share Story :
How to use Standard Journal Feature In Business Central?
Introduction. They might be some need to copy the data from one batch to another. In Business central there are multiple ways to do so use copy & paste method or use or configuration packages or Use Standard Journal Feature. Let’s understand about the Standard Journal Feature in detail. But please note Standard Journal Function is not present in other journals apart from General Journal. Steps to achieve the goal: Go to batch where you want to move the data from. There will be action to save as a standard Journal. 5. You would be able to see the Standard Journal you have created. Click on Ok. Please note if you change the amount of the line after copying from the Standard Journal. It will not be reflected the same in Standard Journal. As it is used as Template. Conclusion: Thus we saw how we can use Standard Journal Feature in Business central. Thank you very much for reading my work. Hope you enjoyed the article!
Share Story :
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!
Share Story :
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!
Share Story :
Set Up Intercompany In Business Central- Part 1
Introduction: Intercompany Transaction is useful feature to track all transaction that is happening with the specific intercompany. Many organizations consist of more than one company, and these companies often engage in various intercompany transactions. It’s important for an organization to be able to track these transactions with ease, and Microsoft Dynamics 365 Business Central allows you to do just that. With Dynamics 365 Business Central, your organization can reduce errors, improve productivity, and post transactions across multiple subsidiary companies. Business Central makes it easy for your organization’s companies to engage with one another in the same way they would with external customers and vendors. Steps to achieve the goal: Intercompany setup Globally search intercompany setup Set the name and check the Boolean “Auto send Transactions” the option to auto send transactions to the intercompany partner as soon as it arrives in the intercompany outbox, and not have to manually send/receive the intercompany transaction. 3. Go to setting icon there is option to Company information. 4. Fill in the Intercompany Partner Code, Intercompany Inbox Type. and Intercompany Inbox Details fields. Conclusion: Thus we saw how we can configure Intercompany Setup and create IC customers and Vendors. Thank you very much for reading my work. Hope you enjoyed the article!
Share Story :
Restart Feature in Business central
Introduction: Administrators may need to restart a specific Business Central environment to resume normal operation in some cases as a troubleshooting step. Steps to achieve the goal: Go to your settings and select Admin Center. 4. Then click on Restart Environment Action.
Share Story :
How to Cancel Posted Purchase Credit Memo in Business Central?
Introduction: There might be a need where user wants to cancel the Posted Purchase Credit Memo which was posted by mistakenly. Ideally we cannot cancel the Posted Purchase Credit Memo if it is generated from Posted Credit Memo or Purchase return Order. But if the Posted Purchase Credit Memo is generated from cancel Posted Purchase Invoice . Steps to achieve the goal: If a Posted Purchase Invoice is cancelled then system post the Purchase Credit Memo and cancelled field is set to true in Posted Purchase Invoice. Go to its corresponding Posted Purchase Credit Memo you would be able to cancel action in the Posted Purchase Credit Memo. Cancel action Visibility code added by Microsoft. Conclusion: Thus we saw how we can cancel Posted Purchase Credit Memo in Business central. Thank you very much for reading my work. Hope you enjoyed the article!
Share Story :
Using Scheduled Jobs to Update POS Search Buffer
Introduction: POS Search Buffer is used to display the Items in the main POS Search Drop Down. The configuration for automatically updating the POS Search Buffer is located in the POS Functionality Profile, but it is limited in nature, only 2 options exist on the POS Functionality Profile, one which defines whether the buffer should be updated automatically and the other defines the frequency in which it should be updated. We’ve faced some issues with this process running automatically such the Buffer not being updated as such we had to look for a work-around using Scheduled Jobs. Pre-requisites: LS Central Business Central OnPrem or OnCloud References: How to: Control When to Update Search Index and POS Buffer (lsretail.com) Configuration: Create a new scheduled job with an appropriate name and description. In the Object Setup, define the “Object Type” as Codeunit and “Object ID” as 10000749, set the “Code” field as INDEX. Also ensure that the “Uses Scheduler Job Record” is set to true. In the Schedule Details configure the frequency in which you want to run the job. In the below screenshot the job is defined to run Every 10 seconds from 27-01-2022 starting from 10:14:00. Click on Run Now to test whether the job is working as expected. Conclusion: Thus we saw how we can use Scheduled Jobs to update the POS Search Buffer in the event that the standard automatic updating of POS Search Buffer isn’t working as expected. Happy Coding! Extra: The reason we set the “Code” to INDEX and “Uses Scheduler Job Record” is set to true is because in the Source Code of the Codeunit that we are trying to run we can see that the TableNo is defined as Scheduler Job Header which is a reference to the “Uses Scheduler Job Record” field and we can see that it uses the “Code” field to compare which action is to be performed. For instance if instead of INDEX we set it to UPDATE then the processing of the POS Search Buffer would happen based on Actions instead of all the records being re-index as happens when we set the “Code” to “INDEX”, we can also see that we can specify which table we want to Index by setting the table name in the “Text” field.
Share Story :
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
Share Story :
How to Merge Duplicate Customer Data in D365 Business Central
Scenario: A Business Central User receives a Sales order, the user then created a new customer and linked the new contact to it. The user Created a Sales Order and Posted it. Later found out that the user has created a duplicate customer. The new contact should be linked to Original customer. Steps: How to Merge Duplicate Customer Data. 1. In the Customer list below, the Original Customer no. 5000 has higher balance then the duplicate customer no. C00010 . The correct Contact, Mr Jim Halpert is set for duplicate Customer. 2. Now to Merge the duplicate Customer no. C00010 to Original Customer no. 5000, Open the Original Customer card and click on ‘Actions – Function – Merge with’ 3.The Merge duplicate page will open up, in the Merge with Field, enter the duplicate Customer no. In the fields FastTab, we can override the field value. In this case, check the Override box for contact as it needs to be linked to the original Customer. After updating the fields, now we can hit the Merge button on upper left corner. 4. A message will pop up, warning the user that the merging cannot be undone. The duplicate customer will be deleted permanently and data will be combined with original customer. 5. Now if we go back to Customer List, the duplicate Customer is deleted. The balance of Original customer has Increased. The relevant posted sales shipment and Posted sales Invoices are updated with duplicate customer’s data.
 
								 
															