I have encountered a problem importing a solution. The solution is one of ours, so we know what is in it. Importing it into a new organisation on the same server (CRM 365 On Premise v8.2.2.112) and the import fails.
I have found the problem, and it does seem to be a bug in dynamics. I'm just not sure where to report it or whether there is a patch available that resolves it.
When the import fails dynamics doesn't give any indication why. So I've had to turn on logging to find the cause.
The significant bit in the logs is:
>Exception when executing non-query: CREATE TABLE dbo.[active_safeandwellactivityBase] ([ActivityId] uniqueidentifier NOT NULL , ..., [active_staffcount_State] int NULL CONSTRAINT [DF_ActivityPointerBase_active_staffcount_State] DEFAULT 0,
... ) Exception: System.Data.SqlClient.SqlException (0x80131904): There is already an object named 'DF_ActivityPointerBase_active_staffcount_State' in the database.
I have omitted most of the fields for brevity.
Key thing to note is the SQL error: There is already an object named 'DF_ActivityPointerBase_active_staffcount_State' in the database.
Looking in the backend database behind the source solution the constraint is called:
DF_active_safeandwellactivityBase_active_staffcount
not
DF_ActivityPointerBase_active_staffcount_State
So my conclusion is that on import Dynamics isn't using the correct table/entity name when generating the name for the constraint.
The two other key parts to this puzzle are:
1. This is a rollup field.
2. There is one other entity in the solution that also has a field with the same name that is also a rollup field.
Our work-around has been to delete one of the fields, and recreate it with a new (globally unique) name, and this allows us to import.
Of course we shouldn't need to do this.
Is this a known bug? Anyone know when a published fix for it likely to be available?
*This post is locked for comments
I have the same question (0)