Deleted Opportunity List

HI All

Hope anybody can help, Running Sage CRM 7.2d

The Opportunity list was deleted by accident

When I go to opportunities there is just a blank Screen

When trying to recreate the views in Admin-> Customization Now When I add items to the list & Save

I get this sql error

An unexpected event has occurred: SQL Code: 515
SQL Code: 3621
Exception: UnexpectedEvent

In the SQL log file there I see this error

1748 2776 1 execsql,time,sql,errormsg 16 INSERT INTO Custom_ScreenObjects(cobj_customcontent,cobj_type,cobj_entityname,cobj_name,cobj_CreatedBy,cobj_CreatedDate,cobj_UpdatedBy,cobj_UpdatedDate,cobj_TimeStamp,cobj_Component) VALUES (NULL,N'List',N'Opportunity',N'OpportunityList',27,'20140717 15:46:27',27,'20140717 15:46:27','20140717 15:46:27',N'Changed')
Cannot insert the value NULL into column 'CObj_CustomTableIDFK', table 'CRM.dbo.Custom_ScreenObjects'; column does not allow nulls. INSERT fails

Is there any way I can run inset into SQL query to put back fields that where deleted?

Any help will be much appreciated

  • 0

    Thanks ImmenseServe

    I tried to run query but get this error

    Msg 544, Level 16, State 1, Line 1

    Cannot insert explicit value for identity column in table 'Custom_ScreenObjects' when IDENTITY_INSERT is set to OFF.

  • 0

    I ran this

    SET IDENTITY_INSERT Custom_ScreenObjects ON

    INSERT INTO Custom_ScreenObjects

    (CObj_TableId,CObj_Name,CObj_Type,CObj_EntityName,CObj_AllowDelete,CObj_CreatedBy,CObj_CreatedDate,CObj_UpdatedBy,CObj_UpdatedDate,CObj_TimeStamp,CObj_TargetTable,CObj_CustomTableIDFK)

    VALUES

    (233,'OpportunityList','List','Opportunity','Y',-1,getdate(),-1,getdate(),getdate(),'vlistopportunity',10)

    & updated the row

    Thanks Allot going to test now

  • 0

    Hi Coenienaude,

    As you have unfortunately deleted Opportunity List, you need to create same List again but this can not achieved through CRM. For this you need to create "OpportunityList" record in "Custom_ScreenObjects" table which was previously there in database.

    This is not recommended to execute any system related query through database but as you have deleted standard list you have to follow below steps:

    1. Take the backup of your CRM database.

    2. Open your database and execute below query:

    INSERT INTO Custom_ScreenObjects

    (CObj_TableId,CObj_Name,CObj_Type,CObj_EntityName,CObj_AllowDelete,CObj_CreatedBy,CObj_CreatedDate,CObj_UpdatedBy,CObj_UpdatedDate,CObj_TimeStamp,CObj_TargetTable,CObj_CustomTableIDFK)

    VALUES

    (233,'OpportunityList','List','Opportunity','Y',-1,getdate(),-1,getdate(),getdate(),'vlistopportunity',10)

    3. Login to CRM and do Metadata Refresh.

    4. Go to Opportunity List and add all columns which was previously there and then save the List.

    Regards