Running User Event Script in NetSuite

To use the NetSuite Record Listener activity, you must run the user event script in NetSuite system to define the user event to listen to.

For more information on how to run script in NetSuite system, see SuiteScript Developer & Reference Guide.

Procedure

  1. Log on to the NetSuite website as an administrator.
  2. Upload the TibcoUserEvent.js file, which is located in the TIBCO_HOME/bw/palettes/netsuite/version_number/suitescript_version_number directory, to the TibcoNetSuiteEventSource folder in the NetSuite website.
    1. Click Documents > Files > Suitescripts from the menu bar.
    2. You need to input an event name in the NAME field and then upload the TibcoUserEvent.js file to the TibcoNetSuiteEventSource folder.
    Note: If you want to use suitescript version 1.0, upload the TibcoUserEvent.js file from the TIBCO_HOME/bw/palettes/netsuite/version_number/suitescript/1.0 folder. If you want to use suitescript version 2.0 version, upload the TibcoUserEvent.js file from TIBCO_HOME/bw/palettes/netsuite/version_number/suitescript/2.0 folder.
  3. Click Customization > Scripting > Scripts > New from the NetSuite website menu.
  4. Select TibcoUserEvent.js from SCRIPT FILE, and Click Create Script Record.
    Note: Steps 5 and 6 are relevant only if you are using SuiteScript version 1.0. If you are on SuiteScript 2.0, you need to input an event name in the NAME field and then skip to step 7.
  5. Click User Event.
  6. Specify the following information:
    • Input an event name in NAME field.
    • Select TibcoUserEvent.js from SCRIPT FILE.
    • Input value userEventAfterSubmit in AFTER SUBMIT FUNCTION field.
  7. Click Save and Deploy.
  8. Select a record from APPLIES TO.
  9. Select Testing or Released from STATUS column.
    Note: If you select Testing as the deployment status of a script, the script is executed only for the script owner.
  10. Select Create, Edit, Delete, PayBills, Approve, Cancel, Pack or Ship. from the EVENT TYPE.
    Note: This plug-in only supports the Create, Edit, Delete, PayBills, Approve, Cancel, Pack and Ship event types. If you do not select any event types in the EVENT TYPE field, the deployed script is executed on the Create, Edit, Delete, PayBills, Approve, Cancel, Pack and Ship events.
    Note: The script can be applied to more than one record.
  11. Click Save.

    You can view your script by clicking Customization > Scripting > Scripts from the NetSuite website menu.