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

Community site session details

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

Can I run report in Partner Company using ChangeCompany function in Business Central?

(5) ShareShare
ReportReport
Posted on by 149
Edit - It was my doubt/question earlier, but I can't delete it so adding my findings in the description.
 
Feel free to reply if my findings lack anything.
 
We can only use ChangeCompany function for Record type and RecordRef type. 
 
If you want to run other objects like reports, codeunits, etc in the partner company using change company, you will need to create a Job Queue via AL Code and pass the codeunit or report that you want to run. This will allow you to run the report or codeunit in other companies.
 
In practice, using ChangeCompany is typically only safe for reading data across companies. Writing or posting with it often leads to subtle bugs or data inconsistencies. Creating APIs for these kinda tasks is more preferrable.
I have the same question (0)
  • Suggested answer
    Rishabh Kanaskar Profile Picture
    3,563 on at
    Can I run report in Partner Company using ChangeCompany function in Business Central?
    Hi,
     
    Your findings are correct. To summarize:
    ChangeCompany only works on Record and RecordRef. It cannot directly execute reports, codeunits, or pages in another company.
    For executing business logic in another company, you need to:
    > Create a Job Queue Entry (via AL code) for the target company and run the report/codeunit there, or
    > Expose functionality as an API and call it from the source company.
     
    Best practice: Use ChangeCompany for read-only scenarios (cross-company reporting, lookups). For writes or posting, always switch context via Job Queue or API to avoid data inconsistencies.
     
    Thanks
    Rishabh
  • Verified answer
    Suresh Kulla Profile Picture
    49,986 Super User 2025 Season 2 on at
    Can I run report in Partner Company using ChangeCompany function in Business Central?
    You can also create a Job Queue in another company and execute that report in the preferred company, or post that way, you are only triggering the Job Queue to perform, which will run in the scope of that company.
  • Verified answer
    YUN ZHU Profile Picture
    92,020 Super User 2025 Season 2 on at
    Can I run report in Partner Company using ChangeCompany function in Business Central?
    Hi, hope the following helps.
    Dynamics 365 Business Central: How to redirects references to table data from one company to another (ChangeCompany Method)
    Dynamics 365 Business Central: How to copy Item Picture from one company to another – Customization
     
    Thanks.
    ZHU

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

Responsible AI policies

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

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

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

#1
Nimsara Jayathilaka. Profile Picture

Nimsara Jayathilaka. 3,864

#2
Rishabh Kanaskar Profile Picture

Rishabh Kanaskar 3,185

#3
Sumit Singh Profile Picture

Sumit Singh 2,850

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans