Skip to main content

Notifications

Community site session details

Community site session details

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

Company Id null in Business Central on Premises

(0) ShareShare
ReportReport
Posted on by 34

Hello,

 

We are trying to create a Custom API in Business Central on Premises, but we see that when we get the list of companies, all the ids return null.

 

What do you recommend us to do? In the on-premises Id Company Null is always returned or is it a problem that we must solve? or the API call is made in a different way than this:

 

{{baseUrlAPI}} = https://<base URL>:<port>/<serverinstance>/api/<API publisher>/<API group>/<API version>

 

{{baseUrlAPI}}/companies({{CompanyIDMSCE}})/BCApiPlurE

 

Thank you very much in advance,

 

  • ivanrjlg Profile Picture
    34 on at
    Company Id null in Business Central on Premises
    Hello, thank you very much for your time,

    The problem occurs because this Business Central on Premises comes from a migrated version of NAV2016, which just confirmed that this field did not exist.

    Maybe there was an error in the upgrade?

    What has occurred to us is to clone the company and delete the previous one, but we don't know if there is a best practice to solve this problem.

    Thank you so much,
     
  • Verified answer
    Stefano Demiliani Profile Picture
    37,166 Most Valuable Professional on at
    Company Id null in Business Central on Premises
    Company ID is never null, but it contains the SystemId field of the record.
    Are you calling the correct url? You need to call the /companies standard endpoint:
    https://
    <base URL>:<port>/<serverInstance>/api/<API version>/ companies

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 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,099 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,866 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans