Previous Topic: Create Custom ServiceNow FieldsNext Topic: Display a CA SOI Alert Instance


Add Custom JavaScript

Custom fields require static text or a direct mapping of a field value. Enter the custom code for the advanced custom fields that needs more flexibility.

Perform the following tasks to create custom fields using custom JavaScript code:

Follow these steps:

  1. Start the CA Process Automation Console and click CA Process Automation Client on the upper right.
  2. Select the Configuration Browser tab.
  3. Expand Default Environment and double-click Orchestrator.

    The Folders pane opens.

  4. Expand ServiceNow, select ServiceNow, and double-click the CreateTicket process in the right pane.

    For more information about the pane, see Configure Processes for ServiceNow Integration.

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

  5. Click the tool bar to check out the process.

    The Check Out icon is disabled and the process is checked out. Custom fields are stored as Keys and Value arrays.

  6. Double-click Add Custom Javascript code here.

    The Properties of the pane open.

  7. Click in the Source code field.

    Add custom javascript code here to access the SOI parameters that are defined in the dataset at /ServiceNow/Common Dataset and associate it to the incident parameters.

    Note: For more information about how to add custom properties and sample code, see the code examples in Display a CA SOI Alert Instance.

  8. Edit the dynamic custom properties in the javascript code.
  9. Click OK.

    The Source code pane closes and the code is saved.

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

    The custom code is added to the process. The variables are saved in the create incident process.

  11. (Optional) Modify other variables that are used when you generate the ServiceNow incident if necessary.
  12. (Optional) Click Apply to save any variable changes and close the Properties pane.
  13. Click the icon on the tool bar to check in the modified process.

    The Versions page opens.

  14. Click OK.

Important! Do not change the description field of the ServiceNow Incident. This field is used to identify the SOI Server that is used in the ServiceNow integration.

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