Personalized Community is here!
Quickly customize your community to find the content you seek.
Have questions on moving to the cloud? Visit the Dynamics 365 Migration Community today! Microsoft’s extensive network of Dynamics AX and Dynamics CRM experts can help.
2021 Release Wave 2Discover the latest updates and new features releasing from October 2021 through March 2022.
2021 release wave 2 plan
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Community | FastTrack Program | Finance and Operations TechTalks | Customer Engagement TechTalks | Upcoming TechTalks | All TechTalks
I have some code that is needed to be called after a user changes the company. Can any one please help me identify if there are any methods which get called after company has been changed in AX.
The following method changes the Company for the user, when they are using the change company dialog:
If you want to cover every area in the system where you can change companies, you will need to start looking into the Application class. Take a look at the setDefaultCompany method. There is a warning output there that warns the user that they have changed companies (as long as they have this warning turned on in user options). Depending on your requirements, you can use this same type of functionality to handle a change of companies.
Hope this helps, good luck!
I suggest you should consider overrriding following
just before return statement
If you review this method you will find that system is setting all the required variables before return statement
so you should put your code after all the required variables are set.
Please verify and udpate us with your findings.
Thanks for the replies guys, I would try these out and would let you know,
Eid Mubarak ! :)
HI Nitesh & Nayyar,
I have the same type of requirement.
I am able to hide the modules if I write the code in SwitchCompany() of SysDataAreaSelect. But if I call my class which is hiding the module in the Application class (setDefaultCompany) method, AX is chrashing once I change company from the address bar.
Please note, I have called my class just before the "return" statement of the setDefaultCompany method. Please help.
Thanks in advance!
Business Applications communities