Add New LS Central Function

When adding a new Web Function to LS Central and Commerce service should connect to it, the new function needs to be added to the 10033100 OmniWrapper codeunit for the Retail part, or to the 10015822 LSC Activity Web Services codeunit for the Activity part.

Commerce will refer to those two codeunits to consume LS Central Web Services. It is also possible to add a new codeunit with all customized functions, and then add Reference in Commerce Service to the new WS Codeunit.

  1. Open Server\WcfService\LSOmniService.sln

    (in some cases, you need to run Visual Studio as Admin to load Service Project)

  2. Open the BOConnection.PreCommon project:

  1. If your new WS Function was added to the OmniWrapper codeunit, click LSCentral Web Reference, change the Web Reference URL to OmniWrapper in your running LS Central instance where the new code is.
  2. Right-click LSCentral Web Reference, and select Update Web Reference from the menu.

If the new code was added in Activity codeunit, do this for LSActivity Web Reference.

If the code is in a new WS Codeunit, then add new Web Reference that points to the new WS Codeunit.

  • Open the PreCommonCustom.cs file, and now you will have access to your new function in centralWS object. The same applies to any XML port that was added, it will be visible in LSCentral object.

Any mapping of data to or from the LS Central Web service to Commerce object would be done here, too.