Create companies and set up synchronization
DYCE Time Tracking and DYCE Project & Resource Planning use companies and environments. For each company in Business Central, a company can be created in the DYCE Web App. For each environment in Business Central, an environment is created in the DYCE Web App. The users can freely switch between the companies as long as they are set up in the chosen company.
Create new companies
New companies for the DYCE Web App can be created in Business Central. For each company in Business Central one DYCE Web App company can be set up. To connect a company to the synchronization, the DYCE Synchronization Setup Wizard must be run in Business Central. The wizard performs all necessary steps and prepares the DYCE Web App company. The wizard can be accessed via the DYCE Setup Synchronization page or by the search (Alt+Q).
The user who runs the wizard needs some permissions and roles. They need a Business Central license, users and the corresponding permissions as well as the Application Administrator role (in Azure Active Directory or Microsoft Entra). Running it without a Business Central Licence can result in a incomplete or wrong setup.
Once the wizard has been run and the environment for time recording is ready, two things should be done. First, synchronization should be turned on and the appropriate entries in the Job Queue need to be checked. The statuses of the DYCE Sync Task (70921505) and DYCE Task Watchdog (70921489) entries should be Ready. Please check the Earliest Start Date/Time, as well. A Full Sync is the second thing, that always be done to synchronize the existing data from Business Central to the DYCE Web App.
Also after the company in the DYCE Web App has been created a Full Sync should always be performed to transfer the existing data from Business Central to the DYCE Web App. The synchronization process will start after one to two minutes after the company is newly created.
Synchronization setup
In the DYCE Synchronization Setup page in Business Central, the synchronization setup can be edited and a Full Sync can be triggered. In the page, the interval between sessions and the number of queries per session can be edited. If Sync Task enabled is changed to NO, the execution of the synchronization via the Job Queue (codeunit 70921505) will also be stopped.
Besides the CodeUnit DYCE Sync Task (70921505) there is the DYCE Task Watchdog (70921489). The DYCE Sync Task executes the synchronization. If it is deactivated due to an error, for example, the synchronization is no longer executed. To avoid an unplanned failure of the synchronization, the DYCE Task Watchdog checks whether the synchronization is running and reactivates it if it is not running.
The Maximum No. of Attempts to Run and Rerun Delay (sec.) can be set up in the Job Queue Entry Card. This can prevent the synchronization from failing due to a simple error and restart the synchronization.
In the Unprocessed outgoing Entries field, it is possible to see how much data has not yet been sent to the DYCE Web App. As soon as a record is created in Business Central, it is displayed in this field until it has been sent. If the synchronization is complete, the data will be marked as processed successfully and not be shown anymore.
The state that data is not sent at all should not occur. It is an indication that synchronization is not enabled or a problem has occurred in the Job Queue.
In the Unprocessed incoming Messages field, you can see how much data was received from the DYCE Web App which could not be processed correctly. Clicking on the number will open the affected records. Unprocessed messages can be corrected and processed again.
If received data is reprocessed, the order in which the record was updated must be kept. If the records are processed in a different order than they were received the content of the data may be changed. The Time Stamp can be used to determine the order, in which the messages where received. The Create operation must be carried out before an Update. Delete should always be the last operation to be performed.
If the data differs between the DYCE Web App and Business Central, the Full Sync action can be used to synchronize the data.
A complete list of log entries can be accessed in the Logs menu group. In the Statistics info tab you can see when the last heartbeat was sent and received.
In the DYCE Web App, the unprocessed records of the Web App and Business Central can be viewed and edited.
There is more than one way to accidentally interrupt synchronization. These must be avoided.
- Creating, deleting or modifying data with configuration packages
Non-validated data is potentially not synchronized, because it skips all trigger.
. The web app uses the System Id as a reference between records. The System Id is not imported in Business Central, but is newly created. E.g. Importing time recording with the Time & Travel Model line Id will fail, if the Ids do not match the ones in the Time & Travel Model. - Delete a Business Central Company (with a Web App environment), create a new one with the same name and run the Onboarding wizard.
The new Business Central Company will reconnect to the existing Web App environment. - Retry processing Not processed Messages in the wrong order
For example, if a Time Recordings is changed twice in Time Tracking and not processed automatically in Business Central, the user can trigger the processing again. If the second update is processed by the user before the first, the Time Recordings will be overwritten with an old state.