web
You’re offline. This is a read only version of the page.
close
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

How to get the current company which the current user is assigned to in Dynamics 365 Business Central?

(0) ShareShare
ReportReport
Posted on by 607

Hi All,

Since different users can be assigned to different company. I want to know the current company based on the current user that is logged into the sandbox.

Is there any i can achieve this through code?

Thank in Advance.

I have the same question (0)
  • Suggested answer
    hyattmjh Profile Picture
    80 on at

    Not sure if I am understanding the questions fully, but

    Message(UserId + CurrentCompany);

    return the current userid and current company - is this what you are trying to acheive?

  • Suggested answer
    keoma Profile Picture
    32,729 on at

    you can use commands currentcompany or companyname.

  • Community Member Profile Picture
    on at

    In Business Central online, the number of users is defined by the subscription and added to your tenant in the Microsoft Partner Center, typically by your Microsoft partner. For more information, see Add a new customer and Create, suspend, or cancel customer subscriptions in the Microsoft Partner Center help.

    To define who can sign in to Business Central, the product licenses must be assigned to users according to the roles that they will perform in Business Central. This can be done in the following ways:

    Your company's Office 365 administrator can do it in the Microsoft 365 Admin Center. For more information, see Add users individually or in bulk to Office 365.
    A Microsoft partner can assign licenses in the Microsoft 365 Business Admin Center or in the Microsoft Partner Center. For more information, see User management tasks for customer accounts in the Microsoft Partner Center help.

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…

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 2,126

#2
Khushbu Rajvi. Profile Picture

Khushbu Rajvi. 744 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 674 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans