How to: Replicate from/to LS Central in SaaS
Data Director can replicate data from and to SaaS location using LS Central Web Services v 1.0.
The format of the Database connection string would be like this: Server=<RetailWebServices Url>;User=<user>;Pwd=<password>;|lsws|none
To set Protocol type for WS Connection add ;net=xxx; to the connection string where xxx is one of these options: SystemDefault, Ssl3, Tls, Tls11, Tls12, Tls13
Data Director configuration
- Select the Use WS check box in the App Config tab.
- Default Batch Size is used to break up the job into smaller packages while communicating with LS Central Web Service.
- Timeout for each call to LS Central Web Service.
LS Central configuration
- Open Web Service Setup - Web Requests 1.0, and check if these web requests exist and are active:
- GET_TABLE_DATA
- GET_TABLE_DATA_BY_PRIMARY_KEY
- WEB_REPL_ADD_TABLE
- WEB_REPL_END_PACKET
- WEB_REPL_EXE_PACKET
- WEB_REPL_START_PACKET
- Set up Distribution Location, where Db Server Name points to the RetailWebServices URL, and include User ID and Password, if needed.
- Select Version for Central Web Service (lsws):
- To set a different batch size for a job from the Default batch size found in Configuration tool, open Scheduler Job page, set the batch size to be used in the Integer field in the Object Setup FastTab:
-
To let Data Director commit every batch while running Insert job, enter COMMIT in the Additional Parameter field in the DD Setup FastTab:
Connecting with oAuth
-
To connect to SaaS with oAuth, enter the SaaS URL in the Db Server Name field, client ID in the User ID field, client secret as Password, and the tenant ID in the Db. Path & Name field.
-
Set S2S as Plugin String for the version entry.
If the connection string is built by manually entering values in the Part 1 and Part 2 fields, the string will look something like this:
company=mycompany;url=http://myserver.dynamics.com/Production/WS/mycompany/Codeunit/RetailWebServices;clientid=ClientId;clientsecret=ClientSecret;tenant=TenantId;|lsws|s2s