Breaking news from around the world
Get the Bing + MSN extension
Choose your path Increase your proficiency with the Dynamics 365 applications that you already use and learn more about the apps that interest you. Up your game with a learning path tailored to today's Dynamics 365 masterminds and designed to prepare you for industry-recognized Microsoft certifications.
Visit Microsoft Learn
2019 release wave 2 Discover the latest updates and new features to Dynamics 365 planned through March 2020
Release overview guides and videos Release Plan | View virtual launch event
Ace your Dynamics 365 deployment with packaged services delivered by expert consultants. | Explore service offerings
Connect with the ISV success team on the latest roadmap, developer tool for AppSource certification, and ISV community engagements | ISV self-service portal
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance TechTalks | Customer Engagement TechTalks | Talent TechTalks | Upcoming TechTalks
I have written about Typescript before and I like the idea of Typescript so I want to promote it (and the work of Dave Berry). Below is my previous Typescript article
What is TypeScript and how does it work with CRM 2011/2013
It’s time for an update.
I watched CRM MVP Dave Berry’s excellent presentation which is hosted on the XRMVirtual user group.
XRMVirtual group have lots of great past presentations, which you can find if you go to All Events –> Past
Not only did XRMVirtual group put on the presentation they put a recording so you can watch it if you missed the presentation
David Berry Presents an Introduction to TypeScript
I also recommend the Dave Berry CRM MVP Q&A, it’s informative and funny
It’s a LiveRecording which means you can download it watch it offline later.
The XRMVirtual group is a free group to join, so you have nothing to lose
I found watching the video very useful and it helped my understanding of how typescript can be used and how it works.
I will explain how I think and understand what TypeScript is and why’s its useful, this might not be the same view as everyone else.
Wiki definition first
If whilst developing some code a developer tries to call a method with a different type e.g. they try to pass an int into a method expecting a string, the compiler throws an error.
Typescript adds in this compiler/developer time type checking to your code
The best way to explain the benefits of TypeScript is to compare it with CRM plugins using Early Bound.
Early bound code is creates a wrapper class round your entities. It includes all the fields in your entity. The benefits of of early bound classes
Early bound code means a lot of the potential errors in the CRM code are found at compile time instead of run time. The big advantage of this is most of the errors are found and fixed by the developer rather than being found by the end customer.
Microsoft have a good post – Use the early bound entity classes in code
The advantages to using early-bound entity classes is that all type references are checked at compile time. The compiled executable contains the code necessary to invoke the types’ properties, methods, and events. For more information, see Use the early-bound entity classes for create, update, and delete.
Typescript is a bit like Early bound plugin code it brings the errors and type checking to compile time.
Early bound code uses an entity file (a file generated with all the fields on each entity) and Typescript uses a definitions file.
My blog post
Dave Berry’s Presentation
What is typescript
There are quite a few detailed videos on youtube, search for typescript
Dave Berry has been doing some great work creating the definition files for CRM 2013, CRM 2015, CRM 2015 service pack 1.
Dave has put in a lot of effort to help promote Typescript and CRM and he has succeeded on getting the typescript definition file on DefinitelyTyped(a website which holds definition files for typescript)
Success! Xrm.Page/Utility definitions for #TypeScript on NuGet! Now a part of #DefinitelyTyped! Post coming soon!
This is a great achievement because Dave had to put in a lot of effort creating tests for definition and this has (I believe) been a one man band effort.
You might be wondering why getting the definition files in NuGet is important, it means CRM developers can easily download the latest definition files right into visual studio. This makes using typescript easier and will hopefully get more people trying typescript.
I have had a play with Typescript using Visual studio 2012. The one question I had was it didn’t fit in very well with CRM Developer toolkit, there wasn’t a good development flow. I was hoping Dave’s presentation would show me how this was done but unfortunately for me Dave uses Visual Studio 2013 (where Typescript is bundled in with Visual Studio) and he doesn’t use the CRM Developer toolkit.
Give it a go and leave me some comments of your adventures and links to blog posts about CRM and Typescript.
May the CRM force be with you
Business Applications communities