Dynamics 365 error messages point you in the right direction

“If your mind is empty, it is always ready for anything, it is open to everything. In the beginner’s mind there are many possibilities, but in the expert’s mind there are few. ”
Dynamics 365 error messages point you into the right direction but never give you the answer #HoskCodeWisdom

A developer was working on a Dynamics 365 form, it was generating an error saying the contex was null when you deleted a value from a field. The developer was investigating the problem by trying the different routes through the code by changing values on the form, sometimes it errored and other times it worked.

The developer felt frustrated because they had copied the code from another area and it worked there

The error was something like –  Unable to get property “getAttribute” of undefined or null reference 

The error was occurring in a function which passed the context into the function, read about the

The developer had copied, pasted and adjusted the code, he was focusing on comparing both and was so focused on fixing a problem he was ignoring the error message.

Copy, paste and adjust are not a replacement for thinking

When developers copy, paste and adjust code they miss out the learning and experience which comes from creating.  The time you improve as a developer is in the journey of creating code, fixing bugs.  There is no shortcut to putting in the hard work and learning and understanding.

If you bypass the learning part, you end up with something which works or does not work but you don’t understand why.

Dynamics 365 developers need to learn how the Microsoft Dynamics 365 SDK works, the better you understand how the CRM SDK works it is easier to diagnose problems.

I recommend to Always start with the Dynamics 365 SDK

Dynamics 365 errors point you in the right direction

To diagnose an error, you must look at the error with an empty mind #HoskCodeWisdom

Dynamics 365 error messages point you into the right direction but never give you the answer.  Often developers are so busy trying to solve the error they don’t stop to think what the error message is telling them.

In this example the developer forgot to pass the context into the function by ticking the checkbox on the OnChange trigger.

Don’t assume, know

Developers rush to solve bugs, need to slow down, consider what they know and what they are assuming is happen.  One definitive method of investigating a bug is to debug the code, identify and path the code is taking.

An example of bug investigation and how to approach fixing bugs

Sherlock Hosk and the case of the annoying bug

Approach bugs with an empty mind and don’t assume what is happening but prove what is happening.

For example –How to diagnose plugin errors, it has a good section on plugin error messages

Plugin Error Messages

The error messages Microsoft Dynamics CRM throws are a mixture of a confusing statement with a nugget of truth tucked inside.  To developers new to CRM development they are unhelpful messages.

As experience and knowledge of CRM development increases you will find they often point you in the right direction but need to build up a map of the CRM landscape, so you know where to go and check.

Enjoy your bugs

“enjoy your problems” ― Shunryu Suzuki

Developers should enjoy their bugs because their offer a path to increase knowledge and understanding #HoskCodeWisdom

Bugs and errors offer a trigger to learn more Dynamics 365 and programming, allowing you to learn why something isn’t working, you can invert the logic to understand why and how code should work.

The more time you invest in learning Dynamics 365 and development the better prepared you will be to identify the cause of problems and bugs.

Dynamics 365 development is understanding the limitations of the different customisations and services available to Dynamics 365, when and when not to use them.

An example was someone had done 1 months work creating a solution using Click Dimensions only to find the solution didn’t work because Click Dimensions couldnt use optionsets with over 50 options.

Choosing the most right customisation requires the developer to have an in-depth knowledge of Dynamics 365 and there are no shortcuts in becoming a good Dynamics 365 developer.

Other articles on Developer testing and errors

Advertisement

Hosk’s Top Dynamics 365 Articles of the week – 22nd February

Quotes

Mediocre people don’t like high-achievers and high-achievers don’t like mediocre people. Nick Saban

Success doesn’t come from pie-in-the-sky thinking. It’s the result of consciously doing something each day that will add to your overall excellence – Nick Saban

#HoskWisdom Favoutes this week

  • If you don’t learn to fail, you fail to learn #HoskWisdom
  • Developers dance to the speed of the project and the tune the project manager plays #HoskCodeWisdom
  • You know nothing Jon Snow, particularly about writing an auto number plugin in Dynamics 365 #HoskWisdom #HoskCodeWisdom
  • Good code comments itself, bad code is commented on by developers saying “What the f**k is this meant to do?” #HoskWisdom #HoskCodeWisdom
  • Less code is always more #HoskCodeWisdom
  • if your code is not readable it’s not maintainable #HoskCodeWisdom
  • I’m not a programmer, I’m a code delivery ninja #HoskCodeWisdom
  • The Hosk crushes bug totally, until they wish there were never created by me #HoskCodeWisdom
  • You are only as good as your last line of code #HoskCodeWisdom
  • The code in your source control is only as good as your weakest developer, unless you review it before it’s checked in #HoskCodeWisdom
  • Having a great idea is not enough, it needs hard work to turn the idea into something real #HoskWisdom
  • Get out of the comfort zone and move into the difficult, scary, no idea, uncomfortable zone. It’s better for you #HoskWisdom
  • The end is important to others, the journey is important to you #HoskWisdom
  • Ego lets you hear praise and ignores criticism, yet it is criticism which helps you improve #HoskWisdom
  • Fear will always exist, you control it or it controls you #HoskWisdom
  • Business rules and JavaScript are like electricity and water, they don’t mix well #HoskWisdom
  • I have been sent from the planet scrum to master you, now sprint you monkeys and no sitting in meetings #HoskWisdom

Want more #HoskWisdom then follow #HoskWisdom, #HoskCodeWisdom or follow @BenHosk

Articles of the week

awesome-1

I haven’t blogged for a month so there are a few articles of the week

Freeing Storage Space in Dynamics 365

Top 20 new features in Dynamics 365

Our organization is relocating – poor performance in Dublin data centre

Useful Dynamics 365 Downloads and Resources

Best of the rest

What I learnt from CRM Saturday Paddington

Microsoft releases new update for Social Engagement with Social Selling Assistant and more

Dynamics 365 new BPF architecture gotcha

Dynamics 365 Roadmap: Dynamics 365 Portals – Why You Need Them (and How to Try Them Out for Free) 

PowerApps Is A Game Changer

Recover Dynamics 365 portal fails

Leveraging Dynamics 365’s Common Data Model: An Architectural Discussion

State of Microsoft Dynamics 365 in 2017 – My Speaker Notes

Built-in Site Map Editor in Microsoft Dynamics 365 CRM 8.2

CRM Forms loading too slow: Check OUT this USEFUL list

OMG, do YOU use CRMojis?!

What You Need to Know about the Hustle and [Microsoft] Flow

Dynamics CRM Build Tools

CRM Saturday – XrmToolBox with Jonas Rapp

Microsoft Flow Can Extend Dynamics 365 more than you ever imagined

understanding your Microsoft Dynamics 365 Online Licensing Options

Integrate Power BI with Microsoft Dynamics 365

Programming/Scrum

C# Coding Conventions (C# Programming Guide)

10 golden rules for becoming a better programmer

Scaling Git (and some back story)

Continuing the evolution of the Microsoft MVP Award!

How to Measure Team Agility

Other

Bill Belichick on Super Bowl win: ‘We’re five weeks behind the other teams for 2017 season’

Reflecting On One Very, Very Strange Year At Uber

moving interview

Tribal Leadership: The Key To Building Great Teams

How to help kids fail

Bill Belichick’s Five Lessons For Innovators

Behavioural interview question

The Hosk – currently reading

The Hosk – just finished reading

Hosk’s CRM Developer Articles

A collection of my favourite CRM Developer articles I have written

CRM 2016 – Tips on passing the MB2-712 customization and config exam

All the CRM 2016 content to help you pass the exam

picture from here

Hosk’s Top Dynamics 365 Articles of the week – 27th January

Quotes

Quality is never an accident. It is always the result of intelligent effort. John Ruskin

#HoskWisdom Favoutes this week

  • The only limitation to what you can develop is the person developing it #HoskWisdom
  • The end always triggers a beginning #HoskWisdom
  • The pressure to make things complex will be great but you must keep it as simple as possible #HoskWisdom
  • Don’t waste words, make every one count #HoskWisdom
  • Don’t blame other people for your failures #HoskWisdom
  • Constantly talking about doing something is a barrier to doing something #HoskWisdom
  • It’s not just what you say but how you say it #HoskWisdom
  • if you tried your hardest you have nothing to regret #HoskWisdom
  • If something has no value, stop measuring it #HoskWisdom
  • Contributing to a successful team is better than achieving personal goals #HoskWisdom
  • Don’t over think and under act #HoskWisdom
  • The difficulty working with cowboy coders is dealing with the all shit that comes from their code and horses #HoskCodeWisdom
  • Increasing people on a project increases complexity of working, colloborating and communicating #HoskWisdom
  • When I see someone crying when their football team has lost, I want to tell them they need to take football more seriously #HoskWisdom
  • Respect silence, its thinking time #HoskWisdom
  • You cant solve all of life’s problems in a day but you can start with one of your own #HoskWisdom

Want more #HoskWisdom then follow #HoskWisdom or follow @BenHosk

Articles of the week

awesome-1

Using Portal Capabilities in Dynamics 365 (CRM)

Good run through portal capabilities, a detailed step by step guide

Best of the rest

The difficulties of scaled agile projects

Dynamics 365 SDK refreshed (11 January 2017)

10 Types of Dynamics 365 Project for IT Decision Makers

Getting around Delegated Admin Restrictions

Read Barcode Value Using Barcode Scanner Control in Dynamics 365

Step by Step Guide to Setting up your Dynamics 365 Portal Trial

Working with JSON objects in Dynamics CRM Plugins

Smart Buttons in the Ribbon Workbench

ALM for Microsoft Dynamics CRM 2011: CRM Solution Lifecycle Management

Everyday is a school day, yomi fields are for phonetic spelling

Programming/Scrum

5 Steps To Better Agile Retrospectives

Trello board on better retrospectives

It’s Not Just Standing Up: Patterns for Daily Standup Meetings

CannotMeasureProductivity

Other

Maker’s Schedule, Manager’s Schedule

Leadership That Gets Results

Servant leadership – the leadership theory of robert K. greenleaf

Effective Leadership Styles for Scrum Masters

Five books every ScrumMaster should read

Béla Guttmann: the mastermind who was more than just a curse

Stephen Hawking’s Productive Laziness

To Everyone Who Asks For ‘Just A Little’ Of Your Time: Here’s What It Costs To Say Yes

everything Ryan Holiday wrote in 2016

how to improve success rates in NFL drafts

David Foster Wallace: The String Theory

Great course for Scrum masters

How to build a great team and culture

The Hosk – currently reading

The Hosk – just finished reading

Hosk’s CRM Developer Articles

A collection of my favourite CRM Developer articles I have written

CRM 2016 – Tips on passing the MB2-712 customization and config exam

All the CRM 2013 content to help you pass the exam

#HoskCodeWisdom

When you are going through project hell, don’t stop to create the nice to have features #HoskCodeWisdom
Quick fixes are never quick and usually add technical debt, so take longer and do it properly #HoskCodeWisdom
If not managed properly, adding more people to a project can slow it down instead of speeding it up #HoskCodeWisdom
Don’t waste time adding functionality the user might like but hasn’t asked for #HoskCodeWisdom
Never optimize code unless you have to #HoskCodeWisdom
Scrum master should never have answers they should ask the team for answers #HoskCodeWisdom
Writing code is simple but writing simple code is the hardest thing you can code #HoskCodeWisdom
You need to love code with your heart and write code with your head if you want to be good programmer #HoskCodeWisdom
Creating bugs bothers good developers #HoskCodeWisdom
If you don’t find writing code fun, you will never be good developer #HoskCodeWisdom
If you don’t control technical debt, it controls you and the horse you rode in on #HoskCodeWisdom
You cannot be the master coding because some days the code wins and you lose #HoskCodeWisdom
When programmers think they are good, code will find a way for you to waste a whole day on something which doesn’t work #HoskCodeWisdom

Hosk’s Top Dynamics 365 Articles of the week – 13th January

Quotes

Positive thinking will let you use the ability which you have, and that is awesome. Zig Ziglar

#HoskWisdom Favoutes this week

  • If recruiters want to be treated with respect, they need to treat people with respect #HoskWisdom

Want more #HoskWisdom then follow #HoskWisdom or follow @BenHosk

Articles of the week

awesome-1

CRM Development hacks

great article with some great link to show all fields, enable all fields, get record guid and links to other pages such as advanced find/solutions.

Azure functions are a useful tool to learn about, to help move long running processes out from Dynamics 365

Best of the week

CRM for Dynamics 365 Top 10 New Features

Dynamics 365 – What does Include entity metadata do

Top 10 Microsoft Dynamics CRM/365 Tips from 2016

Dynamics 365 – Editable Grids

Hosk’s favourite Hosk Dynamic blog posts of 2016

Dynamics 365 – Editable Grids JavaScript Example

How to show signature accepted using Pen Control in Reports & HTML web resources – Dynamics CRM/365

The Top 10 Hosk Dynamics CRM blog posts for 2016

Learning Path authoring now available in Dynamics 365 (online)!

Business Rules – Dynamics 365

Will Dynamics 365 redesign Microsoft Dynamics CRM Online? 

XrmToolBox : Marketing List Manager Plugin

worth a read to refresh me about outer join functionality added to CRM

Replicate Microsoft Dynamics 365 (online) data to Microsoft Azure SQL Database

What’s new for developers: Microsoft Dynamics 365

Microsoft Dynamics 365 App for Field Service – A Walkthrough Tour

 Email Engagement in Dynamics 365 (CRM)

Dynamics 365 – You can’t add new forms to the appointment entity

Executing Dynamics 365 workflows from Microsoft Flow

CRM 2016 – ActivityParty and ActivityParty Lists

WHAT’S NEW IN THE DYNAMICS 365 DEVELOPER TOOLKIT

CRM 2016 – Tips on passing the MB2-712 customization and config exam

Programming

Write a Live Code Analyzer for Your API

Why “Agile” and especially Scrum are terrible

3 Strengths That Make Microsoft Corporation (MSFT) Stock A Buy Now

What are story points

too cool for school – lego kanban board

Other

 The Outrageous Cost of Skipping TDD & Code Reviews

 10 ways to better lead your agile team

Former Navy SEAL commanders explain why they still wake up at 4:30 a.m. — and why you should, too

Managing Your Boss

32 Little Rules I Follow To Live A Life That Feels Good Every Day

4 WAYS TO PUSH THROUGH ADVERSITY AND FAILURE WITHOUT EGO

The Hosk currently reading

The Hosk – just finished reading

Hosk’s CRM Developer Articles

A collection of my favourite CRM Developer articles I have written

CRM 2016 – Tips on passing the MB2-712 customization and config exam

All the CRM 2013 content to help you pass the exam

picture from here

Hosk’s favourite Hosk Dynamic blog posts of 2016

Start by doing what’s necessary; then do what’s possible; and suddenly you are doing the impossible. Francis of Assisi

You are always a student of Microsoft Dynamics 365 never it’s master #HoskWisdom

The minute you stop learning new Microsoft Dynamics 365 functionality, you are falling behind #HoskWisdom

I only published 63 blog posts, compared to 148 in 2015 and 220 in 2014, 455 in 2011!   Numbers don’t mean anything because it’s the quality of the content not the amount which is important.

Most of the popular blog posts were written in earlier years, this could be because these blog posts are linked to more blogs, the blog posts are better or more developers are not using the latest version of Dynamics CRM/365.  Below is a link to the most popular blog posts in 2016

The Top 10 Hosk Dynamics CRM blog posts for 2016

I thought I would share the most useful blog posts I wrote last year

  1. How to evaluate job offers for Microsoft Dynamics CRM roles 
  2. CRM 2016 – The importance of keeping the same guids between CRM instances 
  3. CRM 2016 – What’s the best way to organise solutions in Microsoft Dynamics CRM 
  4. CRM 2016 – Tips on passing the MB2-712 customization and config exam 
  5. CRM 2016 – Failed to generate excel
  6. Will Dynamics 365 redesign Microsoft Dynamics CRM Online? 
  7. In Praise of the Incomplete Dynamics 365 consultant 
  8. CRM 2016 – ActivityParty and ActivityParty Lists 
  9. What is the purpose of a CRM Practice 
  10. Extreme ownership – taking ownership for what you do 
  11. Study tips for the Scrum Certification 
  12. Looking at the ideas behind SCRUM
  13. Microsoft buys LinkedIn – What you need to know

Picture from here

Dynamics 365 – You can’t add new forms to the appointment entity

I can’t change the direction of the wind, but I can adjust my sails to always reach my destination. Jimmy Dean

Thinking is difficult, which is why most people avoid it #HoskWisdom

Just when you think you understand Dynamics 365 it bamboozles you making you think your browsers broken.  I was trying to add a form to the Appointment entity, only to find the new form button was missing.

I tried it in different browsers but the create form button on appointment was refusing to appear.  I asked another developer to add a new appointment form but the button was missing for them too.

Here is custom form with the create form button

no-create-form-1

Here is the Appointment entity and there is no create form button

no-create-form

Why?

As always we start with the CRM SDK but I couldn’t really find anything but I did find this tip of the day instead

Tip #561: Custom Activity Forms

It has this interesting information and opinion

There is no New button or Save As button that is available on the following activities:

  • Social Activity
  • Appointment
  • Recurring Appointment

This is mostly likely is due to the binding of the information on the form fields to the Outlook client for Appointments and to Microsoft Social Engagement for the Social Activity. Custom versions of the form would likely endanger the integrity of the sync.

 

This forum post discusses

Why can’t I create new forms for the Appointment activity?

I wasn’t sure the reason for not being able to add appointment forms but Outlook integration would seem the most logical.

I was thinking the problem could have been the old forms which Microsoft haven’t updated yet, discussed in this blog post

CRM 2016 – Why can’t I add a business rule to the Article entity

 

What can you do?

You can update the existing appointment form and this is a valid option but you should consider if you need to use the default appointment form and if a heavily customized appointment form will cause problems and maintenance overhead.

You could use business rules and Javascript to show/hide sections or fields on the appointment form.  Be careful with Outlook integration because new fields won’t appear on the Outlook appointment record (but will appear on the CRM appointment record).

The other option is to create a new entity.

If you are going to create a new entity it might be an activity,  read this blog post to understand what this means

Be careful making an entity an activity because it’s very difficult to add security to an activity because all activities live under the one security setting.

Creating an activity will mean it appears under activities, you must need this functionality.

Conclusion

Only being able to update the one appointment form stopped me in my tracks, what if we needed to use the appointment form in other scenarios, I would be difficult to support.

This made me pause to think if I needed the appointment functionality and when making entity changes it’s better to think longer and avoid a mistake because deleting things in Dynamics 365 is a slow painful business.  Much better to think hard and avoid creating entities incorrectly.

Dynamics 365 gives you the power to quickly and easily create entities but that doesn’t mean you should.

CRM Entity ownership – How do you decide?

Dynamics 365 – What does Include entity metadata do

 

Man’s greatness lies in his power of thought. ~ Blaise Pascal

As the functionality in Dynamics 365 grows I find there are more options and check boxes which I have no idea what they do, today I came across a check box called Include entity metadata

appointment-no-metadata-0

Dynamics 365 developers should not be comfortable using functionality you don’t fully understand because it could cause you problems later and sometimes once you enable a setting it cannot disabled, such as setting entities values

  • Business process flows
  • An entity being an activity
  • Connections
  • Queues
  • Activities

Entity ownership can cause problems when you need to apply security to organisation entity – CRM Entity ownershipHow do you decide?, you need to get the decision right first time or don’t make it organisational if you think there is a chance it will need security.

Dynamics professionals are craftsman (Are you a Dynamics Craftsman or a CRM developer?) their main tool is Microsoft Dynamics 365/CRM.  You must become a master of Dynamics 365 and understand the nuances, limitations and capabilities.

If you don’t understand certain functionality, work out how it works and the underlying logic, keep asking questions until you can explain it to someone else.

Dynamics CRM/365 developers you should use the SDK rather than Google and you should always start with SDK.

Metadata

Dynamics 365/CRM metadata has the potential to confuse people because it can prove a slippy subject for people to grasp and when explaining it you end up saying things like “it is data about data”.

To understand how metadata works in Dynamics CRM/365 read this article – CRM 2015 – Understanding CRM Metadata 

A quick explanation on field metadata such as (I am only going to list some of the more interesting fields available not all of them)

  • LogicalName
  • DisplayName
  • SchemaName
  • AttributeType
  • IsAuditEnabled
  • IsRenameable
  • IsManaged
  • IsPrimaryId

A field itself holds  a value but the metadata is

  • Display name
  • is it audited
  • is it a manged field

The metadata doesn’t affect the value of the field but it changes the way it interacts with Dynamics 365.

What is entity metadata

If there is a checkbox for entity metadata, we need to understand what metadata there is for an entity.

On the entity form in the solution, the entity metadata is all the check boxes like notes, activities, queues, access teams etc.  When this gets broken down in the solution packager to an xml file you can see all these check boxes have a field and a value.

entity-metadata

When you don’t select include metadata The entity name in the entity xml element

appointment-no-metadata

If you select to include metadata you get the metadata

<EntitySetName>appointments</EntitySetName>
<IsDuplicateCheckSupported>1</IsDuplicateCheckSupported>
<IsBusinessProcessEnabled>1</IsBusinessProcessEnabled>
<IsRequiredOffline>0</IsRequiredOffline>
<IsInteractionCentricEnabled>1</IsInteractionCentricEnabled>
<IsCollaboration>1</IsCollaboration>
<AutoRouteToOwnerQueue>0</AutoRouteToOwnerQueue>
<IsConnectionsEnabled>1</IsConnectionsEnabled>
<IsDocumentManagementEnabled>0</IsDocumentManagementEnabled>
<IsOneNoteIntegrationEnabled>0</IsOneNoteIntegrationEnabled>
<IsKnowledgeManagementEnabled>0</IsKnowledgeManagementEnabled>
<IsSLAEnabled>0</IsSLAEnabled>
<IsDocumentRecommendationsEnabled>0</IsDocumentRecommendationsEnabled>
<OwnershipTypeMask>UserOwned</OwnershipTypeMask>
<IsAuditEnabled>0</IsAuditEnabled>
<IsActivity>1</IsActivity>
<ActivityTypeMask>CommunicationActivity</ActivityTypeMask>
<IsActivityParty>0</IsActivityParty>
<IsReplicated>1</IsReplicated>
<IsReplicationUserFiltered>1</IsReplicationUserFiltered>
<IsMailMergeEnabled>0</IsMailMergeEnabled>
<IsVisibleInMobile>1</IsVisibleInMobile>
<IsVisibleInMobileClient>1</IsVisibleInMobileClient>
<IsReadOnlyInMobileClient>0</IsReadOnlyInMobileClient>
<IsOfflineInMobileClient>1</IsOfflineInMobileClient>
<DaysSinceRecordLastModified>10</DaysSinceRecordLastModified>
<MobileOfflineFilters>
&lt;fetch version=”1.0″ output-format=”xml-platform” mapping=”logical” distinct=”false”&gt;
&lt;entity name=”appointment”&gt;
&lt;filter type=”and”&gt;
&lt;condition attribute=”modifiedon” operator=”last-x-days” value=”10″/&gt;
&lt;/filter&gt;
&lt;/entity&gt;
&lt;/fetch&gt;
</MobileOfflineFilters>
<IsMapiGridEnabled>1</IsMapiGridEnabled>
<IsReadingPaneEnabled>1</IsReadingPaneEnabled>
<IsQuickCreateEnabled>0</IsQuickCreateEnabled>
<SyncToExternalSearchIndex>1</SyncToExternalSearchIndex>
<IntroducedVersion>5.0.0.0</IntroducedVersion>
<EnforceStateTransitions>0</EnforceStateTransitions>
<EntityHelpUrlEnabled>0</EntityHelpUrlEnabled>
<ChangeTrackingEnabled>1</ChangeTrackingEnabled>
<IsEnabledForExternalChannels>0</IsEnabledForExternalChannels>
<HasRelatedNotes>True</HasRelatedNotes>
</entity>

In the solution file you can also see what happens when you untick

<RootComponent type=”1″ schemaName=”appointment” behavior=”1″ />

not ticked

<RootComponent type=”1″ schemaName=”appointment” behavior=”2″ />

Why and the When?

This functionality and check box was added with the subcomponents functionality.  Before CRM 2016 you added the whole entity, forms, views and everything else to a solution file.  CRM 2016.

You can only use subcomponents if the environment you are importing your solutions to includes the metadata.

In the blog post CRM 2016What’s the best way to organise solutions in Microsoft Dynamics CRM I discuss the different ways you can organise solutions.

If you choose a base solution method, you might have solutions imported into development environments as managed (to stop dependencies being created for them).   You may then build on top of the base solution in separate environment and solution.  You could add a managed entity, bring in no existing subcomponents and only add new fields.  In this scenario you new solution wouldn’t need the entity metadata because it exists in the core solution.

Conclusion

It turned out to be obvious what was happening but it’s better to confirm you assumptions and don’t give them time to cause you problems.

Writing this post has helped me think through the process of building customisations on top of managed solutions

 

CRM 2016 – Release management, Solution packager and why you should automate your deployment

I have always found that plans are useless, but planning is indispensable.

–Dwight Eisenhower

I found this articles on Microsoft Dynamics CRM and the application life cycle, I thought I would share them.  These

Deployment best practices

The articles above got me thinking about the CRM deployments best practices but which focuses on manual deployments and the best practices involved with that.

Another consideration is organising your solutions – CRM 2016What’s the best way to organise solutions in Microsoft Dynamics CRM

make surec ustomizations are kept at a high standard

Here are a few bet practices to follow
  • ID on lookups
  • early binding
  • Unit tests
  • never change production
  • CRM Configuration mover
  • Automate where possible

Automate your deployments

When I wrote the article on deployment best practices I only worked on projects which deployed projects manually and I had no experience with the solution packager.

I believe automating the deployments would be the best practice because manual deployments are

  • Manual deployments are boring
  • Manual deployments take a lot of time
  • Manual deployments can go wrong due to use error
  • it‘s a waste of developer
  • More environments more time wasted

The question CRM developers should ask is why are most CRM projects not using the solution packager?, it‘s best practice, it saves time, fewer deployment mistakesso why isn’t it standard practice.

Companies and project managers don’t give time for the team to learn and setup the solution packager because it‘s time spent on infrastructure with no business value.  Setting up the solution packager for Dynamic CRM projects is short-term pain for long-term gain.

The solution packager allows you to commit your customisations into source control because it breaks down the customisations into xml files.

One of the reasons I moved to Capgemini is because they have a DevOps team for Dynamics CRM projects.  Capgemini focus on delivery high quality large difficult projects, to do this you need to think long-term, focus on keeping quality of customisations high, keep technical debt low and automate where you can.

Now I have worked on a project with DevOp, the solution packager, continuous integration I am of the opinion all Enterprise CRM projects should have this setup.

Having a dedicated DevOps team or someone who has learnt to use the solution packager and creating builds will help the process.  Building automated build environments takes experience and the job falls to a developer they will take time to get up to speed in the same

Benefits of the Solution Packager

The solution packager is a powerful tool which can automate importing solutions between environments but it has a number of other useful benefits.

Automated deployments

Importing solutions is a boring and time consuming which should be automated to not waste developers time, allowing developer to concentrate on creating customisations.

If you can automate a boring task then you should automate it #HoskWisdom

The solution packager enables scripted automated deployments and some other benefits

Track changes

The solution packager gives you control and visibility on what changed, who changed it, what it was for and when.  The solution packager shows CRM changes, including customisation change (form, fields, views) gives visibility of those changes.  This enables CRM developers to check in changes to tasks and stories

Data

The solution packager can be scripted and incorporated in builds using Visual studio Team Services (VSTS).  Automating the build processs allows data to be imported into different CRM environments (a step which is often missed or done incorrectly).  Automating data import keeps the guids the same between environments.  CRM 2016The importance of keeping the same guids between CRM instances

Solution Packager articles

Here is a collection of Solution packager articles if you want to learn more

Conclusion

The article started out with links to the ALM – CRM lifecycle but morphed into clarifying the purpose and benefits of using the solution packager to automate solution deployment.

The solution packager allows automated builds/continuous integration which can save time and reduce import errors.  The solution packager breaks down CRM customisation to XML files which can be checked into source control (VSTS/GIT) and linked to individual tasks and stories.

Solution packager isn’t easy to configure but the benefits are worth it, companies and projects should see it as an investment in quality, long-term benefits which pay dividends on large CRM projects.

 

Will Dynamics 365 redesign Microsoft Dynamics CRM Online?

Start where you are. Use what you have. Do what you can. Arthur Ashe

Your life will not get better if you don’t move from where you are #HoskWisdom

With the imminent release of Microsoft Dynamics 365 (Dynamics 365 is coming and why you need to be ready) Microsoft is making significant step forward.  I looked at my draft blog posts and found this blog and it seemed an interesting time to publish it.

Dynamics 365 gives Dynamics professionals a time to reflect and ponder the future and the past of Microsoft Dynamics CRM.  Microsoft is removing the faithful CRM from the product, it’s a distinctive move.

Dynamics CRM moves to the cloud, will Microsoft redesign the architecture of Dynamics 365 to a cloud solution and utilize Azure and scalability. Is the one database design creating a bottle neck in performance?

If evolution really works, how come mothers only have two hands? Milton Berle Microsoft Dynamics CRM has evolved at a frantic …

The post was inspired by a response to the blog post The rise of Microsoft Dynamics CRM and a response from Andrew

That’s a great summary. Have been on the CRM journey since being early adopter of 1.2 in the UK. I do wonder if Microsoft need to take a step back and consider the whole product as its rapidly becoming an unmanageable scattergun collection of products..

Fixing some of the really annoying, and in most cases very well established issues in the product that make users stare at you in that ‘are you serious’ way would help.

Bolting several varieties of UI together, new, old an positively ancient makes for a confusing collection of experiences. Lookups that require many mouse clicks to get to the entry you want, the fact you still can’t return a count of how many records you have due to how database, security and localisation conspire against you to kill performance – and sure everyone has some other feature they wish would get sorted.

Don’t get me wrong, overall it’s a great product but stapling on newly aquired functionality at a rate of knots isn’t sustainable.

CRM needs to evolve into a new platform – probably not called CRM as even its name is a distraction.

Take the good stuff, turn it into a cloud based platform then add a modern, mobile first, cross platform adaptive UI and allow us to add or remove stuff so you get the system you actually need minus clutter and bloat. If I am never going to use marketing, or finance entities, allow that.

CRM should then be just one of a number of Dynamics products that sits on the platform. If I need accounts let me add modules from a proper accounting solution, or elements of ERP, or an Event Management solution – all modular, extensible and integrated.

The other core feature that’s needed is inbuilt integration and Master Data capabilities. I should be able to define one instance of contact, address, and account and share across multiple applications. Single version of the truth.

It will be interesting to see how things evolve as it moves to an inevitable cloud only model – looking forwards to the journey..

Thanks for a great blog…

CRM Architecture

The CRM SDK architecture page is a great resource to understand the architecture of Dynamics CRM

this picture explains the architecture, showing the moving parts along with the order and flow of Microsoft Dynamics CRM.

How did the original CRM Artchitecture come about?

Microsoft Dynamics CRM is one product made of multiple Microsoft products knitted together.  The programmer in me thinks this is good design, splitting up the solution into logical parts.

  • CRM is made up of many separate parts
  • Active Directory
  • Microsoft SharePoint
  • Reporting Services
  • Microsoft SQL Server
  • Internet Information Services
  • Active Directory Federation Services – ADFS – for expose CRM to the web
  • Microsoft Exchange

The reason for using these separate parts is they are Microsoft products and it made sense to use existing products and delegate responsibility to products and service which specialize in.

When CRM was released cloud solutions were not popular, common or achievable (no Microsoft Data centres).  It made sense for Microsoft to use it‘s own products because it could then persuade people to buy more Microsoft products or integrate CRM with existing Microsoft products a customer already owned (Exchange, Active directory, etc)

CRM evolving

In the article The RISE OF CRM, Microsoft has upgraded the CRM front end making it look better.

The new forms is so they compatible with Microsoft mobile friendly functionality such as Business rules and Business Process flows.

Microsoft Dynamics CRM 2016 has new forms mixed in with old forms.  I learnt this when investigating why I couldn’t add a business rule to the article entity – Why can’t I add a business rule to the article entity and in this article – CRM 2016 – How to rename the default business rule

Architecture

There is a great comment in this article comparing Microsoft Dynamics CRM and Salesforce

Since its day one, Salesforce was designed as a cloud based application with design features optimized for a browser experience not a desktop program experience.

Microsoft created Windows-style drop down menus within its CRM tool and has modified the look and feel dramatically. This gives customers a common user experience across different Windows products and its web-based CRM tool.
The article discusses how products evolve and where you need to stop refactoring and start again.  Starting again and focusing effort on a better long-term strategy is where Dynamics 365 is at.  Creating Dynamics 365 using an app approach or Microsoft services structure will allow Microsoft to stop wasting time and money developing multiple products and instead develop shared services.
The POA (Principle object table) is a constant cause of Microsoft Dynamics erformance problems and I wonder if Microsoft started again would they design the database tables to force security privileges to use one table.   Recent security enhancements tried to work round this with Access teams adding security to teams instead of individual roles.

Where are we

Joel on Software’s article on why you should rewrite/refactor products Things You Should Never Do, Part I recommends you think before you recreate something because it’s easy to underestimated the complexity of the product.

Microsoft Dynamics CRM has a front end with a mixture of modernized forms and old CRM 2011 form style (5 years old).

The architecture wasn’t designed for the cloud.
CRM online can be painfully slow read this
Microsoft cloud solutions needs CRM solution architects to change the way they design solutions, plugins have a limit of two minutes, so you need to do these long running processes in an
When I attended on the Azure architecture training, it opened my mind to the fact as solution architects we biased by old designs.  There are lots of different databases in Azure which can be used in different scenarios.  hey mentioned Amazon shopping basket using a document storage database for it.
I wonder if the single database is a bottle neck for performance, too much table locking with relational databases
Will a common data model help resolve this problem – Powerapps common data model

Conclusion

The article raises questions on the architecture of Microsoft Dynamics CRM, most of them related to the technologies used to create Microsoft Dynamics CRM Online.  Will Dynamics 365 resolve any of these problems?
Will the promise of Dynamics 365 be realized by the performance and functionality of Dynamics 365.
Is Dynamics 365 a great rebranding or will it be a real game changer which tackles the problems Microsoft Dynamics has and creates an environment where integration is a priority.
Dynamics 365 brings enhanced functionality, cheaper prices and greater integration.  Is this the time Microsoft Dynamics makes a decisive move against Salesforce.

Dynamics 365 is coming and why you need to be ready

The Dynamics 365 winter is coming, so get your big coat on #HoskWisdom

The imminent release of Dynamics 365 brings forth a big change in the Dynamics landscape (we are losing CRM – what should I call my blog now!) the Dynamics CRM community is heading for a big change.  Change brings opportunities to those ready to take advantage.

This blog posts highlights interesting blog posts on Dynamics 365 and my views on why Dynamics 365 is a step in the right direction.

Change

Time and tide wait for no man and bugs and builds wait for no developer #HoskWisdom

Working with Microsoft Dynamics CRM has involved working with constant change and an evolving product, discussed in The rise of Microsoft Dynamics CRM.

The Dynamics CRM product has evolved at a rapid rate and Microsoft has tried to speed up change by purchasing products which can augment existing functionality in Microsoft Dynamics CRM.

Microsoft’s success with integrating external products and services has been hit and miss.  Some purchases looked doomed to failure at the start

  • Parature
  • MDM
  • Social Engagement (with persistence it might work but with a lack of demo’s available it hasn’t got much traction, experienced users or positive sentiment)

Microsoft slow integration with these products made it difficult to use the products with Microsoft Dynamics CRM.

Great article on MDM and Microsoft Adobe cloud – Dynamics 365 and the Adobe Marketing Cloud

The successful companies Microsoft integrated

  • FieldOne (now FieldServices)
  • ADX Portal

A couple of companies I think Microsoft should purchase are ClickDimensions and Resco.   Fantasy Sales Team is OK and after working with FieldOne (FieldOneMobile app thoughts, problems and solutions) purchasing products with existing integration with Dynamics CRM is a more successful strategy.  Fantasy Sales Team isn’t a failure but gamification is not a mainstream product and many question gamification – Is Gamification in a Microsoft Dynamics CRM a gimic?

This blog post summarizes the Dynamics 365 acquisitions

Dynamics 365 – Acquisitions that Made the Cut, or Didn’t

Will the expensive purchase of LinkedIn be successful

Microsoft buys LinkedIn – What you need to know

Microsoft’s development of Microsoft Dynamics CRM and purchasing products has made life more difficult and interesting whilst you struggle to keep up with the rate of change.  I admire Microsoft’s ambition and drive to improve Dynamics CRM at a rapid pace and close the gap with SalesForce.

Dynamics 365

Now we arrive at Dynamics 365 with Microsoft looking to create a new platform integrating CRM, ERP and field services.  A big move dropping CRM from the title and moving towards business applications and a more app/micro services architecture.

Some articles to get you up to speed with Dynamics 365

Dropping the CRM name is a good move because most of the projects I have worked on have used Dynamics CRM as a development framework to deliver XRM solution.

Why is Dynamics 365 important

Integration between Microsoft Dynamics products is painful, hopefully Dynamics 365 can help this pain go away #HoskWisdom

The integration between Microsoft products is painful, complicated and difficult.  Complexity is inherent in syncing records using different data models and functionality.

Customer expectations are a problem with customers expecting synchronising two Microsoft products is easy, the reality is you are syncing two different products created by separate teams with little thought to integration.

One of the fundamental problems trying to sync CRM and AX/NAV is the different data model used by CRM and AX.  AX tends to have more complex data model around quotes, products, orders and invoices and there is no easy way to sync them.  The only real solution is to to recreate the AX\NAV functionality in CRM which is difficult and costly.

Integrating CRM/AX is like trying to cast a double into an int (AX the double, CRM the int) and you will lose information

Integration using a tool or Azure service bus takes considerable development with little customer pleasing front end functionality.

CRM and ERP

Projects which need both ERP and CRM functionality need to answer this question

Do we need two different products or can we deliver the project using one?

Then

Is the cost of integrating ERP/CRM more than the cost of developing the functionality in either CRM  or ERP (NAV/AX).  The common problem Microsoft is tackling is having separate products under the Dynamics umbrella which share some functionality but different data models and functionality.

Microsoft found themselves in a difficult situation of having two products with with overlapping functionality but strengths in different areas. Should they develop the functionality in the separate products or  push users into buying separate products?   Microsoft provided no easy or cost effective way to integrate the products and they chose not to develop functionality held in the separate products.

Scrum has a concept of inspect and adapt, looking at the past and changing your process/products to use the feedback.  Microsoft has decided to create Dynamics 365 and use a shared data model and put integration at the heart of the solution.

Dynamics 365 is an integrated framework where CRM, ERP, FieldServices, sales, marketing can work in one integrated platform, Dynamics 365.

Dynamics 365 will allow Microsoft to invest in developing services to be used in Dynamics 365, develop once and use by Dynamics 365, instead of developer in either Microsoft Dynamics CRM or Dynamics NAV/AX

Advantage over Salesforce

Salesforce lead the CRM market and Microsoft Dynamics CRM creating a leading cloud solution, Microsoft created Dynamics CRM using it’s existing products (AD, SQL Server, IIS, Outlook, SSIS) and has slowly moved them to a cloud service.

Salesforce got in first and built up a big customer base whichI view in similar way to next generation console releases first (PS4 versus XBox One).  Dynamics 365 see’s Microsoft creating a service which can compete with Salesforce with these advantages

  • Dynamics 365 can help Microsoft to create real ISP for Microsoft, the ability to integrate CRM and ERP functionality together in one environment is a real selling point.
  • Microsoft Dynamics has LinkedIn integration coming
  • AI integration is improving

Microsoft is starting a price war with Salesforce on the 1st November

Microsoft will launch its price war with Salesforce on November 1

Interesting things to end

In the past I have followed twitter

  • #Dynamics2016
  • #msdyncrm
  • @msdyncrm

you can now follow

  • #Dynamics365
  • @MSFTDynamics365

Conclusion

The Dynamics community is a mixture of excitement and trepidation when Microsoft releases new Dynamics products or updates   Microsoft has a history of half releasing functionality (CRM 2013) and buying products and not integrating them.

The move towards Dynamics 365 is a logical restructuring of products to create a flexible framework to deliver business applications with the ability to add modules of functionality where needed.  Dynamics 365 is a cloud framework which moves towards an app architecture.

  • Dynamics 365 is a rename and re-branding to focus on business applications
  • Dynamics 365 should makes it easier to integrate AX and CRM functionality
  • Dynamics 365 looks like it will be cheaper than purchasing multiple products
  • Dynamics 365 will be the hub between many services and applications
  • Dynamics 365 is coming whether you are ready or not, so do yourself a favour and be re

Shark image from here