CRM JavaScript Conversion Strategies Summary

Over on my main company site, CRM Accelerators, I have concluded a series on strategies related to converting your JavaScript from Dynamics CRM 4.0 to 2011+.

Strategies

Here is the summary:

Webinar Recording

I also conducted a free webinar for MSDynamicsWorld recently and you may view that recording here:

http://msdynamicsworld.com/story/microsoft-dynamics-crm-javascript-upgrade-strategies-recorded-webcast

Other Resources

Finally, I have a page dedicated to the topic of upgrading from Dynamics CRM 4.0 to 2011+:

http://www.crmaccelerators.net/dynamics-crm-4-0-2011-upgrade-tips/

It contains links to all of my articles and tools, plus links to articles written by others that I thought would be beneficial.

Upcoming Class: Extending Dynamics CRM

Course Description:

If you are looking to get started with Dynamics CRM development, and are looking for an instructor-led, hands-on workshop, then let me introduce you to Extending Dynamics CRM.

In case you did not know, Microsoft decided to only offer the Extending Dynamics CRM course via eLearning, starting with Dynamics CRM 2013. eLearning, which is a self–study program, is great for many people, but I think students gain a tremendous amount of learning and understanding from having an instructor who works with Dynamics CRM development on a daily basis. This student-instructor interaction combined with the ability for the student to ask questions and obtain clarifications, makes this course all the more valuable.

Who:

This class is taught by Mitch Milam, nine–time Microsoft Most Valuable Professional for Dynamics CRM and an independent consultant specializing in Dynamics CRM architecture, development, and training.

What:

We have taken the topics normally covered by the official Microsoft Extending Dynamics course, and expanded their depth quite substantially. Instead of a three–day course, this is a five–day course with most of the extra content being the addition of a large number of hands–on labs. The information covered is relevant to both Dynamics CRM 2013 and 2015.

When:

Monday, March 2nd through Friday, March 6th.

Class starts at 8:00am CST and will last five or six hours per day, depending on the topic. Please budget the entire day so that you have time to complete the homework assignments.

Where:

This is an Internet-based workshop. Classroom time and discussions will be facilitated using GotoMeeting. Each student will be given their own virtual development environment for the duration of the course. This will allow for the completion of labs and homework without causing conflicts with the other students.

Cost:

$ 2,475 per student. Pay by February 18th and enjoy the early–bird discount of just $1,995.

Discounts are also available for two or more students.

Note: Due to the hands–on nature of this workshop, there is a limit of 12 students per class.

Additional Information:

For more detailed information and to see the entire course outline, visit the Extending Dynamics CRM page:

http://www.infinite-x.net/extending-dynamics-crm

Announcing early bird pricing for 21 Squared: CRM Administration

I am finally launching the first module in my 21 Squared self-paced training program for Dynamics CRM.

Dynamics CRM Administration (OnPremise)

Our first course is on Dynamics CRM Administration and will be available starting Monday, Feburary 9th.

I will be offering an early-bird discount to those individuals who sign-up early.

  • Normal Price: $149
  • Early-Bird Price: $99

Early-bird pricing will end on Saturday, February, 7th.

Simply complete the following form and we'll notify you the moment the release is available and include the code to give you your discount:

21 Squared: Dynamics CRM Administration Signup

A Look Inside:

Here is what you will be learning in this course:

  • Lesson 1. Create Your Administrative Toolbox
  • Lesson 2. Let’s Do a Little Housekeeping
  • Lesson 3. Error and Warning Messages
  • Lesson 4. Managing System Jobs
  • Lesson 5. Creating System Management Views
  • Lesson 6. System Job Management: Registry
  • Lesson 7. Automating System Job Cleanup
  • Lesson 8. User Management
  • Lesson 9. Email Management
  • Lesson 10. Email Management – Preventative Maintenance 
  • Lesson 11. Outlook Sync Table Cleanup
  • Lesson 12. Monitoring the Windows Event Log
  • Lesson 13. Platform Event Tracing Overview
  • Lesson 14. Enabling Event Tracing
  • Lesson 15. Troubleshooting Using Event Tracing
  • Lesson 16. Matching User Error Codes
  • Lesson 17. Troubleshooting Development Errors
  • Lesson 18. Workflow Best Practices
  • Lesson 19. CRM SQL System Jobs
  • Lesson 20. CRM Organization Settings Editor
  • Lesson 21. Creating a Management Dashboard

The time each lesson will take to complete will vary between 30 minutes and two hours, depending on the number of exercises to complete (some have none), and the amount of background material that you will need to cover.

Dynamics CRM 2015 Implementation Guide 7.0.1 (January 2015)

There is an update to the Implementation Guide available on Technet:

https://technet.microsoft.com/en-us/library/hh699811.aspx

  • At this point, this information is not available in the downloadable version, which you can find here:

Here is a list of the new and updated topics:

 

I’ll be covering the Monitoring Service in-depth in an upcoming article shortly.

The often overlooked Xamarin.forms scale property

Sometimes it is the simplest things that make me happy.  I was digging through some Xamarin.Forms code on Github when I noticed the use of the Scale property on a view and I thought to myself, “Does that do what I think it does?”

Sure enough, it does.  It will change the scale a view (control) to make it larger or smaller.  The default is 1.0, which is normal size.

I was facing a design issue, at least on iOS where I needed to use a Switch but the normal size made it really seem out of place:

image

I needed something a little more subtle.  After applying a Scale of  0.7, I ended up with this:

image

Which seems much more to size, given the circumstances of the control.

This is simulator work only at this point so I will really need to check it out on the real device to make sure that this scaling doesn’t cause usability issues.

Dynamics CRM: The error is not always what you see

One of my customers has had an issue with their CRM system since I upgraded them from Dynamics CRM 4.0 to 2011. Basically the System Settings page will not allow you to make changes.  I got the following JavaScript error:

<ScriptErrorDetails>
  <Message>Object doesn't support property or method 'down'</Message>
  <Line>426</Line>
  <URL>/tools/systemsettings/dialogs/systemsettings.aspx</URL>
  <PageURL>/tools/systemsettings/dialogs/systemsettings.aspx</PageURL>
  <Function>anonymousr:Objectdoesn'tsupportpropertyormethod'down'</Function>
  <FunctionRaw>TypeError: Object doesn't support property or method 'down'</FunctionRaw>
  <CallStack>
   <Function>anonymousr:Objectdoesn'tsupportpropertyormethod'down'</Function>
  </CallStack>
 </ScriptErrorDetails>

 

So this is an error on the CRM page itself and there is not a lot I can do about it.  I just figured it was a bug in the system.

I’ve put up with it because it was not a huge issue for me, and I really didn’t want to spend any quality time working on a support case. I always figured that it was something that would be fixed by an update rollup.

We are in the process of migrating to Dynamics CRM 2015. The issue persists and now I can no longer ignore it. I have to make changes to the system settings. This also means that it is not server-specific, but something about the CRM databases, since that is the only commonality since I have migrated this system from 2011 to 2013 to 2015.

After asking my fellow MVPs if they had ever seen such an error, and not getting confirmation, my friend Gustaf recommended turning on platform tracing to try and capture the error. I thought that was a really strange thing to do since the error was obviously a JavaScript problem.

Or was it???

So I turn on tracing and captured these errors:

  • Duplicate DisplayName found for lcid '9242' – 'Serbian (Latin, Serbia)'.
  • Duplicate DisplayName found for lcid '10266' – 'Serbian (Cyrillic, Serbia)'.

Which have absolutely, nothing, and I repeat, nothing to do with the problem.

But it did led me to this thread:

https://community.dynamics.com/crm/f/117/t/115766.aspx

Which led me to the real problem.  The Email Attachment size setting was incompatible with CRM 201x.

Someone, at some point had set it to 90,120.  It turns out that the maximum value for that field is 32,768.  Which you will see should you try and enter it by hand.  But, since this was an import, it was not checked.  I lowered the value to 32K and that solved the issue.

Recap

So here is a recap of my findings:

  • I was receiving a JavaScript error saving System Settings.
  • A Platform Traced point to duplicate configuration information.
  • Which led me to a Google search which produced an thread on the Dynamics Community site.
  • Which pointed me to the real error.
  • Which I played around with until I found the real problem and answer.

 

Or, as I like to say:

These are not the droids we are looking for. Move along; Move along.

SnapShot! 3.6 for Dynamics CRM released

SnapShot! 3.6 is now available. You can read more about it by visiting the SnapShot! product page.

You may also download a sample of the reports SnapShot! generates here.

 

What’s in this Release?

This release includes the following:

 

New Reports

The following new reports are available:

Entity Maps

Shows the source and target entities used by the Relationship Mapping process.

 

Attribute Maps

Shows the source and target entities and attributes (fields) used by the Relationship Mapping process.

 

Email Server Profiles

Lists information for the Email Servers configured in Dynamics CRM 2013 and 2015.

 

Mailboxes

Lists information for the Mailboxes configured in Dynamics CRM 2013 and 2015.

 

Custom Code Validation

The Dynamics CRM team at Microsoft released the Microsoft Dynamics CRM 2013 Custom Code Validation Tool to allow an organization to scan their JavaScript for issues that would either not work in different browsers or not work in Dynamics CRM 2013. The only drawback is that you could only review the output one web resource at a time.

I have taken the technique used by the Code Validation Tool and created a single report that shows all of the code issues for the entire organization.

 

New Features and Changes

The following features have been added or changed:

 

Automation Testing Matrix

JavaScript form events have been added to the Automation Testing Matrix report.

 

Open Folder Upon Completion

The functionality that would open the main Excel worksheet when the SnapShot! was complete has been replaced by an open folder operation, since the SnapShot! now generates so many different files and folders.

When this option is checked, it will open a Windows Explorer pointing to the folder created for that particular SnapShot! run.

 

New Folder and Report Structure

Due to the sheer amount of data being reported, I thought it was time that I split up the reports into more manageable segments.

Upcoming Free Webinar: Microsoft Dynamics CRM JavaScript Upgrade Strategies

I am holding a free webinar on Wednesday, January 20th via MSDynamicsWorld.Com:

 

Microsoft Dynamics CRM JavaScript Upgrade Strategies

http://msdynamicsworld.com/event/microsoft-dynamics-crm-javascript-upgrade-strategies

As you may know, Microsoft Dynamics CRM 2013 completely removed support for the Dynamics CRM 4.0 JavaScript object model. In fact, you will be unable to upgrade your organization to 2013 should 4.0 JavaScript be found.

In this session, we will be discussing the tools, techniques, and processes that will make your upgrade a success when moving your JavaScript from the Dynamics CRM 4.0 object model to the Dynamics CRM 201x object model.

Recommendation: Aspose Words and Cells

Several of my tools generate Microsoft Excel and Word documents as part of their output and for the longest time, I have used various open-source libraries to provide me with OpenDocumentXML functionality to generate real worksheets and documents, instead of just CSV and plain text files.

The only problem, especially with my SnapShot! documentation utility, was the amount of time it was taking to generate documents. SnapShot! generates a ton of worksheets and documents and I was growing increasing concerned with the generation time.

So I started looking around for alternatives and I kept coming back to a company celled Aspose.  I have been looking at their components for years and they have two products that I needed:

Aspose.Cells, for generating Microsoft Excel files and Aspose.Words for generating Microsoft Word documents.

Full disclosure: They offer a free copy of their component libraries to Microsoft MVPs so I took them up on their offer.

Let me just say that I am extremely impressed with both Cells and Words.  Extremely impressed.

Not only are their components easy to use, but they are blazingly fast.

Working on SnapShot!, I took me about about 1.5 hours to move both my worksheet generation and document generation from the OpenDocumentXML libraries to Cells and Words. And that is including reading their documentation to figure out how to do things like:

  • Automatically generate tables of content
  • Insert figures into a Word document
  • Word headers and footers
  • Turning on filtering on an Excel worksheet
  • Creating a workbook containing multiple worksheets
  • etc.

And did I mention fast?  Oh My Gosh! Fast.

Cells generates Excel worksheets like it is being paid by the row and it’s almost 5:00pm on Friday night.

The combination of Cells and Words sped up the document generation process between 40% and 50%, depending on the data being extracted from Dynamics CRM.

Again, I am very impressed with the quality and speed of this product.  I don’t give out recommendations often, but this is surely one of them.

And don’t forget that Cells and Words are just two components in their library. I can’t wait to get to use some of the others, like Aspose.Diagram, which generates Microsoft Visio diagrams. Think about that as you are creating your own documentation…

Anyway, that’s my recommendation for today.  Take a look if you have time and interest.

Developing applications for multiple versions of Dynamics CRM

As most of you know, I have a several add-on products for Dynamics CRM developers, administrators, and consultants.

They all share common user interface and application frameworks that I developed several years ago.

When I first started writing these tools all I had to worry about was Dynamics CRM 4.0, which was pretty easy. Then Dynamics CRM 2011 shipped, which made things a bit more difficult, but not impossible.

I just had to separate my internal components so that one section worked with CRM 4.0, and the other with CRM 2011.  Once I got the unified connection user interface component working correctly, everything else just fell into place and things were all warm and cozy.

CRM 4.0 and CRM 2011 communicate over very different means so even though you ask for a single set of information from the user, you must appropriately handle the connection specific to the platform on the back-end.  That took a little bit of work to make happen flawlessly every time.

Then Microsoft shipped Dynamics 2013.  Still not a big deal as I could use the CRM 2011 SDK assemblies to communicate without any issue.

Then Microsoft shipped Dynamics 2015 and I started thinking that maybe I need to re-examine my methodology.  And I am quite happy with my solution.

 

Requirements

I need to communicate with Dynamics CRM 2011, 2013, and 2015 while changing the smallest amount of code possible.

I also had to stay with .NET 4.0, since my user interface framework does not support .NET 4.5 and I was not in a position to write the entire UI for a handful of products.

 

Solution

The solution was to upgrade my SDK .NET assemblies to the Dynamics CRM 2013 level. 

That gave me access to all three platforms as long as I kept in mind that I could never ask for something that did not exist on a specific platform. 

Like SLAs or Entitlements from CRM 2011. Since those do not exist until 2013, it would throw an error.

 

Further Thoughts

For some reason, I had never tried connecting to a lower-version environment using the newest SDK assemblies.  Turns out that works just fine. (silly me for never asking the question till a month ago).

If my UI framework was .NET 4.5 compatible, I would have jumped up to the CRM 2015 assemblies because that is what they are written with.

The only side-effect to this is that I am stuck using Visual Studio 2010 because that same UI framework doesn’t work with Visual Studio 2013, my normal environment.

 

Conclusion

This process was quite eye-opening for me and just about as painless as it could be.  The Microsoft SDK team has done a huge amount of really great work that makes our jobs as developers, much less work than it could be, or even once was.

Let me know if you have had similar or even different experiences.

Sharing information and lessons learned with other developers

Sign up for our new KnowledgeBits service and get news, tips and tricks and more, delivered straight to your inbox.