I thought I would update the process to make sure it still worked. I write better blogs than Hosk of 2012, so I will be able to follow this blog easier in the future.
What does this message mean?
This message is warning the user they have an email with the status Pending Send.
So for some reason you have created an email message, tried to send it but it never got sent and is stuck in pending
How do I find these pesky pending emails?
The way to find the messages is to do an advanced find and search for email messages where you are the owner and the status is Pending Send
Should return some pending emails
Now what?
To get rid of the message you can delete the pending email messages. This can happen in a Dev environment where you don’t have an email router or Outlook addin running, it means you have tried to send an email but CRM doesn’t have any method to send the email (CRM doesn’t have any inbuilt email capability it delegates all Email sending to Outlook addin, email router or service side sync).
There also a registry key you can modify called DisablePendingEmailReminder
Remember this will stop the pending email warning for all organisations deployed on the CRM server.
If you are in a production environment you need to find out why emails are not being sent, is it because the email router has stopped working or a the Outlook plugin has stopped working/disabled.
Sometimes it can be due to the service account used in the email router has either been deleted/disabled or the password has changed.
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
TypeScript is designed for development of large applications and transcompiles to JavaScript.[5]As TypeScript is a superset of JavaScript, any existing JavaScript programs are also valid TypeScript programs.
Hosk description
Typescript works with Javascript and converts the typescript file into a javascript file.
What this means is you write your Typescript file and when you press compile it creates a plain Javascript version of your typescript file. The end result is you end up with Javascript code, which is great because you can deploy this into Dynamics CRM.
Interesting why use Typescript?
Javascript is a dynamic language and .NET is strongly typed language. What this means is when we have variables/objects/interfaces in .NET we write methods we define what variables/objects/templates should be passed.
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
Hmmm I think I understand but I’m not convinced
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
No typos
no type errors
easy to read and understand code
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.
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.
Typescript creates pure JavaScript files so the end result is the same as if you wrote JavaScript.
The video has a great quote, it’s preparing developers for what the future of Javascript will look like.
There are quite a few detailed videos on youtube, search for typescript
TypeScript available on NuGet
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.
Hosk experience with 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.
I could easily create the TypeScript project and create the Javascript but it had to be in a separate project to my CRM Developer toolkit project, which made it a bit clunky. If anyone has a good solution to this problem I would be interested
I’m at the stage where I need to do to use TypeScript more before I use the Javascript in a CRM project. I also need to change my mindset from writing quick non OO Javascript and moving to writing more structured Javascript.
I’m not entirely sure how this fits in with a lot of the validation Javascript which is written for CRM projects but I think this is because I haven’t used Typescript much yet.
There is a little downside to using Typescript, except learning to write Typescript because the end result will be a pure Javascript file.
The benefits are strongly typed Javascript, this should capture lots of errors in compile time and create more readable code which should be well designed like server side code. The advantage of well designed code is it will be easier to understand, maintain, debug and extend. Basically the benefits lists in this post – Why your CRM code and customizations should be simple
Give it a go and leave me some comments of your adventures and links to blog posts about CRM and Typescript.