Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested answer

Automatic sync between custom tables in BC and Dataverse

(5) ShareShare
ReportReport
Posted on by 289
Hello!
 
I've recently been working with the Standard Integration between Business Central and Dataverse. In my work, I have added a couple custom tables to the integration, and the sync works well for them. However, they are not syncing automatically every 30 minutes or so like the other tables are. They are strictly manual at this moment. By manual I mean that I have to go to a record and synchronize it, or go to the Integration Table Mapping page in BC and start a full sync.
 
I was wondering if it is possible to set up an automatic sync for the custom tables, similar to how all the other tables are synced.
 
I imagine I can do it via a codeunit job queue, but I'm not quite sure how to set it up, as the documentation for these things slightly out of the box is very difficult to find.
 
 
  • Suggested answer
    Khushbu Rajvi. Profile Picture
    16,335 Super User 2025 Season 1 on at
  • Suggested answer
    YUN ZHU Profile Picture
    82,915 Super User 2025 Season 1 on at
    Automatic sync between custom tables in BC and Dataverse
    Of course you can, this is standard behavior, please refer to the information provided by Gerardo.
    In addition, I recently used the following method in a project, which does not require setting up a job queue and complex codeunit. I hope it can give you some tips as well.
    Dynamics 365 Business Central: Can we timely synchronize Dataverse entity changes without Power Automate? Yes, but……
     
    Thanks.
    ZHU
  • Gerardo Rentería García Profile Picture
    18,726 Most Valuable Professional on at
    Automatic sync between custom tables in BC and Dataverse
  • Hagru Profile Picture
    289 on at
    Automatic sync between custom tables in BC and Dataverse
     
    I have read through the post you linked, and I will try to give that a go. I have already mapped up the integration fields and the integration table, but I have not got it to work automatically, only by starting it manually. Therefore, before giving it a try, I have one question:
     
    Will the post you linked give me an opportunity to set up a job queue, or anything that will let me sync the records every hour for example=
  • Suggested answer
    Jainam M. Kothari Profile Picture
    7,933 on at
    Automatic sync between custom tables in BC and Dataverse
  • Suggested answer
    YUN ZHU Profile Picture
    82,915 Super User 2025 Season 1 on at
    Automatic sync between custom tables in BC and Dataverse
    This is quite complex, and hopefully the information below can give you some clues.
    Dynamics 365 Business Central: Customizing an Integration with Microsoft Dataverse (Integrate custom tables)
     
     
    Thanks.
    ZHU
  • Waed Ayyad Profile Picture
    8,430 Super User 2025 Season 1 on at
    Automatic sync between custom tables in BC and Dataverse
    moved to Business Central
  • Suggested answer
    Holly Huffman Profile Picture
    6,078 on at
    Automatic sync between custom tables in BC and Dataverse
    Good morning, afternoon, or evening depending on your location!
     
    Yes! You can set up automatic synchronization for your custom tables in Business Central by using a job queue with a custom Codeunit to periodically trigger the sync process, similar to how standard tables are synced.
    Steps to Automate Sync for Custom Tables:
    1. Identify the Correct Table Mappings
    • Ensure your custom tables are mapped correctly in Integration Table Mapping and associated with Dataverse.
    • Verify the existing standard sync schedule for other tables.
    2. Create a Custom Codeunit to Trigger Synchronization
    • You'll need a Codeunit that calls the sync process for your custom tables.
    • In AL Code, create a Codeunit that runs the synchronization method on a schedule:
      codeunit 50001 "Custom Table Sync"
      {
          Trigger OnRun()
          begin
              DataverseIntegration.SyncIntegrationRecord(DATABASE::"YourCustomTableName");
          end;
      }
    3. Schedule the Codeunit as a Recurring Job
    • Navigate to Job Queue Entries in Business Central.
    • Create a new Job Queue Entry with:
      • Codeunit Number: Your custom Codeunit (50001 in the example above).
      • Recurring Schedule: Set it to run every 30 minutes or at your preferred interval.
      • Start Date & Time: Define when the recurring sync should begin.
      • Ensure "Restart On Failure" is enabled to keep sync running.
    4. Monitor & Test Automation
    • Run the job manually first and check the logs to confirm the sync process works.
    • Verify records update in Dataverse at regular intervals.
    • Adjust schedule timing based on performance needs.
    Alternative Approach: Power Automate Flow
    • If you prefer low-code automation, use Power Automate to create a scheduled flow that pulls Business Central data and syncs it with Dataverse.
     
    Please note: I teamed up with CoPilot AI to research and craft the best response to your question!
    Hope this helps some!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
YUN ZHU Profile Picture

YUN ZHU 616 Super User 2025 Season 1

#2
Mansi Soni Profile Picture

Mansi Soni 487

#3
Sagar Dangar, MCP Profile Picture

Sagar Dangar, MCP 391

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans