Previous Topic: Map Custom Remedy FieldsNext Topic: Display a CA SOI Alert Instance


Add Custom JavaScript

Custom fields can require more than static text or a direct mapping of a field value. Advanced custom fields that need more flexibility can require that you enter custom code.

Important! Use only one of the methods for adding fields. Do not attempt to combine mapping fields and adding custom code.

Perform one of the following actions to create custom fields using custom JavaScript code:

Follow these steps:

  1. Click the following tab:
  2. Expand Default Environment and double-click Orchestrator.

    The Folders pane opens.

  3. Select CA Remedy Gateway and double-click the CreateITSMTicket process in the right pane.

    The CreateITSMTicket page opens.

    For more information about the pane, see Configure Processes for BMC Remedy Integration (Configure Processes for BMC Remedy Integration, Configure Processes for HP Service Manager Integration).

    Note: If the icon labels do not display, select Edit User Preferences, select Show icon information on the Configuration tab and click OK.

  4. Click Icon for checking out a process. on the toolbar to check out the process.

    The Check Out icon is disabled and the process is checked out.

  5. Double-click the Icon for creating custom JavaScript code. icon named Add custom JavaScript code here to send values to Remedy * Incident.

    The Properties of UserAddedCustom*Code pane opens.

  6. Click in the Source code field.

    The Source code page opens.

  7. Enter the source code in JavaScript to create mappings that are based on alert attributes and using BMC Remedy parameters.

    Note: For available variables, see CA Process Automation Remedy Connector Variables (CA Process Automation Remedy Connector Variables, CA Process Automation HP Service Manager Gateway Variables). For source code examples, see Code Examples.

  8. Click OK.

    The Source code pane closes and the code is saved.

  9. Click Apply to accept any changes and close the Properties pane.

    The custom code is added to the process.

  10. (Optional) Double-click theIcon for accessing variables. icon named Create * Incident to access variables.

    The Properties of Create*Incident pane opens.

  11. (Optional) Expand the HelpDesk Create Case Parameters or ITSM Incident Parameters and HelpDesk Create Case Other Parameters or ITSM Incident Optional Parameters panes. Modify the variables that are used when generating a BMC Remedy incident.
  12. (Optional) Expand the Web Service User Parameters pane to view custom field definitions.

    Custom fields are configured as Keys and Value arrays on the BMC Remedy operator. You can add or further customize fields and values using JavaScript.

  13. (Optional) Click Apply to save any variable changes and close the Properties pane.
  14. Click the Icon for checking in a process. icon on the toolbar to check in the modified process.

    The Versions page opens.

  15. Click OK.

    The modified process is checked in.

Note: For more information about datasets, see the CA Process Automation User Guide.