We encountered a problem on reports in Microsoft Dynamics CRM 2016 for one of our clients where if you run the report in IE, you will get the following message: Error: ‘Sys’ is undefined.
If you run the report in Chrome, the behavior is slightly different: You will not get an error but the report body doesn’t load and none of the controls in the toolbar seems to load.
After doing a uninstall and reinstall of the Reporting Extensions connectors and republising the reports for the organization using the PublishReports exe, I had a look at the event log on the server, and this is what I saw:
The CRM organization you are attempting to access is currently disabled
It turns out when the installation was done, a Default Organization was added, after which the actual customer org was only imported. This was done because this was an upgrade from 2013 to 2016. The Default org was disabled. Since the Default org was added first, the installation account was added to this org first and this was the default instance for this user.
For some reason when you run a report in CRM, before the report is rendered, it does a check for the user against that user’s default org. Because this was disabled, the report failed.
There is more than one way this can be resolved, and which option you choose depends on your own situation:
- Option 1: Change the default org for the user(s) that is (are) having this problem
- Option 2: Enable the default organization that is currently disabled
- Option 3: Drop the disabled default organization
Option 1: Change the default org for the user(s) that is (are) having this problem
- To be able to do this, the default org will need to be enabled
- You can follow the steps on this blog post to do this: How to change the default organization for a CRM user
Option 2: Enable the default organization that is currently disabled
- This will make the error go away, however you will now have an extra organization that is active and will potentially be backed up
- You can do this through the CRM Deployment Manager
Option 3: Drop the disabled default organization
- This is the option we went with, since we didn’t need this Default org for anything other that to be able to complete the installation
- This is also done through the Deployment Manager
- After deleting the org from Deployment Manager, you can also drop the database in SQL for the default org