Customizing the new data entry screens

The new data entry user interfaces can be customized using predefined JavaScript hooks, which start custom code that is provided in the JavaScript file. Separate hooks are provided for the single-edit screen (newSEExtObj.initialize()) and the multi-edit screen (newMEExtObj.initialize()). These hooks are started after the UI widgets are instantiated and are then available for customization.

Procedure

  1. Copy the dataEntryExtension.js file under $TOP\public_html\user\js\dataentry\ as provided in the sample file Samples\webapp\js_extensions\webapp.samples.js_extensions.zip on the product CD.
  2. Add your custom code to the newSEExtObj.initialize() and newMEExtObj.initialize() hooks.
    For example, you can call an alert for single-edit UI as follows:
    newSEExtObj.customFunction = function()
    {
    	alert("Hello World");
    };
  3. Start this function from the newSEExtObj.initialize() hook:
    newSEExtObj.initialize = function()
    {
    	newSEExtObj.customFunction();
    };

Results

The custom function invocation is wrapped in a try/catch block within the product code and any exceptions that are caught are logged to the Developer tools console. These logs can be viewed using the Microsoft Internet Explorer Developer tools console.