Version Control for Visual Studio projects and MS Dynamics CRM (javascript) - visual-studio-2010

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.

Related

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.

Solutions in mscrm dynamics 2011

I have few question regarding solution:
How to lock the solution in the mscrm dynamics 2011 ?
How would we manage , if multiple developer are working in the similar solution?
What is solution resolution conflict , How do we resolve ?
There is no way to specifically lock the solution within Microsoft Dynamics CRM. We utilise TFS and Visual Studio to ensure that if a developer is working on Entity X, then they follow standard procedure to check in and check out the EntityX.OnLoad.js and EntityX.OnChange.js jscript files
Careful management of development tasks and who is working on what aspect of the solution. Where possible, we try to segregate entities to different developers at the beginning of the development phase. During the UAT/defect resolution phases, we make individual developers responsible for entire entities.
There is no automated way to resolve this, conflicts will have to be managed manually. It is very easy for a developer to overwrite somebody else's changes with a susequent publish of the solution. This is where it helps to use tools like TFS/VS.NET to manage the JScript. It doesn't, however, help with the form configurations.

Reporting in Team Foundation Server 2010

I was wanting to know (as the title suggests) if anyone had any information on reporting in TFS 2010.
I know there have to be options for this, but I can't seem to find any literature on where any built-in reports are, nor where I could build custom reports.
Also, I have it set up now where I get email notifications upon a completed build. However, the email notification is just that--a notification. It doesn't give me much information outside the basics (for instance, it doesn't say details on any errors or warnings). It does give me a link in the notification that directs me to a page that lists further detail about the build. But I was wondering if there was any more flexibility on these notifications.
The long and short of it is this: I'd like to know what kind of reporting options are available in TFS 2010, and I'd also like to know if there was a way I could possibly customize the email notifications to somehow contain the aforementioned reports, or at least link to said reports.
Reporting with TFS2010 is pretty rich. Any chance that you have it installed on your workstation? Reporting is not supported in the workstation version of TFS.
What's New for Reporting for Visual Studio ALM
The reports are hosted inside of SQL Server Reporting Services so you can create custom reports using a standard SSRS project in TFS. You can do a lot to manipulate the reports using just the report manager that is available from within the project portal.
The email is done using a XSL transform that is normally located in C:\Program Files\Microsoft Team Foundation Server 2010\Application Tier\TFSJobAgent\Transforms. You can manipulate any of these XSL files to create a new presentation of the data that is passed along from TFS. Of course you can create links to the reports by just including them in the XSL template.

Resources