Business Problem: Client needs to migrate their Dynamics CRM On-Premise Instance to Online. We have been tasked with bringing all their customizations to the cloud. I am currently focusing on migrating their Plugins.
Error: On my first run importing their Plugins to Online I received this error saying my plugin import had failed: “An error has occurred. Try this action again. If the problem continues, check the Microsoft Dynamics 365 Community for solutions or contact your organization’s Microsoft Dynamics 365 Administrator. Finally, you can contact Microsoft Support.”
This is a very vague error which did not point me at a solution. Thus, I began the trial and error of discovering what setting was blocking me from deploying the plugin to online.
Solution: The Plugin was set to “Isolation Mode” None. Online plugins have to be registered in Sandbox mode, and the option of “None” is not available when making a new plugin. However, since we were migrating this plugin from on-premise to online it was an easy setting to miss.
There are certain limitations one can run into when switching to Sandbox isolation mode, and these are covered at length in Microsoft documentation, and other blogs so I won’t get into them here. Depending on the complexity of your plugin you may or may not need to refactor the code when switching to Sandbox mode. Either way, switching to Sandbox mode when migrating to online allows you to import the plugin, and start working on the errors you need to refactor for online.