eForm Events

The table in this topic give the list of eForm events you can use in JavaScript.

Examples

  • (Example) Use Custom JavaScript in an eForm
  • JavaScript Methods for eForm Builder - Examples for JavaScript methods that are available out-of-the-box (OOTB) in AgilePoint NX.
  • REST API - Code examples for implementing the REST API.
  • Advanced Examples

    For more advanced or complex examples or specific information about how to solve a specific business problem or use case, AgilePoint recommends the following resources:

    • AgilePoint Community Forums - A free, AgilePoint-moderated, crowd-sourcing user forum where you can ask questions about specific techniques, the solutions to use cases, workarounds, or other topics that may not be covered in the Product Documentation.
    • Video Portal - Video walkthroughs for a range of simple and advanced tasks in AgilePoint NX.
    • Professional Services - If you can not find the information you need for your specific business problem, mentoring is available through AgilePoint Professional Services.
    • Personalized Training - AgilePoint can provide personalized training for your organization. To request personalized training, contact AgilePoint Sales.

Good to Know

  • The class eFormEvents contains these events. You can call a JavaScript method as eFormEvents.[eventname].

    Example:

    eFormEvents.onFormLoadComplete

Events

Event Description

onAllFilesFetch

Function:
Occurs when all JavaScript files are loaded.
Example:
eFormEvents.SharedJS.onAllFilesFetch = function(eventArgs)
{
  // Functionality goes here
                                        
  // eventArgs – will contain list of JavaScript files. Each object will contain filename and its status.
  // eventArgs[0].fileName - Gives the JavaScript filename 
  // eventArgs[0].status - Gives the status of the JavaScript file
}
Limitations:

AgilePoint NX OnDemand (public cloud), or AgilePoint NX PrivateCloud or AgilePoint NX OnPremises v7.0 Software Update 1 or higher

onBeforeSubmit

Function:
Occurs after a Before Submit rule is executed, and before the validation of the form controls and form sections.
Example:
eFormEvents.onBeforeSubmit = function (callback) 
{
  // Functionality goes here

  // This callback is mandatory for the form submission. 
  //  If it is not called, the form won't get submitted.
  callback (true);  
}

onFileFetch

Function:
Occurs each time a JavaScript file loads.
Example:
eFormEvents.SharedJS.onFileFetch = function(eventArgs) 
{
  // Functionality goes here
                                        
  // eventArgs.fileName - Gives the JavaScript filename 
  // eventArgs.status - Gives the status of the JavaScript file
}
Limitations:

AgilePoint NX OnDemand (public cloud), or AgilePoint NX PrivateCloud or AgilePoint NX OnPremises v7.0 Software Update 1 or higher

onFormLoadComplete

Function:
Occurs when the form load is complete.
Example:
eFormEvents.onFormLoadComplete = function () 
{
     // Functionality goes here

}

onSectionNavigation

Function:
Occurs when all the form controls for the specified section is loaded.
Example:
eFormEvents.onSectionNavigation = function (eventArgs) 
{
  // Functionality goes here
  
  // eventArgs.currentSection - will give the current 
  // section's header
  
  // eventArgs.previousSection -  will give the previous section's 
  // header from where it got navigated.
}

onSubmit

Function:
Occurs after the form data is submitted.
Example:
eFormEvents.onSubmit = function () 
{
  // Functionality goes here
}

onValidationOnSubmit

Function:
Occurs after a Validation on Submit rule is executed, and before the form data is submitted.
Example:
eFormEvents.onValidationOnSubmit = function (callback) 
{
  // Functionality goes here

  // This callback is mandatory for the form submission. 
  // If it is not called, the form won’t get submitted.
  callback (true);  
}

onAddRecord

Function:
Occurs after a row is added in a subform.
Example:
eFormEvents.subForm.onAddRecord = function (eventArgs) 
{
  // Functionality goes here
  // eventArgs.element - Gives the subform element
  // eventArgs.dataName - Gives the internal name of the subform
  // eventArgs.newRow - Gives the row element

}

onDeleteRecord

Function:
Occurs after a row is deleted from a subform.
Example:
eFormEvents.subForm.onDeleteRecord = function (eventArgs) 
{
  // Functionality goes here
  // eventArgs.element - Gives the subform element
  // eventArgs.dataName - Gives the internal name of the subform
}

onCopyRecord

Function:
Occurs after a row is copied to a subform.
Example:
eFormEvents.subForm.onCopyRecord = function (eventArgs) 
{
  // Functionality goes here
  // eventArgs.element - Gives the subform element
  // eventArgs.dataName - Gives the internal name of the subform
  // eventArgs.newRow - Gives the row element
}

onAddRecord

Function:
Occurs after a row is added in a Data Grid form control.
Example:
eFormEvents.grid.onAddRecord = function (eventArgs) 
{
  // Functionality goes here
  // eventArgs.element - Gives the grid element
  // eventArgs.dataName - Gives the internal name of the grid
  // eventArgs.newRow - Gives the row element
  // eventArgs.rowData - Gives the JSON data for the newly added row

}

onDeleteRecord

Function:
Occurs after a row is deleted from a Data Grid form control.
Example:
eFormEvents.grid.onDeleteRecord = function (eventArgs) 
{
  // Functionality goes here
  // eventArgs.element - Gives the grid element
  // eventArgs.dataName - Gives the internal name of the grid
  // eventArgs.rowData - Gives the JSON data for the newly added row
}

onCancelRecord

Function:
Occurs after a row change is cancelled in a Data Grid form control.
Example:
eFormEvents.grid.onCancelRecord = function (eventArgs) 
{
  // Functionality goes here
  // eventArgs.element - Gives the grid element
  // eventArgs.dataName - Gives the internal name of the grid
  // eventArgs.cancelledRow - Gives the row element
  // eventArgs.rowData - Gives the JSON data for the newly added row
}

onSaveRecord

Function:
Occurs after a row is changed and then saved in a Data Grid form control.
Example:
eFormEvents.grid.onSaveRecord = function (eventArgs) 
{
  // Functionality goes here
  // eventArgs.element - Gives the grid element
  // eventArgs.dataName - Gives the internal name of the grid
  // eventArgs.savedRow - Gives the row element
  // eventArgs.rowData - Gives the JSON data for the newly added row
}

onDataBound

Function:
Occurs after a Data Grid form control binds data from a data source.
Example:
eFormEvents.grid.onDataBound = function (eventArgs) 
{
  // Functionality goes here
  // eventArgs.dataName - Specifies the internal name of the Data Grid
  // eventArgs.kendoInstance - Specifies the Telerik instance
}
Limitations:

AgilePoint NX OnDemand (public cloud), or AgilePoint NX PrivateCloud or AgilePoint NX OnPremises v7.0 Software Update 2 or higher

printForm

Function:
Occurs when a form user clicks the Print button.
Example:
var options = {}
options.width = '800px';
eFormEvents.printForm = function(callback)
{
  // Functionality goes here
  // This callback is mandatory for the print form functionality. 
  // If it is not called, the form won't get printed.
  callback(options);
}
Limitations:

AgilePoint NX OnDemand (public cloud), or AgilePoint NX PrivateCloud or AgilePoint NX OnPremises v7.0 Software Update 1 or higher