Using Custom POS Commands in LS Central - CloudFronts

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:

  1. Microsoft Dynamics 365 Business Central On Premise V16.5
  2. 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:

  1. Registering the module and associated commands.
  2. 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:

  1. Search for Retail Modules in BC Search.
  2. Click on “Process” and then “Register.”
  1. Search for your Codeunit and click on OK.

Using “POS External Commands”:

  1. Search for Retail Modules in BC Search.
  2. Click on “Process” and then “Register”
  1. 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!


Share Story :