Bertverbeek4PS / bc2adls

Exporting data from Dynamics 365 Business Central to Azure data lake storage or MS Fabric lakehouse
MIT License
60 stars 22 forks source link

Setting up multi company export - documentation is not up to date #159

Closed KoenR3 closed 1 week ago

KoenR3 commented 4 months ago

Hello

We are trying to set up a multi company export using BC2ADLS but the options that are talked about in the documentation are no longer exposed in the UI. How can an export be set up?

Bertverbeek4PS commented 4 months ago

@KoenR3 Indeed the option is gone. It only prefented you that you cannot change the schema when it is exported. So what you have do is setting it up in all companies. Then run the schema export and on every company you need to create a job queue to schedule the export.

After my holiday I will update the documentation.

KoenR3 commented 4 months ago

Hey Bert

Thanks for the speedy reply! If we change the company setting it changes in the UI for every company if we switch. Is the job saved with the correct parameters in the background?

Bertverbeek4PS commented 4 months ago

Note sure what you mean. But currently it checks if the schema is exported. If that is OK then you can export. This job must run in every company. And it will pick up all the changes.

KoenR3 commented 4 months ago

Not sure either, unfortunately I work on the datalake side. I don't have access to any testing environment for Business Central.
What I understand is that the app is set up in Business Central, if opened in a company the tables are set up, once that is set up and saved and it is switched to another company, the configuration persists (company database stays on the other company).

Bertverbeek4PS commented 4 months ago

Yes indeed. All the setup will be stored because table is on database level. But when you do an export the company name is in the export. And if you consolidate the files in your data lake or Fabric you have got just one table for all companies and companyname is on line level. So you know the company.

LeivHendrickxTechnoform commented 2 weeks ago

hi @Bertverbeek4PS , we tried exactly this:

however, only data for company B is exported that way. so, what are we doing wrong exactly? thx for your help

Bertverbeek4PS commented 2 weeks ago

Hi @LeivHendrickxTechnoform, In the setup you can choose in the field "Export Company Database Tables" the company where you want to have the tables that are on database level to be exported. Here you have to choose only one company (for exampleCompany A in all your companies).

Then on each company you have to setup a Job Queue with codeunit 82569 "ADLSE Execution" and set the when you want to export it. In this case it will export from each company in a recurring way.

LeivHendrickxTechnoform commented 2 weeks ago

@Bertverbeek4PS ok, clear. i followed your instructions. will inform next week if things work now as described.

LeivHendrickxTechnoform commented 1 week ago

@Bertverbeek4PS : i can confirm all is working well now! thank you for the help!