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 :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Selecting the Default Company in Dynamics 365 Finance and Operations (D365FO)

(1) ShareShare
ReportReport
Posted on by 5
Hi, I am new to developing in D365FO, and I have written a few lines of code. I want to set the default company as USP2, but I don't know how to do it. How can I change my default company in D365FO?
 
 
 
 
 
 
 
 
 
I have the same question (0)
  • Suggested answer
    Ramit Paul Profile Picture
    22,797 Most Valuable Professional on at
    Hi,
     
    It is driven by the below setup under users form.
     
     
  • Jonas "Jones" Melgaard Profile Picture
    4,988 Most Valuable Professional on at
    A quick tip. Another way is to use the "changecompany" keyword. That's a prettier way to do data manipulation in other legal entities that the one you are currently in  (-:
     
    I have written an example here:
     
    You can also change the launch legal entity when you debug by changing the parameters in your Visual Studio project.
  • André Arnaud de Calavon Profile Picture
    301,158 Super User 2025 Season 2 on at
    Hi,
     
    Can you explain what exactly you want to achieve? Do you want to run a script for changing a parameter? If so, why can't a user simply set the correct value via the user interface?
    In case you want to change the default company, should this be done for one or all users?
  • Suggested answer
    Waed Ayyad Profile Picture
    9,039 Super User 2025 Season 2 on at
    Hi,
     
    based on the error message, you should use changecompany in order to update table in the other legal entity. Also as Ramit said you can define the default legal entity for each user, and you can change it from the gear button in the user session.
     
     
    Thanks
    Waed Ayyad
    If this helped, please mark it as "Verified" for others facing the same issue
     
  • Raj Borad Profile Picture
    1,428 on at
    Hi,
     
    I think, You can also change the company in your project Property to run the Class in that specific company.
     
     
  • Waed Ayyad Profile Picture
    9,039 Super User 2025 Season 2 on at
    Hi,

    Is your issue resolved?  If yes, mark the answers that helped you as verified.

    Thanks
    Waed Ayyad

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 449 Super User 2025 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 422 Most Valuable Professional

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 239 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans