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
  • This is a known issue.  It appears as resolved in Sage CRM 2022 R1 release notes.

    CRMS-673/CRM-676 - Database -User interface.  When a system administrator added a new database connection in | Administration | Advanced
    Customization | Tables and Databases, the connection did not appear on the screen.

  • Could be the same thing but I'm able to create the database connection and it does appear on screen.  It's only after I edit a screen layout (eg add a field or whatever) and save it that the database connection disappears.

  • Is this reproducible on 2022 R1?

  • 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.

  • 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.

  • 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.

  • 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:

Reply
  • 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:

Children
No Data