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?
 
 
 
 
 
 
 
 
 
  • Waed Ayyad Profile Picture
    8,424 Super User 2025 Season 1 on at
    Selecting the Default Company in Dynamics 365 Finance and Operations (D365FO)
    Hi,

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

    Thanks
    Waed Ayyad
  • Raj Borad Profile Picture
    1,097 on at
    Selecting the Default Company in Dynamics 365 Finance and Operations (D365FO)
    Hi,
     
    I think, You can also change the company in your project Property to run the Class in that specific company.
     
     
  • Suggested answer
    Waed Ayyad Profile Picture
    8,424 Super User 2025 Season 1 on at
    Selecting the Default Company in Dynamics 365 Finance and Operations (D365FO)
    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
     
  • André Arnaud de Calavon Profile Picture
    294,734 Super User 2025 Season 1 on at
    Selecting the Default Company in Dynamics 365 Finance and Operations (D365FO)
    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?
  • Jonas "Jones" Melgaard Profile Picture
    3,867 Super User 2025 Season 1 on at
    Selecting the Default Company in Dynamics 365 Finance and Operations (D365FO)
    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.
  • Suggested answer
    Ramit Paul Profile Picture
    22,600 Most Valuable Professional on at
    Selecting the Default Company in Dynamics 365 Finance and Operations (D365FO)
    Hi,
     
    It is driven by the below setup under users form.
     
     

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 Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Abhilash Warrier Profile Picture

Abhilash Warrier 254

#2
Martin Dráb Profile Picture

Martin Dráb 243 Most Valuable Professional

#3
Adis Profile Picture

Adis 173 Super User 2025 Season 1

Overall leaderboard

Product updates

Dynamics 365 release plans