Replication Service - Background Session

Running Replication Service in a Background Session does not require any IT administration tools or privileges on the NAV Server, and it can be done directly from Dynamics NAV Client application. It is the easiest method of having the Replication Service up and running.

To start the Replication Service as a Background Session, in Dynamics NAV open the Replication Status page by using Search or Departments / E-Commerce B2B menu.

The Background Session Running will indicate the current state of the session. When Background Session Running=No, click Start Background Replication in the Actions tab to start the Replication Service.

Upon successfully starting the session, the Background Session Running will change to Yes, and the actual running session ID is registered in the Background Session ID field.

In case you do not have enough privileges to start the Replication Service, an error message will be displayed indicating the table and permission type missing.

Production Considerations

Generally, we recommend using Background Session method for production environments only if it is not viable to implement the NAS Service method, e.g. in cloud hosted scenarios.

While it is definitely more convenient than NAS Service method, Background Session method has its limitations:

  1. Replication Service runs on the same NAV Server instance that serves your Dynamics NAV Client users. While merely theoretical in practice, there is a slight performance impact due to Replication Service not running on a separate instance.
  2. Replication Service runs with the privileges of the user who started the session from Dynamics NAV Client. You cannot assign a dedicated NAV user account for the Replication Service.

The user account and privileges concern comes into play when you are using fine-grained role (Permission Set) separation for your users. Since the Replication Service needs to read a variety of tables (mostly related to Items and Customers) and also write E-Commerce specific tables (e.g. Web Orders), not every user may have enough rights to start the Replication Service. This is however not an issue if you do not control user permissions, and all users have SUPER/SUPER(DATA) roles assigned.

The Background Session will not restart automatically upon restarting your NAV Server, e.g. after maintenance/updates. This is a non-issue if all users have enough privileges to start the Background Session, as you can configure to automatically start the Background Session upon user logon to Dynamics NAV. With this setting, you will not miss orders, as e-mail notifications are sent from the Storefront, and even though the Replication Service is not running, upon receiving such notifications, when you log on to Dynamics NAV, the Replication Service will be started automatically, and the orders will be transferred to Dynamics NAV instantly.

If, on the other hand, a user has received a notification e-mail of an order, logs on to Dynamics NAV, and does not have enough privileges to start the Background Session, the Background Session will not be started, and the order will not be transferred to Dynamics NAV until another user with enough privileges also logs on to Dynamics NAV.