RecordContext
RecordContext enables you to listen to all events or operations related to an object. For example, listening to field value changes before an event is saved or after an event is saved, and so on.
Here are the supported events:
Event Name | Description |
---|---|
Field Value Change | This event is initiated when a field value is changed. For example, an SR title is changed. |
On Before Save | This event is initiated before firing the API request to commit the data to the server. The end-user should be able to do asynchronous operations in this callback to cancel the event. This event can wait for an asynchronous operation to be completed |
On After Save | This event is initiated after a record is successfully saved in the VB application. For example, an SR is saved. |
On Data Load | This event is initiated when data is loaded. For example, after the SR object data is fetched. |
Here are the supported actions:
Action Name | Description |
---|---|
GetFieldValue | Used to fetch the current value of a field. For example, retrieving the current value of the Title field of SR. |
Save Record | Used to save an open record. For example, save an SR form from the edit page or save an SR from the create form. |
UpdateFieldValue | Used to update the value of a particular field. For example, update the Title field of an SR. |
You get the reference of RecordContext only by calling getActiveRecord()
API on top of TabContext object, which can be either a browser-TabContext or a
MSI-TabContext. Apart from getActiveRecord
API, you can get the
RecordContext object as a response of ContextOpen event subscription.