Change Handlers with OData

Change Handlers with OData

This topic covers how to configure OData services to provide change handlers for the SaveToDB add-in, version 10 or higher.

OData standards do not natively support change handlers. To work around this limitation, you can configure missing features in two ways:

  1. Using annotations
  2. Using OData objects for configuration selection

The ODataDB uses change handler annotations to set up the built-in JavaScript client. The SaveToDB add-in also reads these annotations.

For third-party OData services, developers can publish the xls.handlers table as an EntitySet. The SaveToDB add-in identifies these EntitySets by field signatures and loads the configuration after fetching the metadata document.

Configuring change handlers is similar to the following topics:

However, you need to provide OData objects instead of database objects.

For example, you can set the target EntitySet like this:

IDTABLE_SCHEMATABLE_NAMECOLUMN_NAMEEVENT_NAMEHANDLER_SCHEMAHANDLER_NAMEHANDLER_TYPEHANDLER_CODETARGET_WORKSHEETMENU_ORDEREDIT_PARAMETERS
 s02cashbookChangedefaults02_cashbookENTITYSET

Here’s an example using ActionImports:

IDTABLE_SCHEMATABLE_NAMECOLUMN_NAMEEVENT_NAMEHANDLER_SCHEMAHANDLER_NAMEHANDLER_TYPEHANDLER_CODE
 s02usp_cashbook3Changedefaults02_usp_cashbook3_changeACTIONIMPORT

In both examples, the left side defines object types, while the handler section specifies entity container objects that can execute requests.

Note that these configurations do not conflict with those for database objects. Users can connect to either a database or the OData service, and the add-in will apply the appropriate configuration from the xls.handlers table.

Additionally, you can use the REST API configuration as well.

This website is using cookies. By continuing to browse, you give us your consent to our use of cookies as explained in our Cookie Policy.