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
- LS Central V16
Configuration
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 other commands
Procedure to execute when 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 change in once place need not be replicated everywhere this way 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 on “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 on “Register”
Using “POS External Commands”:Search for Retail Modules in BC Search.
Click on “Process” and then on “Register”
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.
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!
Comments
Post a Comment