Last date modified: 2025-Nov-24

Develop object type event handlers

The Relativity platform supports multiple types of event handlers that you can use for interactions with document objects and Relativity Dynamic Objects (RDOs). You can use these object type event handlers to customize workflows and control user activities in the Relativity UI. You can associate these event handlers with specific object types to write custom code for following tasks:

  • Validate data entered in their fields.
  • Perform mass operations on several instances of an object simultaneously.
  • Trigger specific events on the object when users click console buttons.

For information about other event handler types, see Develop application event handlers and Implementing Relativity Forms event handlers.

Using object type event handlers with Relativity Forms

By default, RDOs in Relativity use Relativity Forms. To create event handlers for them, you can either create Page Interaction event handlers using JavaScript, or you can use some of the older object type event handlers listed in the following table.

The table below clarifies how Relativity Forms uses or does not use each object type event handler.

Object type event handler(s)

Impact of Relativity Forms

Pre Cascade Delete event handler

Pre Delete event handler

Pre Mass Delete event handler

The Object Manager API executes these handlers during its deletions, and by default, Relativity Forms uses Object Manager APIfor its deletions. So by default, Relativity Forms will respect the existence of these Event Handlers, with the following caveat:

  • After the delete pipeline finishes preDelete, the deletion is executed. By default that deletion is a call to the Object Manager API. If a handler is implemented for replaceDelete, and something other than the Object Manager API is used for the deletion, these object type event handlers will not be executed.

Pre Load event handler

The Object Manager API executes these handlers during its reads, and by default, Relativity Forms uses Object Manager APIfor its object instance reads. So by default, Relativity Forms will respect the existence of these Event Handlers, with the following caveats:

  • Pre Load event handlers fire on the server during the read for an object, this only occurs for view and edit forms, and so the Pre Load event handler will not fire on the form for creating a new object. In order to pre-populate values into a new object's form in Relativity Forms, implement a handler for the load pipeline's replaceGetNewObjectInsance.
  • If a handler is implemented for the load pipeline's replaceRead, and something other than the Object Manager API is used for this read, the Pre Load event handlers will not be executed.
  • Pre Load event handlers are sometimes used to inject script into Classic Forms via Response.Message, but Relativity Forms only supports execution of script which written as part of the Page Interaction event handler JavaScript files. Any scripts within Response.Message will not be executed, and should be moved into a JavaScript file listed in the PageInteractionEventHandler-derived class's ScriptFileNames or AdditionalHostedFileNames.

Pre Save event handler

Post Save event handler

The Object Manager API executes these handlers during its saves, (before and after the object is saved, respectively) and by default, Relativity Forms uses Object Manager API for its saves. So by default, Relativity Forms will respect the existence of these Event Handlers. They fire on the server, after the submit pipeline finishes its validation (on submit). If a handler is implemented for the submit pipeline's replaceSave, and something other than the Object Manager API is used for the save, these object type event handlers will not be executed.

Console event handler

The existence of a Console event handler associated to an object type will not prevent the type from using Relativity Forms, but Relativity Forms ignores them. To achieve Console behavior in Relativity Forms, implement a handler for the load pipeline's createConsole event.

List Page Interaction event handler

(This does not apply to Classic Forms pages or Relativity Forms pages)

Using object type event handlers without Relativity Forms

The following table describes how the object type event handlers behave on legacy objects that do not yet use Forms. It also describes how they will be affected if you change the object's Use Relativity Forms field to Yes. For more information, see Relativity Forms API.

All objects now default to using Relativity Forms. If you had previously set the Use Relativity Forms field to No, you will still see the field. However, new objects and objects that have been set to Yes no longer have this field.
Return to top of the page
Feedback