2 Set Up Web Service

Before you can start replicating data from your LS Central in-cloud instance to LS Insight in Azure, there are a few things you need to set up and check if they are in order in LS Central. If you are replicating from more than one company in LS Central you need to follow these steps for all companies. Each company must have their own web service.

Publish Retail web services

  1. In LS Central in-cloud, login as admin and navigate to Web Services.
  2. Search for Retail -> RetailWebServices (99009510) should be displayed in list.
    • If you cannot find this service in the list, you must add it: press New and find the code unit (99009510). Be sure to use the name RetailWebServices.
  3. If you just added the RetailWebServices or if it is not published, you need to publish it by doing the following:
    1. Select Edit List from the top menu: the list becomes editable.
    2. Select the Publish check box in the line.
    3. Select Edit List from the top menu: the list stops being editable.
  4. In the list, locate the SOAP URL field for RetailWebServices, and copy the URL to Notepad for later use.
  5. Also search for GetActionsFromRemoteDB (99008933) and GetReplCountersFromRemoteDB (99008931) and add, and publish them if they do not exist.

Add web service password/key to user

  1. In LS Central, navigate to the Users list.
  2. Click the user name of the user you want to use for replication access. The User Card is displayed.
  3. In the Web Service Access FastTab:
    • Click the three-dot button in the Web Service Access Key field, and set up a key.
  4. To copy the key, select the field and then copy the whole key with Ctrl+C.
  5. Paste the key to Notepad for later use.

Web service setup

  1. Navigate to the Web Service Setup page in LS Central.
  2. In the General FastTab:
    • Turn on the Web Service is Active check box.
  3. In the Server FastTab:
    • Paste the web service URI that you copied from RetailWebServices to the Web Service URI field.

    This path should be similar to the example below, but reflect your company and instance:

    https://lscentral.api.bc.dynamics.com/v2.0/696b709f-51ad-407e-83cd-e76c6e84843b/Production/WS/My%20Company/Codeunit/RetailWebServices

  4. In the Client Credentials FastTab: 
    1. Turn on the Override Client Credentials check box.
    2. Add the user name and web service access key that you copied from the User Card to the appropriate fields.
    3. Navigate to a different field to save your changes.
  5. One last thing to check here is whether the Get Table Data web service has the correct optional fields.
    1. If you are in version 17.1 or lower, open Related - Web Service - Web requests.
    2. Search for Get Table Data, and then select the Get Table Data line and click Request xml from the menu.
    3. The following lines should have Optional column selected:
      • Read_Direction
      • Max_Number_Of_Records
      • Ignore_Extra_Fields
      • WS Table Filter Buffer
      • WS Table Field Buffer
      • WS Table Record Buffer
  6. Close Get Table Data.
  7. Close WS Request List.
  8. Close the Web Service Setup page.

Publish and subscribe to Web services

  1. Navigate to the Web Requests page in LS Central.
    • Check that the Base URL matches the one you have set up in the Web Service Setup page (here it ends with the Company name)
  2. Click the Publisher action. This will publish all web services (everything is cleared from the web request list).
  3. Click the Subscriber action. This will create a subscription to all web services (everything reappears in the web request list with the correct URL)

Preaction setup

Before you start to replicate using preactions, the LS Central system must be set up to create those actions when things are added and changed. This is done by adding the Preaction Creation setup.

Retail setup

  1. Navigate to the Retail Setup page in LS Central.
  2. In the General FastTab:
    • Make sure the Preaction Creation by field is set to Database Triggers.
    • If it is not, set the field to Database Triggers, and then navigate to a different field to save the page.
  3. Click the Insert Default Data action.
    • The LS Retail - Insert Default Data page opens. Click the Clear All to deselect everything.
  4. Turn on the Override Current Settings and Preaction Creation Setup check boxes in the list.
  5. Click the Insert action.
    • This will insert the data needed to create preactions.

Scheduler setup

  1. Navigate to the Scheduler Setup page in LS Central.
  2. In the General FastTab:
    • Turn on the Replicate using Preactions check box.
    • If the check box is not active, turn it on and then navigate to a different field to save the card.

The cloud setup is now done and you can move on to what needs to be done on the Scheduler server.

 

< BackNext >