CRM Dependency Hell – The dependent component WebResource does not exist.

“Dependency hell is a colloquial term for the frustration of some software users who have installed software packages which have dependencies on specific versions of other software packages.”
Source : Wikipedia

It’s often tempting to spin up a new trial online instance to do some custom development. The intention is normally to use it temporarily, then export your masterpiece as an unmanaged solution so you can import it into a target vanilla non-trial, more permanent instance.

With Dynamics 365, if you check all the boxes when setting up, CRM will  be provisioned with a lot of supplementary solutions as well on top of what you know as a vanilla CRM instance – think Project Service, Field Service and maybe a few extra dependent solutions thrown in there for luck too.

managedsolutions

Today, in a rush, I created a few entities, exported them as an unmanaged solution and tried to import to another Dynamics 365 instance (v8.2).

I encountered the following errors :

The dependent component WebResource (Id=msdyn_/Utils/head1.0.3.js) does not exist. Failure trying to associate it with SystemForm (Id=cb0f783b-73ac-44f4-9346-2ce077eb0381) as a dependency.
The dependent component WebResource (Id=msdyn_/Account/Account.Library.js) does not exist. Failure trying to associate it with SystemForm (Id=9e2f9031-fd52-4d1d-8d7c-3c4e8bf095c4) as a dependency.
The dependent component WebResource (Id=msdyn_/Libraries/require/require.js) does not exist. Failure trying to associate it with SystemForm (Id=9e2f9031-fd52-4d1d-8d7c-3c4e8bf095c4) as a dependency. Missing dependency lookup type = PrimaryNameLookup.

After much head scratching and looking at the exported customisations.xml file and error log file, I worked out what the problem was. The flow I took before this point was as follows:

– Created some custom entities.
– Added relationship between custom entities and the Account and Contact entities.
– Took a copy of the main account and contact form and customised them with links to my new entities.

At this point, I realised I shouldn’t have created these customisations on top of an already heavily customised Dynamics 365 instance, so I removed the managed solutions to get a ‘clean’ system. After working out, with some trial and error, the order I needed to remove these solutions, I did the export. It was at this point I got the above errors.

The problem was that the _copy_ of the Account and Contact main form still referenced the libraries used by the Field Service and Project Service managed solutions.

Solution : Go through each of the forms you have copied, look at form properties and remove the references to the now removed javascript libraries.

Time wasted : 60 mins. Hope this helps!

This entry was posted in Dynamics 365 and tagged , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s