You may need to recreate views manually

By | January 8, 2009

Just for a thought.
If you are getting this error while trying to login the SageCRM and you have already done some preliminary steps to resolve this like Installing Latest Service Pack, Checking the database Connectivity and still you are facing the same problem then please check if the views “vGroupEntities” and “vGroupLookup” exists in your CRM database.

If these views are not present in your system, it causes this error to appear on screen while trying to log in sage CRM system. We need to create these views in database and for that please refer the group of SQL statements written below in .

SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO

CREATE VIEW vGroupEntities AS SELECT DISTINCT CuVi_Entity FROM Custom_Views LEFT JOIN Custom_Tables ON LOWER(CuVi_Entity) = LOWER(Bord_Name) WHERE CuVi_Options & 8 <> 0 AND LOWER(RTRIM(Bord_PrimaryTable)) = ‘y’ AND CuVi_Deleted IS NULL AND Bord_Deleted IS NULL

GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO

CREATE VIEW vGroupLookup AS SELECT CuVi_Entity, Custom_Captions.* from vGroupEntities LEFT JOIN Custom_Captions ON LOWER(CuVi_Entity) = LOWER(Capt_Code) WHERE LOWER(Capt_Family) = ‘tables’ AND Capt_Deleted IS NULL

GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO

To run these SQL commands on your system please follow the below mentioned steps.

1.Take the back up of CRM database in use at your end.
2.Go to SQL Query Analyzer.
3.Select the name of the CRM database
4.Execute the set of queries written in on your database.
5.Run “IISRESET” command.
6.Log in the sage CRM system.

HTH

Have a great day!