web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

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

Synchronizing Data between stages directly via BC API using configuration packages?

(2) ShareShare
ReportReport
Posted on by 18
Hi, I am trying to sync data between the master companies of our different stages test, prelive, live using configuration packages and a direct API. 
( Specifically the fucntion ImportPackageXMLWithCodeFromStream  in Codeunit "Config. XML Exchange" ). That function doesn't work cross-company.I created an API but unfortunately it only ever applies the package to the current company. 
 So right now my approach is: 
 Save relevant data in a buffer table. 
 startSession in the new company. 
 retrieve & apply the package data.
 Is there a easier way to change the company while keeping the package data ( large string )?
 
I have the same question (0)
  • Suggested answer
    Dhiren Nagar Profile Picture
    498 on at
    Hi,
     
    I think you must be having a full license and hence a free power automate license too (Given by Microsoft with Essential or premuim).
     
    So what you can do I think is set up a manually triggered Automate workflow using Business Central triggers and actions where you can do the following steps. I am putting some help links at the end to create power automate flow.
     
    1 - Retrieve the Config Package Record and its content from the Source Company and environment.
    2 - Now you can run a loop for the number of environments you want to copy your data.
    3 - In each loop you can list the companies with the Get Companies API. (The name of the API can be different, you need to check).
    4 - With this create another loop to insert a record in each of this companies.
    5 - Run action "Import".
     
    If no error and clean data this should automate your work. I've not tried it but thanks to your idea now I can do it. Now this flow you can also run through HTTP Call to Power Automate. Check HTTP trigger in Power Automate - Trigger Power Automate Flow Through Business Central Action.
     
    Now you can also do the same thing by creating a report in Business central which does the same thing by creating the same loop and API calls and Web Action calls.
     
    I know I am explaining on high level, but if you managed to find Config Package API, I think you can understand the above explanation too.
     
    Let me know if you have any question. Mark answer verified if this helps.
     
    Power Automate help links.
     
    Regards,
    Dhiren.

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

News and Announcements

Season of Giving Solutions is Here!

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,573

#2
Khushbu Rajvi. Profile Picture

Khushbu Rajvi. 773 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 760 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans