Wednesday, September 19, 2012

Solution import failed: Option set name doesn't match after Roll-up installation


When updating crm 2011 and installing crm 2011 roll-up's there is a chance that option set schema name are changed. it cannot be revereted back by uninstall. The only way is raising the ticket in microsoft.

Other way around is running the query below:

The below query will find the mismatch fields:

select distinct optionset.name as Current_Name, entity.name as Entity, attribute.Name as Attribute, 'new_' + lower(entity.name) + '_' + lower(attribute.name) as Fixed_Name from attribute, optionset, entity where attribute.optionsetid = optionset.optionsetid and entity.entityid = attribute.entityid and
optionset.name like 'new_%' and optionset.name NOT like '%_new_%' and attribute.name like '%new%' order by optionset.name

 To fix the mismatch:

update OptionSetView set name = 'new_' + LOWER(entity.name) + '_' + LOWER(attribute.name)
from AttributeView as attribute, EntityView as entity
where attribute.optionsetid = OptionSetView.optionsetid and entity.entityid = attribute.entityid and
OptionSetView.name like 'new_%' and OptionSetView.name NOT like '%_new_%' and attribute.Name like '%new%'

The above method is not suported by microsoft. Use it on our own risk.



No comments:

Post a Comment