Database connection lost after editing screen

I have added a database connection in Advanced Customisation / Tables and Databases.  I'm able to retrieve data successfully using the usual CRM objects.  However, if I edit a CRM screen layout and save it, the database connection disappears until I run a metadata refresh for Tables and Columns.  The self service database also disappears and reappears after the metadata refresh.  This is on CRM 2021 R1.

Is this a known issue?

Parents Reply Children
  • 0 in reply to Sage CRM

    Just had a similar issue on CRM 2022 R1.  I added multiple database connections.  As I added each one it appeared on screen but all the previous ones disappeared.  When I ran a metadata refresh for Tables and Columns they all became visible again.  Editing any one of them made all the others disappear until running another metadata refresh.

    This time the self-service database remained visible.  It was just the database connections I added that disappeared.

  • 0 in reply to Paul C

    This has become more of an issue than an irritation.  It seems that the database connections may be disappearing when nobody has changed anything in metadata (ie no changes made in Administration/Customisation).  Users get '500' errors when accessing pages that use the connected databases.  After running refresh metadata for tables and columns it all works again.

  • 0 in reply to Paul C

    I think this needs to be logged as a case.  Sage CRM opens all database connections on start up so if one is dropping (for example a 3rd party database connection) then this pretty strange.  It may be the database itself ending the connection so it would need to be investigated.

  • 0 in reply to Sage CRM

    How would making a customisation in CRM cause the linked databases to end their connections?  All at the same time?

    Would refreshing the metadata force CRM to reconnect to the databases?  

    I don't think the databases are getting disconnected.  I think this issue is caused by the metadata refresh that runs when, eg, a screen customisation is saved.  The metadata for the database connections is removed from memory and only comes back when a manual metadata refresh is run.  The http 500 errors are caused by the asp page script trying to use the database argument of the CRM.CreateQueryObj(sql, database) method.  On my dev system (with serverside debugging enabled) I can reproduce the error: