Posts

Showing posts from June, 2023

Configuring NAS for Scheduled Jobs in LS Central

Image
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. Pre-requisites LS Central Data Director References https://help.lscentral.lsretail.com/Content/LS-Insight/Setup/LS-Central-In-Cloud-LS-Insight-In-Azure/3-Machine-Or-VM.htmxt 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 sa...

Using Scheduled Jobs to Update POS Buffer

Image
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. I...

Live Share With VS Code

Image
Introduction VS Code has a feature, Live Share, using which multiple people can access the same workspace in VS Code and modify files at the same time. This has 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.  Happy Coding!

Navigation in Business Central APIs

Image
Introduction Business Central provides us a standard set of API pages which we can use for performing CRUD Operations on records. In addition to this it also provides us with “Containments” feature, which lets us fetch records related to a certain record. Pre-requisites Business Central onCloud or On-Premise. Postman (For Testing) References Using Containments and Associations - Business Central | Microsoft Docs Usage Go to Web Services. Click on Actions and download the Metadata for that Web Services. In case of the “Sales Order API”, the actual sub-page is named salesOrderLines, so the endpoint for Navigation would be {ParentServiceName}{SubPageName} which in this case would be salesOrderssalesOrderLines. We can see the same in the Metadata document as well. Use the following format for calling the Containment endpoint - salesOrders(Document ID)/salesOrderssalesOrderLines. This returns an array, which contains the list of that particular Sales Order’s Lines. You can create these asso...