What is a Block in Sage CRM?

2 minute read time.
The word Block crops up over 1300 times in the Sage CRM developers guide. The word is actually quite a loose term that is used to name some of the Application Programming Interface (API) objects that can be referenced to extend the system.

The API objects are discussed in the Developers guide. Those API objects that directly involved in the generation of HTML output are called blocks. This is because they create blocks or distinct areas on the screen and it a convenient way of describing to a non-technical audience the way screens can be built out of building blocks. Think Lego!

Examples of the HTML generating blocks are the eWareEntryGroup block (aka screen block), the eWareListBlock (aka List Block) and the eWareChartGraphicBlock. These 'Blocks' all have a fundamental method called Execute(). The Execute() method generates and returns the HTML destined for the browser.

There are other API Objects that are responsible for data access and control which do not generate HTML for example the eWareRecord object or the eWareTargetLists object. In the Developers Guide these lack the honorific of 'Block'.

The API objects provide the mechanism for a programmer to extend the Sage CRM system. The Blocks return the needed HTML but any programming object needs to have properties set. For example a eWareEntryGroupBlock (aka screen) needs to know which fields (aka eWareEntryBlocks) are included. In turn we may also want to set the behaviour of those fields (aka eWareEntryBlocks). We can control the properties directly in the code, but Sage CRM is distinguished by being a Meta Data driven system.


Essentially Meta Data is the data that sets the properties for the API Blocks. So the definition of a screen (aka eWareEntryGroup) is not hard coded but is dynamically referenced from the Meta Data tables. If we want to change the fields on the screen, we change the Meta Data and the screen changes without any programming needed.

The Meta Data is so fundamental to the way that CRM operates that the set of Meta Data that describes the List (eWareListBlock) or Screen (eWareEntryGroup) being referenced is also called a Block. Because an API object is rarely used without a set of associated Meta Data definitions the term "block" has come to mean both the HTML generating API object and the Meta Data definition that sets the properties for the object.

This is why you find the Developers Guide listing the API Block Objects and the Administrative Interface of Sage CRM refering to the control of Blocks.