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 :
Microsoft Dynamics AX (Archived)

How to disable some modules for one company in address bar in ax 2012

(0) ShareShare
ReportReport
Posted on by

Hi Everyone,

I have a requirement where I have to disable some customized modules dynamically while changing the company from the address bar. I have written a class which disables modules for a particular set of companies. When I am calling my class in SysDataAreaSelect form it is working fine. But if I call my class in Application class->setDefaultCompany(), AX is getting crashed while changing the company.

Please suggest any solution. I would be very grateful.

Thanks & Regards,

Mriganka

*This post is locked for comments

I have the same question (0)
  • Umesh Pandit Profile Picture
    9,315 User Group Leader on at

    check these posts,

    dynamicsuser.net/.../330987.aspx

    technet.microsoft.com/.../gg230970.aspx

  • Community Member Profile Picture
    on at

    Hi Umesh,

    I have already tried the first link you have provided i.e. modifying the loadlist() of sysnavpaneoptionsdialog form. But the solution applies for 2009 only. Even if I modify the code for ax 2012, the purpose is not fulfilled which is disabling the modules dynamically during company change from address bar.

    Thanks,

    Mriganka

  • Rachit Profile Picture
    4,015 User Group Leader on at

    Hi Mriganka,

    Tough it can be a nice technical puzzle to solve, but can you please explain why you want to do this. It is always best approach to be in line with standard Microsoft design patterns which makes your solutions more robust/maintainable and easy to upgrade in long term.

    I assume you want to isolate and prevent your custom modules functionality/data from being accessed by a different company. In case I am correct then Microsoft has released data partitioning feature in AX2012 R2 which takes care of this thing.

    Refer to technet.microsoft.com/.../jj728664.aspx.

  • Mariano Gracia Profile Picture
    on at

    Why don't you use security framework instead doing customizations?, you can create different roles for each company, so you can limit the acces per company. Doing this way you don't need to modify the standard which make easier future migrations and hotfix installation

  • Community Member Profile Picture
    on at

    If I use partitions, the user will be able to access one or more companies only if they swap to a new client session. But the client wants that even the system administrator should be able to see all the companies in the same client session but when the admin changes the company, the other modules should get hidden and the customized modules assigned to those companies only gets visible.

    Therefore if I use partition, the client session will be new as well as the companies assigned to a partition will only appear.

    Please suggest...

  • Raphael Roldan Profile Picture
    15 on at

    Hi Did you success on this? because I have the same requirements.

  • Raphael Roldan Profile Picture
    15 on at

    I found this will can be help.

    axapta-rblearnt.blogspot.com/.../ax-2012-how-to-hide-modules-as-per-user.html

  • Suggested answer
    Community Member Profile Picture
    on at

    Hi Raphael,

    Yes I got the solution for the same like 2 years back. Please refer to my blog: axmriganka.wordpress.com/.../process-of-hiding-modules-as-per-company-using-x-codes-and-security-roles-in-ax-2012-r2

    Hope this helps

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 > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans