The 'All' property set in the ServiceAPI

Overview

In the ServiceAPI there is a concept of a propertySet, this allows for the retrieval of a pre-defined set of properties, for example:

/Record?q=all&propertySets=Grid&format=json

The problem with 'All'

One of the property sets is 'All' which means that the above URL could look like this:

/Record?pageSize=20&q=all&propertySets=All&format=json

Fetching all properties for many object types (such as Classification, SavedSearch, Activity etc) can be a good idea, being simpler than pre-determining which properties you need.  Using 'All' for Records is problematic, two problems being:

  • some Record properties are very expensive so response times will be unnecessarily slow, and
  • some properties will throw an error if the related feature is not enabled (e.g. NextTaskDue requires the Vital Records feature be enabled).

The solution

The solution is not to use 'All'. The alternatives are:

  • use the 'ViewPane' property set instead, which returns a list of all properties that might be interesting to an end user, or
  • construct a custom property set in hptrim.config which can contain all the properties that are of interest to your application.
Written on March 19, 2018