Configuring Scheduled Jobs – Part I
Introduction: In this blog, we will be seeing Scheduled Job configuration for Data Replication using Data Director. Scheduled Jobs comprise of two parts: the Job Header and Sub-jobs. In the Job Header, we define different parameters for the Jobs like, Error Handling, To and From Locations, Compression Types, Scheduling details and the sub-jobs. In the Sub Jobs, we define where to get the schemas of the table, the tables to replicate, methods of replication, filters on the data to be replicated, linked tables, etc. References: LS Retail Data Director User Guide (ls-one.com) Isolation Levels in SQL Server – SQLServerCentral Distribution Sublocations, Scheduler Job Header (lsretail.com) Distribution Restrictions, Scheduler Job Header (lsretail.com) Pre-requisites: Microsoft Dynamics 365 Business Central LS Data Director Configuration: General: Job ID :- A unique Identifier for this Scheduled Job. Scheduler Job Type Code:- It is a kind of category for this Job, we can use this category as a filter when we configure NAS Services. Subjobs Defined By Job:- Specifies where system is supposed to fetch sub-jobs from for this Job. Generally it is the same as “Job ID” but LS allows you to create a job with its sub-jobs defined in another job. Location Settings: In this tab, we specify where the Data is supposed to come from and where the data is supposed to go. There are multiple ways to configure this, From Multiple Locations to Single Location Set the “From Dist. Restrictions to “Include List”. Click on Navigate -> Jobs -> Sender Location List. Add all the locations that you want to pull the data from. Set “Distribution Restrictions” to “Single Location” Set the Location in “To-Location Code” field. From Single Location to Multiple Locations – This is the similar to the previous one simply reversing where we set the values. Set “From Dist. Restrictions” to Single Location and set the location. Set “Distribution Sublocations” to “Included in Replic.”, this field is used to specify whether Data should be sent to sublocations(POS Terminals) or not. Set “Distribution Restrictions” to “Include List” and Go to Navigate > Jobs > “Receiver Locations Include/Exclude.” Add all the locations you want to send the Data to. From Multiple Locations to Multiple Locations Simply set Include List on both sides and add all the locations that the data is supposed to come from and where it is supposed to go. Schedule Details Here we specify how often this Job is supposed to run. You can schedule the Job to run every day, hour, minute or second as per your needs. In the above example, I have scheduled the Job to run every 15 minutes, every day. Do note that you need to have NAS Services configured for the jobs to run automatically. Data Replication: Here we have to define the “Subjobs”, which are in essence, tables which are to be replicated. Note:- In the DD Setup tab, there are advanced settings which can be used to control the compression type and SQL Isolation levels. More information regarding that can be found in the aforementioned references. Conclusion: Thus, we saw how to create a Scheduled Job Header, there are a lot more things that can be done with this like, using different codeunits for Data Replication, Object Replication Or simply running Codeunits for automating tasks. Thanks for reading!
Share Story :
Using POS Data Tables in LS Central
Introduction: POS Data Tables are used to display data from any table in POS. The default POS Screen that we see where we enter our items for sale also consists of a Data Table. Data Tables are also used with Lookups, Record Zooms and Data Grids. In this blog, we are going to create our own POS Data Table based on the Customer Table. References: https://help.lscentral.lsretail.com/Content/LS%20Retail/POS/Data/Data%20Tables.htm https://help.lscentral.lsretail.com/Content/Fields/T_99001565_11.htm https://help.lscentral.lsretail.com/Content/Fields/T_99001565_14.htm Pre-requisites: Microsoft Dynamics 365 Business Central LS Central Demonstration: The most important fields in the General Tab are: Field Description Data Table ID Specify a unique ID for this Data Table. Table No Specify the ID of the Table, whose data this Data Table will be showing on POS. Table Columns Specifies the columns that will be visible in the Data Table. Table Rows Specifies how many rows should be visible by default, if there are more you can simply scroll. Key Value Fields Specifies the key fields of the select table. Start Position Defines which record should be selected when this Data Table is opened. Selection Mode This is useful when you are using your Data Table in a lookup, the options available are “MultiSelect“, “SelectOne” or “NoSelect.” Default Search Type Specifies the search type, the options available are: “Any Part“, “Beginning” or “Whole.“ Default Search Command You can specify different searching commands like Filter, Search or Find. Distribution Location Specifies where the POS Data Table should get the data from.Do note that Web Service configuration should be done for this to work and if the record you selected does not exist on your local system, you may get an error. For Data Table Columns: In this tab, we specify the columns we want in our Data Table and the properties of those columns. Field Description Column No. Specifies the order of the Columns Field No. Specifies the Field No. to be used from the Table for the column. Key No. Specify a value in this field if you want to search using this field. Fixed Filter Specify a value in this field for filtering the table. Preferred Width Specify the preferred width of the column. Default Column Setting this value to true, makes the current column be selected by default when opening the data table. Sort Fixed Setting this value to true, disables changing the sort order for that column. Special Field Type It is used to identify that the current column is a special type of field, there are very limited options on this field and we usually do not need to use them. Read more at Reference #3. Editable Makes the field modifiable when we use Record Zoom Controls. Validate Input Validates the input when we use Record Zoom Controls. Filter Tags Used to set a filter using “POS Tags” on that column. POS Command Code Used to specify a Command which is to be executed when user clicks on this column. A good example of this is the “Quantity” column of main POS Screen which executes the “Change Quantity” command when clicked on it. Conclusion: Thus, we saw how to create our own Data Table and the different properties associated with a Data Table. Thanks for reading!
Share Story :
Using Custom POS Commands in LS Central
Introduction: LS Central provides an easy way to add Custom functionality through the use of POS External Commands. These commands are executed on the POS and let me know you how to create them. For this example, we will create a POS Command, to remove all the lines from the current transaction. Pre-requisites: Microsoft Dynamics 365 Business Central On Premise V16.5 LS Central V16 Demonstration: You will need a Codeunit in which we define all the custom commands, all your Custom commands can be added in a single Codeunit. Make sure to set the “TableNo” property to “POS Menu Line” table. In the OnRun trigger, we have to handle two cases: Registering the module and associated commands. Procedure to execute when a command is called. For handling the first case, we create a procedure “Register” which takes a “POS Menu Line” as a parameter. In this procedure we use the “POS Command Registration” codeunit to register this module and all the associated commands. I prefer to use Global Labels to store the Module Code/ Module Description and Command Code/Command Description, as this way, any and all changes need be done only once but it is not necessary. Once this is done, the next step is to register the POS Module, this can be done in two ways: Using Retail Modules: Search for Retail Modules in BC Search. Click on “Process” and then “Register.” Search for your Codeunit and click on OK. Using “POS External Commands”: Search for Retail Modules in BC Search. Click on “Process” and then “Register” Search for your Codeunit and click on OK. You can confirm that your commands are visible by checking the list of POS External Commands. Now on the POS, we right-click on a button and click on “Button Properties” Then set your custom command, Now we add multiple Items. And when we press the button, this is the result, as expected. Conclusion: Thus, in this blog, we saw how to create Custom commands which can be used on POS. Thanks for reading!