Codeless Customization. Extending the RelatedEntities feature using RunBlock

Hints, Tips and Tricks

Technical Hints Tips and Tricks that cover customization and development using Sage CRM. API usage and coding are covered.

Codeless Customization. Extending the RelatedEntities feature using RunBlock

  • Comments 2
  • Likes

The Related Entities feature provides a simple to use and very powerful way of creating adhoc relationships between main entities within Sage CRM.  A system administrator can easily create new type of relationship between a company, a case or a custom built entity without having to write a single line of code.

The relationship screen might not be a screen that every users wants to see.  For example a user might only want to see the lists of companies associated with the company and not think about the other related entities.  

They might want to have access to a much simpler list screen.

This type of customization is very easy implement.

It needs the following steps.

  1. Check or create the view that references the RelatedEntities data.
  2. Create a List Block based on the view identified in step 1.
  3. And a Tab to the Tabgroup and use RunBlock to call the list created in step 2.

To see all the types of customization that you can carry out using RunBlock see these other articles

Step 1

The data for the Related Entities feature is held in the tables.

  • relatedentitylinks
  • relatedentitydata

The example views that exist in Sage CRM by default have been created under the Company context.

  • vRelaCompanyCase
  • vRelaCompanyPerson
  • vRelaCompanyCompany
  • vRelaEntitiesAll

These are used mainly for reporting.

You can find the reports that use these under

Reports -> General

  • Related Companies to Cases
  • Related Companies to People
  • Related Company to Company
  • Related Companies to All Entities

But these views can also be used for creating List Blocks.

Step 2

I used the view vRelaCompanyCompany to create a new List Block called RelatedCompaniesList and added the fields that I needed.


Step 3

I then called the list block from the company tab using RunBlock.