Convert plugins to run in Dynamics 365 Online

apollo7
apollo7 used Ask the Experts™
on
Dynamics 2013, Dynamics 365

I am investigating plugins in a CRM 2013 and need to identify what needs to be changed so they can be migrated to Dynamics 365 Online.  

I am aware they need to run in the Sandbox and if there is any code that accesses the CRM database, it should be replaced to pull and push data using the SDK-provided OrganizationService.

I have written plugins but have not converted any to D365 online.  Where is the best place to start: open the plugin in Visual Studio; use the plugin registration tool?

Thanks
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Chinmay PatelChief Technology Ninja
Distinguished Expert 2018

Commented:
Hi apollo7,

Your best bet is to check the code for anything that is unsupported i.e. direct access to database and unsupported custom messages etc.

Additionally, avoid these 4 points
1. Only the HTTP and HTTPS protocols are allowed.
2. Access to localhost (loopback) is not permitted.
3. IP addresses cannot be used. You must use a named web address that requires DNS name resolution.
4. Anonymous authentication is supported and recommended. There is no provision for prompting the logged on user for credentials or saving those credentials.

Rest of the guidelines are pretty clear if you follow this article
https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/plugin-isolation-trusts-statistics

Regards,
Chinmay.

Author

Commented:
Chinmay

The plugins I need to evaluate are in the default solution on a CRM 2013 server.  How can I get access to them to review the code in Visual Studio?  I have tried exporting which did not work. I have not found a way to download or connect to the plugins.

Thanks
Chinmay PatelChief Technology Ninja
Distinguished Expert 2018

Commented:
Hi apollo7,

If you do not have the source code this is going to be an uphill battle.. Are these plugins in a managed solution or unmanaged solution?

I think whoever handed you the system must give you the source code of the Plugins otherwise you will end up redeveloping, re-registering them and anything with Plugins in its path will have to be reconfigured.

Regards,
Chinmay.
Learn Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

Author

Commented:
Thanks, I will find out what repository they are using for code.

Author

Commented:
Chinmay, I have Read access to their GitHub repo. Can you direct on next steps to determine which code that will not work in D365 Online?  Also, do I need a D365 Online instance to change the plugin to Isolation mode?

Thanks
Chinmay PatelChief Technology Ninja
Distinguished Expert 2018

Commented:
Hi apollo7,

Not at all. Just read the article I sent earlier. As a best practice guidelines I created couple of years back we create plugins targeting Sandbox only. We never register plugins without Sandbox. You will see that option when you try to register via Plugin Registration Tool. I do not think you will face any issues if the previous developer/s had a shard of knowledge on Dynamics. Plugins can be registered in Sandbox on OnPremise instance as well .

Without compiling and registering it is difficult to say which plugins will give you a problem. If you need to review them, I suggest we can connect on Live. If you can not take that route then the best bet is to compile them all and register.

Regards,
Chinmay.

Author

Commented:
I would like to connect on Live to review the plugins.  Let me know what I need to do to access Live and when you are available.

Thanks
Chinmay PatelChief Technology Ninja
Distinguished Expert 2018

Commented:
Hi apollo7,

I am already in a live session right now. I will ping you afterwards if it is ok with you.
To access Live, you can click on Products on top menu and then initiate a live session.

Regards,
Chinmay.

Author

Commented:
Thanks, that works for me.
Chinmay PatelChief Technology Ninja
Distinguished Expert 2018

Commented:
Hi apollo7,

I am available for couple of hours now.

Regards,
Chinmay.

Author

Commented:
Ok, going to Live
Chief Technology Ninja
Distinguished Expert 2018
Commented:
Hi apollo7,

As discussed, the fastest way to test if the Plugin is truly isolatable or not is to quickly try to register it with PRT. You don't even have to complete the process. PRT will report if there is an issue with the Plugin.

Regards,
Chinmay.

Author

Commented:
Great advice and question answered

Author

Commented:
Chinmay,

I have a follow up question.  using what you showed me, what is the process to deploy the plugin to Production?
Chinmay PatelChief Technology Ninja
Distinguished Expert 2018

Commented:
Using PRT push plug-ins to Dev. From Dev, based on your deployment strategy use managed or unmanaged solution deploy the plug-ins to Prod. You can also have Dev > Test > Integration/UAT > Prod.

Author

Commented:
So if the plugin tests successfully for isolation mode using  the PRT you can then add it to a solution and deploy it to Prod?  Can it be tested for functionality in Dev so it works when deployed to Prod?
Chinmay PatelChief Technology Ninja
Distinguished Expert 2018

Commented:
Of course it has to be tested. Without testing it should not move past Dev.

Author

Commented:
So does Dev need to mirror the Prod environment?  Besides building it on Dev, what other testing needs to be done before deploying to Prod?

Thanks
Chinmay PatelChief Technology Ninja
Distinguished Expert 2018

Commented:
It will depend on the clients requirements.
Chinmay PatelChief Technology Ninja
Distinguished Expert 2018

Commented:
Do you have any documentation on client's requirements?

Author

Commented:
The documentation is a high-level work order (convert reports to fetchxml, convert plugins for online, etc.) It does not provide any detail on development or testing.
Chinmay PatelChief Technology Ninja
Distinguished Expert 2018

Commented:
This is a bit of a grey area then. You should at least test plug-ins as they should at least function well.
Chinmay PatelChief Technology Ninja
Distinguished Expert 2018

Commented:
Dev should be an exact replica of Prod In terms of software and configuration.

Author

Commented:
So on Dev we should register the plug-in assembly,register a plug-in step for an event and test its execution by doing whatever is shown in the code.  For example, step through the code as a plugin and test that it creates an opportunity or whatever
Chinmay PatelChief Technology Ninja
Distinguished Expert 2018

Commented:

So on Dev we should register the plug-in assembly,register a plug-in step for an event and test its execution by doing whatever is shown in the code.  For example, step through the code as a plugin and test that it creates an opportunity or whatever

 - Correct

Does this reflect testing a online plugin https://carldesouza.com/deploying-plugin-across-different-dynamics-365-environments/
- Nopes. This blog describes the steps for the entire process from registration to moving plugins using Solutions. Testing a plugin is more of what you have written in your previous comment and it goes beyond that but it depends on lot of factors - time, cost, requirements etc.

PS:  Too many diverse questions in the thread, request you to put a new question when things are going in a different direction than the original question. Thanks :).

Regards,
Chinmay.

Author

Commented:
Thanks,  Chinmay.  Totally agree, this needs to be a new question.  I will add it starting from your last response.

Appreciate your help :)
Chinmay PatelChief Technology Ninja
Distinguished Expert 2018

Commented:
Any time :)

Author

Commented:
Thanks, the new question is out there.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial