Sage CRM 2021: How a user's Favourite Records are stored in CRM.

In the screenshot below, you can see that a user has selected certain records as their favourites.

When a user marks a record as a favourite, an Ajax call is made from the interface to insert a record into the database table 'UserRecords'.

The records that are created can be accessed by using the following SQL:

select * from userrecords where usrc_userid = 1 and usrc_type = 'Favourites'

The important fields are:

  • usrc_userid = The Primary Key value for the User
  • usrc_entityid = The ID value that identifies which entity type is accessed. Every table in the system is described in the metadata table custom_tables. This includes custom entities.
  • usrc_recordid = The Primary Key value for the record that is favourited.