- Close All AX instances
- Open AX Development Environment (ax32.exe -development)
- Open AX Application (ax32.exe)
- Add Role that you would like to test to your UserId
- System Administration > Common > Users
- Find yourself and double click to get to the detail window
- Assign role that you want to test
- Close AX Application
- Set break points in AX Development Environment
- Create a job and add this line:
SecurityUtil::sysAdminMode(false); - From the AX Development Environment “Ctrl W” to open the application
- You are now in a reduced permission user and have the ability to debug.
To get your environment back to full admin, re-execute the job in step 7 with a true.
Note: This will not work for EP, Services, direct BC.NET and cases using runas(), as the SecurityUtil::sysAdminMode is limited to the current session.