Encountered this error while setting up the Microsoft Dynamics 365/CRM SharePoint Document Management – Document Location “urloption is not defined“
Here is the Error Details

ReferenceError: urloption is not defined
at Object.mscrm.Form_onload (https://demo210111.crm.dynamics.com/%7b637464136700026442%7d/webresources/SharePointDocumentLocation_main_system_library.js:1:1380)
at pl._executeFunctionInternal (https://demo210111.crm.dynamics.com/uclient/scripts/app.js?v=1.4.1967-2011.4:1142:3778)
at pl.executeFunction (https://demo210111.crm.dynamics.com/uclient/scripts/app.js?v=1.4.1967-2011.4:1142:3524)
at pl.execute (https://demo210111.crm.dynamics.com/uclient/scripts/app.js?v=1.4.1967-2011.4:1142:3339)
at https://demo210111.crm.dynamics.com/uclient/scripts/app.js?v=1.4.1967-2011.4:110:21987
at i (https://demo210111.crm.dynamics.com/uclient/scripts/app.js?v=1.4.1967-2011.4:235:88)
at z._executeIndividualEvent (https://demo210111.crm.dynamics.com/uclient/scripts/app.js?v=1.4.1967-2011.4:110:21963)
at z._executeEventHandler (https://demo210111.crm.dynamics.com/uclient/scripts/app.js?v=1.4.1967-2011.4:110:19076)
at Object.execute (https://demo210111.crm.dynamics.com/uclient/scripts/app.js?v=1.4.1967-2011.4:110:16470)
at w._executeSyncAction (https://demo210111.crm.dynamics.com/uclient/scripts/app.js?v=1.4.1967-2011.4:765:692)
This error is due to Server-Based SharePoint Integration is NOT enabled. Usually this is the first step in setting up the out of the box D365 SharePoint integration. Only encountered this error while trying out a “test environment” and unable to find anything on the error message.
To enable the Server-Based SharePoint Integration navigate to Power Platform admin center > Select the Dynamics 365 Environment > Settings > Integration > Document management settings > Enable Server-Based SharePoint Integration


Here is another error that is due to Server-Based SharePoint Integration NOT enabled:
Microsoft Dynamics 365 List component is not installed.
Install the List component to enable SharePoint to automatically create a hierarchical folder structure on SharePoint for Microsoft Dynamics 365 records. The List component also enables you to get the appearance and behavior of a Microsoft Dynamics 365 list.

Contact me if you need some Microsoft Dynamics 365 CRM Sales Customer Engagement assistance.
Frank Lee
12 times awarded Microsoft MVP – Dynamics 365 / CRM
San Francisco Bay Area | Silicon Valley
Hi, do you have any resolution for these errors? I’m encountering it in a demo environment at the moment
Enable Server-Based SharePoint Integration helped resolved these errors on my side.