Failed upgrade from 7.3 to 2017 SP3 – related to soloprofile and TerritoryProfiles [Fix]

1 minute read time.

Hi there!

We recently received a case where user was facing below shown errors while upgrading from 7.3 SP3.1 to 2017SP3

One error in the logs was related to 'Solo'. 'Solo' was a feature that was discontinued in Sage CRM 7.2.
Other errors in the log indicated that the problem is on the Territory profile table, with the TPRO_ProfileID
You will need to check the IDs of the table and check that the correct IDs are referenced on the TerritoryPermissions table. If there are not then the foreign key linking to the TerritoryPermissions needs to be amended so that ever ID matches a valid Territory profile.
The issue is caused by an entry on TerritoryPermissions, where the UsrTProfileId did not match a TPro_ProfileID on TerritoryProfiles.


These SQL queries fixed the errors encountered:

delete from Custom_Screens where SeaP_SearchBoxName like '%SoloProfileFilterBox%' or
SeaP_SearchBoxName like '%SoloProfileNewEntryBox%'

delete from Custom_Lists where GriP_GridName like '%UserSoloList%'

delete from Custom_Tabs where Tabs_Action like '%soloprofileedit%'
or Tabs_Action like '%solouserslist%'
or Tabs_Bitmap like '%soloconfig.gif%'
or Tabs_Bitmap like '%menubut_solo.gif%'
or Tabs_Caption like '%Solo%'
or Tabs_Entity like '%solofilteradmintabs%'

delete from Custom_SysParams where Parm_Name like '%SoloPublisherIdentityRange%' or
Parm_Name like '%SoloSubscriberIdentityRange%' or
Parm_Name like '%SoloThreshold%' or
Parm_Name like '%SoloSubExpiry%' or
Parm_Name like '%SoloConflictExpiry%' or
Parm_Name like '%SoloOptimiseSub%' or

Parm_Name like '%SoloMaxMerge%' or
Parm_Name like '%SoloMaxDynamicSnapshots%' or
Parm_Name like '%SoloDataFiltering%' or
Parm_Name like '%SoloSnapShotShare%' or
Parm_Name like '%SoloUserOwnProfile%' or
Parm_Name like '%SoloCheckRowGuids%' or
Parm_Name like '%SoloPublishWithCE%' or
Parm_Name like '%SoloPublishIndivs%' or
Parm_Name like '%SoloLogging%' or
Parm_Name like '%SoloRequiresIIS%' or
Parm_Name like '%SoloClientKey%' or

Parm_Name like '%SoloClientAdobeConverterExe%' or
Parm_Name like '%SoloClientAdobeConverterParams%'

delete from Custom_ScreenObjects where CObj_EntityName like '%SoloProfile%' or
CObj_Name like '%SoloFilterAdminTabs%' or
CObj_Name like '%SoloProfileFilterBox%' or
CObj_Name like '%SoloProfileNewEntryBox%' or
CObj_Name like '%UserSoloList%'

delete from Custom_Edits where ColP_Entity like '%SoloProfile%'
or ColP_Entity like '%SoloProfileOption%'

delete from Custom_Tables where Bord_Caption like '%SoloProfile%'
or Bord_Caption like '%SoloProfileOption%'

drop table SoloProfile
drop table SoloProfileOption


DELETE FROM TerritoryPermissions WHERE UsrT_ProfileId NOT IN ( SELECT TPro_ProfileID FROM TerritoryProfiles)

NOTE: Please keep a backup of the database with you before running the above mentioned script.


Hope this helps!

Kind Regards,
Seema