Showing posts with label solutions. Show all posts
Showing posts with label solutions. Show all posts

Tuesday, October 10, 2017

License required to install and upgrade solutions

I noticed something strange when I logged into my MSDYN365 adminstration center today with a tenant administrator.
I reset one of my sandbox instances and deployed a new July Update (v9) version, and after it completed the deployment I went in to add the O365 Group solution.

When I opened up the solutions for the instance, I got the following error message:
You do not have a Dynamics 365 license for this Dynamics 365 instance. Please get a license at portal.office.com.

I thought that this was really weird, because as an administrator you're allowed to create, export and import solutions.
I went into the instance and created a new solution, added the account entity to it. Then, when I tried to export the solution I got the following error message:
You do not have permission to access these records. Contact your Microsoft Dynamics 365 administrator.

So I went into one of my v8.2 instances and did the same operations. No issues, able to create, export and import solutions without any errors.

Went back in to the admin center and tried to manage solutions for my v8.2 instances. Got the same error message and no option to install new or upgrade existing solutions.
Surely this must be a logical slip from Microsoft, so I'm going to try and get in touch with the support team about it.

To wrap up:

  • Administering solutions in the MSDYN365 Administration Center requires licensing as well as tenant or service administrator, for all instance versions.
  • Exporting and importing solutions inside an MSDYN365 instance works for v8.2
  • Exporting and importing solutions inside an MSDYN365 instance does not work for v9.0 (but creating and publishing does).
  • Creating new items is not allowed in any version
  • Publishing all customizations is allowed in all versions

Tuesday, March 14, 2017

Query Builder Error in MSDYN365

Query Build Error

The specified field does not exist in Microsoft Dynamics 365

I recently encountered this error in an on-premises environment one of my customers have. The issue occurs when I try to export the unmanaged solution, and it happened after I deleted a currency field from an entity that was included in the solution.
I managed to reproduce the issue in my online-environment, and I've sent a ticket to Microsoft so they might get it fixed soon, but I'll outline my findings in this blog post.

To reproduce this error, simply do the following (please do this in a dev-environment which you can break as you please, and back up all your solutions first):
  1. Create a new solution
  2. Add an existing entity to it
  3. Add an existing (or create a new) currency field
  4. Delete the currency field
  5. Try to export the solution (managed/unmanaged, happens with both)
You will probably be presented with this error message (unless it is fixed by the time you're reading this):


I tried to create each of the field types, it only fails on the currency type. I think this might have something to do with the secondary attribute which contains the currency base. In the back-end both option set and currency has two columns in the database, but only the currency field has a secondary field available in the UI.
If you mark both the currency and the currencybase field for deletion it will give you an error saying one attribute was not deleted, so that is not a viable workaround.
If you have created the entity in the solution you're working on then everything is OK, but if it's created in another solution (for example default solutions, or default entities) that are added as existing entities then this happens.

Workarounds (I prefer the first one, the other two are best for fresh installations and new solutions that haven't been through the normal ALM cycle yet):

  1. Restore a new dev environment (sandbox if you're online) from a backup, remove the field from the solution and export it as unmanaged. In the target dev-environment, make sure the field is deleted, then delete the solution (it's unmanaged, so the customizations will still be in place). Then import the newly exported solution which doesn't have the currency field included, it can now be exported as usual.
  2. Happens for unmanaged solutions, so you can just delete the solution and re-create it. Can be quite arduous, or near impossible, if you have included a lot of customization in the solution.
  3. Delete the entity and recreate it with the same id (only applicable for custom entities). Might be possible for simple entities without too much customization (will cause data loss). Can be re-created with the same id and schema and logical name so it doesn't break inheritance. I find this one most risky, so I would avoid it. Would work for solutions and entities that haven't been exported before.