Error retrieving record. This record may be deleted or you may not be authorized to view it.

Can you paste the code that is being shown when you run a repair and rebuild?

Hi Andy,

thanks for picking this up so fast :slight_smile:

/* Table : aod_indexevent */
/*COLUMNS*/
/*MISMATCH WITH DATABASE - success -  ROW [name] => 'success'  [type] => 'bit'  [len] => '1'  [default] => '0'  */
/* VARDEF - success -  ROW[required] => ''  [name] => 'success'  [vname] => 'LBL_SUCCESS'  [type] => 'bit'  [massupdate] => '0'  [default] => '0'  [no_default] => ''  [comments] => ''  [help] => ''  [importable] => 'true'  [duplicate_merge] => 'disabled'  [duplicate_merge_dom_value] => '0'  [audited] => ''  [reportable] => '1'  [unified_search] => ''  [merge_filter] => 'disabled'  [len] => '255'  [size] => '20'  [dbType] => 'bool'  */
 ALTER TABLE aod_indexevent DROP CONSTRAINT DF__aod_index__succe__5708E33C ALTER TABLE aod_indexevent ALTER COLUMN success bit NULL ;
 ALTER TABLE aod_indexevent ADD   DEFAULT '0' FOR success ;
/* INDEXES */
/* Table : jjwg_maps */
/*COLUMNS*/
/*MISMATCH WITH DATABASE - distance -  ROW [name] => 'distance'  [type] => 'real'  [len] => '4'  */
/* VARDEF - distance -  ROW[required] => ''  [name] => 'distance'  [vname] => 'LBL_DISTANCE'  [type] => 'float'  [massupdate] => '0'  [comments] => ''  [help] => 'Distance'  [importable] => 'true'  [duplicate_merge] => 'disabled'  [duplicate_merge_dom_value] => '0'  [audited] => '1'  [reportable] => '1'  [len] => '9,4'  [size] => '20'  [precision] => '4'  [dbType] => 'float'  [default] => ''  */
 ALTER TABLE jjwg_maps ALTER COLUMN distance float(9) NULL ;
 ;
/* INDEXES */
/* Table : jjwg_markers */
/*COLUMNS*/
/*MISMATCH WITH DATABASE - jjwg_maps_lat -  ROW [name] => 'jjwg_maps_lat'  [type] => 'real'  [len] => '4'  [default] => '0.00000000'  */
/* VARDEF - jjwg_maps_lat -  ROW[required] => ''  [name] => 'jjwg_maps_lat'  [vname] => 'LBL_JJWG_MAPS_LAT'  [type] => 'float'  [massupdate] => '0'  [default] => '0.00000000'  [comments] => ''  [help] => 'Latitude'  [importable] => 'true'  [duplicate_merge] => 'disabled'  [duplicate_merge_dom_value] => '0'  [audited] => ''  [reportable] => '1'  [len] => '10,8'  [size] => '20'  [precision] => '8'  [dbType] => 'float'  */
 ALTER TABLE jjwg_markers DROP CONSTRAINT DF__jjwg_mark__jjwg___57FD0775 ALTER TABLE jjwg_markers ALTER COLUMN jjwg_maps_lat float(10) NULL ;
 ALTER TABLE jjwg_markers ADD   DEFAULT '0.00000000' FOR jjwg_maps_lat ;
/*MISMATCH WITH DATABASE - jjwg_maps_lng -  ROW [name] => 'jjwg_maps_lng'  [type] => 'real'  [len] => '4'  [default] => '0.00000000'  */
/* VARDEF - jjwg_maps_lng -  ROW[required] => ''  [name] => 'jjwg_maps_lng'  [vname] => 'LBL_JJWG_MAPS_LNG'  [type] => 'float'  [massupdate] => '0'  [default] => '0.00000000'  [comments] => ''  [help] => 'Longitude'  [importable] => 'true'  [duplicate_merge] => 'disabled'  [duplicate_merge_dom_value] => '0'  [audited] => ''  [reportable] => '1'  [len] => '11,8'  [size] => '20'  [precision] => '8'  [dbType] => 'float'  */
 ALTER TABLE jjwg_markers DROP CONSTRAINT DF__jjwg_mark__jjwg___58F12BAE ALTER TABLE jjwg_markers ALTER COLUMN jjwg_maps_lng float(11) NULL ;
 ALTER TABLE jjwg_markers ADD   DEFAULT '0.00000000' FOR jjwg_maps_lng ;
/* INDEXES */
/* Table : jjwg_address_cache */
/*COLUMNS*/
/*MISMATCH WITH DATABASE - lat -  ROW [name] => 'lat'  [type] => 'real'  [len] => '4'  */
/* VARDEF - lat -  ROW[required] => ''  [name] => 'lat'  [vname] => 'LBL_LAT'  [type] => 'float'  [massupdate] => '0'  [comments] => ''  [help] => 'Latitude'  [importable] => 'true'  [duplicate_merge] => 'disabled'  [duplicate_merge_dom_value] => '0'  [audited] => ''  [reportable] => '1'  [len] => '10,8'  [size] => '20'  [precision] => '8'  [dbType] => 'float'  [default] => ''  */
 ALTER TABLE jjwg_address_cache ALTER COLUMN lat float(10) NULL ;
 ;
/*MISMATCH WITH DATABASE - lng -  ROW [name] => 'lng'  [type] => 'real'  [len] => '4'  */
/* VARDEF - lng -  ROW[required] => ''  [name] => 'lng'  [vname] => 'LBL_LNG'  [type] => 'float'  [massupdate] => '0'  [comments] => ''  [help] => 'Longitude'  [importable] => 'true'  [duplicate_merge] => 'disabled'  [duplicate_merge_dom_value] => '0'  [audited] => ''  [reportable] => '1'  [len] => '11,8'  [size] => '20'  [precision] => '8'  [dbType] => 'float'  [default] => ''  */
 ALTER TABLE jjwg_address_cache ALTER COLUMN lng float(11) NULL ;
 ;
/* INDEXES */

Also Look in your sugar error log and see if there are any database errors in their. If there are db errors it should show which line to delete from those querys before executing them.

Hi Andy,

I set the logging level to debug, so apologies if there are a few lines.

Created new log.
Ran the quick repair and rebuild to generate the script (but did not execute).
Apologies, I’m not exactly sure what I should be looking for, so I’ve attached the whole log.

If you want me to do the same with executing let me know.

Did you not get any errors when it was just set to fatal? usually database errors are fatal. Its definatly something to do with the indexes. There may be a problem with altering more than one index at a time on mssql server so you could try deleteing all the lines except 1 from the rebuld querys and try executing them one at a time.

I set the logging level to fatal, re-ran the quick repair, and the log is blank - nothing recorded.

Try as I said above:

There may be a problem with altering more than one index at a time on mssql server so you could try deleteing all the lines except 1 from the rebuld querys and try executing them one at a time.

Just run one query at a time until you find the one thats causing the problem.

Used SQL Management Studio, copied and pasted the SQL statements in and executed individually - each one completed successfully - no error messages. Tried executing from the Web GUI and this time it has recorded the following error:

05/16/14 06:58:38 [2732][1][FATAL] Executing repair query: Query Failed:ALTER TABLE aod_indexevent DROP CONSTRAINT DF__aod_index__succe__5708E33C ALTER TABLE aod_indexevent ALTER COLUMN success bit NULL::: [Microsoft][SQL Server Native Client 10.0][SQL Server]'DF__aod_index__succe__5708E33C' is not a constraint. [Microsoft][SQL Server Native Client 10.0][SQL Server]Could not drop constraint. See previous errors.

I would just ignor that error if everything else is working. have you resolved your original issue? That is to do with roles, have you repaired roles and rebuild relationships?

This issue appears to still exist in 7.1.1 and in sugar too: https://web.sugarcrm.com/support/issues/ed1f31a6-cb2d-12d1-5d15-52b399203902

Apparently in Sugar this issue is fixed now (as the link of the previous poster says). Does anybody know how to manually fix this in SuiteCRM?

I’m trying to install latest beta (7.2.0 beta 3) and immediately after installation (no errors) I cannot create account, lead, contact, opportunity, etc. I fill in the form, and the error “Error retrieving record. This record may be deleted or you may not be authorized to view it.” appears

This happens on Windows Server 2008 with Apache and PHP, using MSSQL Express 2005 on localhost.

BUT

strange thing is, that if I test the same installation on Ubuntu Linux with mysql database engine, everything works, no errors appear.

Any advice?

OK I will answer myself. This error appears when using MSSQL only. When MySQL is used, it works perfectly. It seems, that some database variable types not compatible with MSSQL are used in the code.