Dynamics CRM CI processes - solution "delta import" flow? - dynamics-crm

We’re having the following CI process in our CRM Dev environment:
We have common CRM environment which is used for customizing system. Plus, many development virtual machines (each of them has their own CRM instance installed) for individual developers. We store unpacked CRM solutions inside GIT repository, and we have automated process of packing them (with CRM solution packager), importing and publishing them on developer’s VMs.
Our problem at this moment is that importing single solution (containing all the customizations) packed with Solution Packager takes quite a long time. I was looking for some method to automatically create Dynamics 365 solution containing only “delta” changes and import it into development machines (unfortunately – I could not find any other than creating “delta solutions” directly inside the common CRM environment which does not help in case of our CI flow).
Unfortunately, the environment is CRM 2015 so using solution patching/upgrades is not an option.
Any thoughts? Ideas?

Related

Delete entities, processes, dashboard and reports from managed solutions

My requirement is to delete certain entities, processes, dashboards and reports from managed solutions on a CRM dynamics 365 system (TEST, UAT, PROD).
The changes must first be implemented in a (Development) CRM Dynamics 365 environment which has Unmanaged solutions.
This is the process we are following:
Developer customizes DEV solutions (unmanaged) and exports solutions as Managed solutions to TEST for QA review:
Unmanaged Solutions (DEV) --Export the Managed Solutions--> TEST CRM Dynamics 365 system
After QA has passed the TEST review:
Unmanaged Solutions (DEV) --Export the Managed Solutions--> UAT CRM Dynamics 365 system
After client has passed UAT review:
Unmanaged Solutions (DEV) --Export the Managed Solutions --> PROD CRM Dynamics 365 system
Note: There are multiple solutions in the environment. Example : DEV, TEST, UAT and Prod have Solution 1, Solution 2, Solution 3, Solution 4, Solution 5
How do I delete Entities, Entities (with dependencies), processes(Workflows), dashboards and reports in DEV from the unmanaged solutions so that it gets deleted from the managed solutions when I export the solutions into the above TEST, UAT and PROD CRM Dynamics 365 environments?
You can add and change existing configuration settings via a solution, but solutions cannot be used to delete components in a target (TEST, UAT, PROD) environment. If you have a managed solution in UAT or PROD, and you delete it, then it will delete all the elements from that environment.
this modules can not be delete from TEST, UAT and PROD because there are no suggested way to remove modules from a managed solution!
but you can do this with help from SQL (if your crm is on-permise and access to it), in table of solution by change managed field to zero you can export the solution, after this remove all unused componnents from solution xml file (in solution zip file) and import this to CRM again.
after this you can update solution normaly with exported file from DEV.
i do this way in past but I do not justify if you are not an expert in this field!
best regard.

Dynamics 365 Plugin Dev Tools

What tools are you using for CRM plugin development?
I used both "Dynamics 365 Developer Toolkit" and "Dynamics 365 Developer Extensions" previously. Unfortunately, The "Dynamics 365 Developer Toolkit" no longer works reliably for me in VS 2019 (yes, I followed the steps to update the vsix file). I looks like Jason Lattimer's has stopped making the "Dynamics 365 Developer Extensions".
Thanks!
Personally I use none, but rely on an Azure DevOps pipeline to deploy everything.
For client side development I heavily use Fiddler 4 with auto responder rules with a local webpack devserver. I am not sure how to improve this process much more.
For serverside Plugins I prefer using ILMerge Build Tasks (check nuget) and separate the IPlugin interface implementation from my code so I can easily write unit tests for that. I do not use testing libraries like EasyRepro or XrmFakeEasy. I don't think they add a big benefit and more or less negate one of the best effects of unit testing. Creating good testable code.
For plugin deployment I currently use spkl by Scott Durrow and it is working fine so far.
For generating early bound classes I use a custom .bat file that actually just calls the CrmSvcUtil.exe with a couple of extra .dll files that helps creating enums instead of optionsets.
I am not a huge fan of toolkits or templates that dictate how you have to write your stuff, because most of them embrace bad programming patterns. For example the XrmToolkit forces you to use a certain folder structure for your clientside scripts to not mess up your crm system and so on.
XrmToolkit is a commercial Dynamics 365/CDS development add-on that is actively maintained and supports Visual Studio 2019.
I have been relying on it for years to assist with generating proxy classes, registering and publishing plugins, publishing web resources on save, etc.
I have no affiliation with XrmToolkit.
You can use Microsoft.net framework with visual studio or visual studio code for implement dynamics 365 plugins and register that in plugin registration tools.
• Write a plugin
• Register a plugin

Deploying single files to Dynamics 365 while developing (e.g. web resources)

I am developing my first simple app in Dynamics 365, and one of my main pieces is a Web Resource that involves a lot of tweak-save-test-repeat workflow. Up to this point, every time I have made a tiny change to my web resource, I have been deploying it by opening the solution customization settings, navigating to my particular Web Resource, opening it, clicking "Text Editor" button, pasting in my updated Javascript code, and saving/publishing the changes.
This process is tedious, and I would like to find a way to automate it. I have been researching Dynamics 365 deployment tools, and I have found the CRM Package Deployer tool, but from what I can find it requires me to set up an entire deployment package (a giant XML file) comprising my entire customization, rather than the single file I am currently working on. Is there some way to automate deploying a SINGLE FILE with these (or other) tools? Or is it possible to deploy a package with ONLY A SINGLE FILE rather than re-deploying the entire solution's package each time I just change the one file?
Check out the open source alternative to the SDK's developer toolkit called Dynamics CRM & 365 Developer Extensions which you can install right into VS. It makes deployment of web resources a snap. Basically, you map individual JS/Html/Css/etc files to their corresponding web resources in CRM, and then once they are mapped all you have to do to deploy is right-click and choose Publish to CRM.
That tool is great, but if you really want to speed up your web resource development, you should use Fiddler. In Fiddler, turn on Autoresponder and setup a mapping for the file you are working on. When Fiddler sees a request that matches a mapping, it doesn't send the request to the server and instead returns the file from your hard drive. This technique offers a dramatic speed improvements for developing web resources. There's also a free tool for Fiddler called Imposter that makes the process easier. Search the web for "dynamics crm fiddler web resources" to read about this technique.
Another tool is the Web Resource Manager in the XrmToolBox It's free, a part of the XrmToolBox, and even handles pushing .map and .ts files you're doing TypeScript. It will warn you if someone else has updated the file since you have, and allows you to push, publish, or even add the files to a particular solution.
Another lightweight Visual Studio Add-in, which allows for deploying single (or multiple) web resource file to CRM without leaving Visual Studio is
Microsoft Dynamics CRM Web Resources Updater:
https://marketplace.visualstudio.com/items?itemName=MaratVDeykun.MicrosoftDynamicsCRMWebResourcesUpdater
There is also a commercial solution called XrmToolkit which can be set to automatically publish to CRM when you save the web resource file in Visual Studio:
https://www.xrmtoolkit.com/

Microsoft Dynamics CRM on-premises Migration to Microsoft Dynamics CRM Online

I want to migrate Microsoft Dynamics CRM on-premises 2015 to Microsoft Dynamics CRM Online 2016 without use service Scribe or another service.
the steps I want to use is:
1 : export a special solution called the Default Solution. The Default Solution contains all the components in CRM and import in CRM Online.
2 : Export Data to Excel for all entities in CRM on-premises and import in CRM Online.
3 : map users CRM with AD Office 365.
Is this correct steps?
Any another way to migrate or ideas ?
I think your steps are just right.
Just be advised, CRM Online has new functionality not included in CRM 2015 on-premise, you do need to check that features.
For two reasons:
Something might stop working
Something might continue working but there's a new functionality in CRM Online that already does it without coding.
And I would add another step, check that all of the workflows are Active, after adding the users .
If you're attempting to migrate a small amount of data, you can use the Data Migration tool in the SDK. It's better than the Excel imports.
I also have the same task to migrate crm on premise organization to crm online organization. I also follow the same steps. Here are some of the things I have learned so far,
Plugins implemented in full trust mode did not worked in online
environment because it only supports the sandbox mode for plugings.
It's better to use data migration tool such as MSCRM Toolkit. But
unable to maintain to ownership of the record.

Version Control for Visual Studio projects and MS Dynamics CRM (javascript)

I'm looking for Version Control that warns a use when opening a file if that file is being modified by another user. Is this possible?
We also use Microsoft Dynamics CRM 2011 and are looking to use some kind of version control for the javascript files. Does someone has experience with using Dynamics CRM and version control?
Thank you for any information!
You could implement this in Team Foundation Server (TFS) or other version control applications that support single checkout. You will need to either manually deploy the JScript or create an auto deployment process through the SDK. TFS will need to be setup for single checkout which will only allow a single user to checkout the files at a given time. This should disallow multiple people from making edits at once. It is a good idea to appoint a single person as the build master who will be in charge of merging changes into CRM.
EDIT: JScript is syntactically very close to JavaScript. Microsoft CRM uses and has always used JScript for its form scripting. JScript is basically Microsofts version of JavaScript. Differences are discussed # What's the difference between JavaScript and JScript? and http://en.wikipedia.org/wiki/JScript
Excerpt from Microsoft Dynamics CRM 2011 SDK:
Microsoft JScript libraries are Script (JScript) Web Resources that contain functions you can use to:
Handle form and field events.
Perform actions for controls configured in the Ribbon.
Support other functions.

Resources