Sage CRM 2021 R2: Fixing the "Favourites" feature for a Custom Entity

1 minute read time.

Sage CRM has a great feature — Favourites. All primary entities have the ability to mark them as favourite and access them easily from user Favourite list.

We can extend this feature for custom entities as well. If you have used Advanced Customisation Wizard to create entities you will not have any issue (unless meta-data has been altered) - including those custom entities created in earlier version using the wizard will work once you upgrade to a version CRM from Sage CRM 2017 onwards.

Nevertheless, some entities might have issues especially when they were not created using the wizard. Symptoms of issue are different for each issue.

In some cases, the user can include a custom record in favourites list, but upon clicking on the link it fails to display the record and gives an error. Whereas, in certain cases when you click on Star icon to make custom record favourite and nothing happens — The icon colour remains unchanged suggesting the record is not marked as a favourite.

Below are some basic troubleshooting steps to isolate and fix the issue:-

  1. This feature is depended on SData, it's a JSON request
  2. In which case, make sure your tomcat features like dashboard and Calendar pages are working. See Checking System Health in the Help Center (http://help.sagecrm.com/on_premise/en/2021R2/administration/Content/Administrator/SS_CheckingSystemHealth.htm)
  • If user is not able to get it to work when they click on the Favourite icon or when revisiting the custom record the favourite icon is not marked then
    1. Check if your entity is setting the context correctly.
    2. Your entity should have CRM.SetContext() method included in the JavaScript of the ASP summary page.
  • If user can see the custom entity in the favourite list but upon clicking the link user is gets an error
    1. Run Fiddler (http://www.telerik.com/fiddler) you will see a JSON response like in the screenshot below
    2. OR use browser 'Inspect' Element feature to examine data for your custom entity record in favourite list

    3. Both will show Href/recordUrl attribute of the favourite item being blank

    4. If this is the case make sure Bord_EntityKind and Bord_ViewFileName are not blank for the record that describes the entity in the metadata table custom_tables.
    5. Bord_EntityKind should be set as "asp"
    6. Bord_viewFileName should be set as a summary page of a custom entity.

    7. Do full meta-data refresh and your favourites should now work.