Recently while trying to import the solution we got the below error.
Below was the outcome of our analysis
- The column or the field referred to in the error message was not available in the CRM application i.e. customizations – default solution was not having this attribute.
- The column was only available in the base table of the entity.
- The column was not available in the filtered view of that entity.
- The column was not available in the MetadataSchema.Attribute table.
- We had around 50 such columns in the base table of the entity.
In short, the field was only available in the base table and wasn’t available anywhere else, which could have been the result of the solution being deleted at some point in time, followed by the wrong restoration of the table (i.e. unsupported change to the database).
We raised the Microsoft Support for the same, and the way we resolved the issue was by dropping/deleting those columns from the base table, followed by running the solution import which went successful this time. (fortunately the fields were all blank – null or default value)
ALTER TABLE “table_name” DROP “column_name”;
We can also get this error if we have a field with same schema name as source field created in the target environment (created manually / directly there). In this case also either we can remove the field from the source environment’s solution file or we can delete the field from the target environment.
Hope it helps..