Skip to main content

Events

Events are objects sent to the /runevent endpoint whenever something happens on the frontend — a button click, a field change, a table load, and so on. When an event arrives, /runevent uses the event type and widget name to locate the matching handler method on your class, calls it, and returns the response back to the form.


Event constants

When your runEvent handler receives a request, the event type arrives in the widgetEvent field as an uppercase string. The constants below map readable names to those values.

Form Events

ConstantValueDescription
OnInitONINITTriggered when the form loads
OnSaveONSAVETriggered when a form save is requested
OnCancelONCANCELTriggered when the user cancels the form
OnRefreshONREFRESHTriggered when the form needs to refresh
OnPrintONPRINTTriggered when the user initiates a print
OnPrintReturnContentsONPRINTRETURNCONTENTSReturn printable content from backend

Widget Events

ConstantValueDescription
OnClickONCLICKTriggered when a button is clicked
OnChangeONCHANGETriggered when a field value changes
OnDeleteONDELETETriggered when a delete is requested
OnDownloadONDOWNLOADTriggered when a download is requested

Datatable — Data Loading

ConstantValueDescription
OnTableLoadDataONTABLELOADDATATriggered when a table needs its row data
OnTableEditLoadDataONTABLEEDITLOADDATATriggered when an editable table needs its row data

Datatable — Row Actions

ConstantValueDescription
OnTableRunActionEventONTABLERUNACTIONEVENTTriggered by a row action button (edit, delete, etc.)
OnTableEditRunActionEventONTABLEEDITRUNACTIONEVENTTriggered by a row action in inline editing mode
OnTableSelectRowEventONTABLESELECTROWEVENTTriggered when a row is selected
OnRowCheckboxONROWCHECKBOXTriggered when a row checkbox is clicked

Datatable — Batch & Record Creation

ConstantValueDescription
OnTableRunBatchActionEventONTABLERUNBATCHACTIONEVENTTriggered when operating on multiple rows
OnTableCreateRecordEventONTABLECREATERECORDEVENTTriggered when "Add New" is clicked in a table
OnLoadNewRecordTemplatesONLOADNEWRECORDTEMPLATESProvide template options for new records

File Upload Events

ConstantValueDescription
OnFileUploadONFILEUPLOADTriggered when files are uploaded
OnFileUploadCreateDocumentEventONFILEUPLOADCREATEDOCUMENTTriggered by datatable file uploads

Signature / Workflow Events

ConstantValueDescription
OnStartSignProcessONSTARTSIGNPROCESSTriggered when a signature process starts
OnFinishSignProcessONFINISHSIGNPROCESSTriggered when a signature process completes

Advanced Events

ConstantValueDescription
OnDirectRunFormEventONDIRECTRUNFORMEVENTCustom direct event handling
OnGetCustomResponseONGETCUSTOMRESPONSEReturn a custom response structure

EventHandlerEvents constants class

Copy this class into your project to avoid hardcoding event strings:

EventHandlerEvents.cs
public class EventHandlerEvents
{
// Form Events
public const string OnCancel = "ONCANCEL";
public const string OnDelete = "ONDELETE";
public const string OnDownload = "ONDOWNLOAD";
public const string OnChange = "ONCHANGE";
public const string OnClick = "ONCLICK";
public const string OnInit = "ONINIT";
public const string OnRefresh = "ONREFRESH";
public const string OnSave = "ONSAVE";

// Datatable Events
public const string OnTableRunActionEvent = "ONTABLERUNACTIONEVENT";
public const string OnTableRunBatchActionEvent = "ONTABLERUNBATCHACTIONEVENT";
public const string OnTableEditRunActionEvent = "ONTABLEEDITRUNACTIONEVENT";
public const string OnTableLoadData = "ONTABLELOADDATA";
public const string OnTableEditLoadData = "ONTABLEEDITLOADDATA";
public const string OnTableCreateRecordEvent = "ONTABLECREATERECORDEVENT";
public const string OnTableSelectRowEvent = "ONTABLESELECTROWEVENT";

// File Upload Events
public const string OnFileUpload = "ONFILEUPLOAD";
public const string OnFileUploadCreateDocumentEvent = "ONFILEUPLOADCREATEDOCUMENT";

// Print Events
public const string OnPrint = "ONPRINT";
public const string OnPrintReturnContents = "ONPRINTRETURNCONTENTS";

// Checkbox Events
public const string OnRowCheckbox = "ONROWCHECKBOX";

// Signature Events
public const string OnStartSignProcess = "ONSTARTSIGNPROCESS";
public const string OnFinishSignProcess = "ONFINISHSIGNPROCESS";

// Template Events
public const string OnLoadNewRecordTemplates = "ONLOADNEWRECORDTEMPLATES";

// Advanced Events
public const string OnDirectRunFormEvent = "ONDIRECTRUNFORMEVENT";
public const string OnGetCustomResponse = "ONGETCUSTOMRESPONSE";
}