This documentation supports the 19.02 version of Remedy Action Request System.

To view the latest version, select the version from the Product version menu.

Using Run Process for the web

JavaScript is an HTML scripting language that allows you to create programs that reside directly on an HTML page. An active link can use the Run Process action to run JavaScript on the browser. The JavaScript code must have the word javascript in front if it. For example, the following code shows an alert box with "Hello world" in it:

javascript alert("Hello world");

You can use keywords and field references in the JavaScript, for example:

javascript alert("You are in $SCHEMA$ and Submitter is $2$");

In several BMC Remedy applications, the user is shown a table of related tickets along with the primary ticket. These related tickets can be from different forms. A special form is maintained, which records relationships between tickets. The related tickets table field shows this special form. When the user double-clicks on any of the related tickets, instead of showing the special form to the user, an open window action opens the form that has the ticket data.

JavaScript considerations

  • All the Run Process JavaScript actions are grouped together and executed at the end of the active link. For example, if you have a Run Process action followed by a Set Fields action, the Set Fields action is executed before the Run Process action.
  • Some JavaScript code is asynchronous. For example, openModifyForm starts the process of opening the form, but does not wait for the action to complete. So it is not possible to have another Run Process action that clicks a button on the newly opened form.
  • Any special characters in JavaScript must be properly escaped. For example, if the action has JavaScript alert("Short Description is $8$") and the Short Description value contains a double quote or a backslash or a new line, a JavaScript error occurs.
  • If the word javascript is not at the beginning of a run process action, it says "The following specific error(s) occurred when executing 'xx', " but it does not say what the error is.

Run Process considerations

  • Active links that run a process on the client should have qualifications that limit usage to an appropriate client platform. The keyword $HARDWARE$ can be used to check for the client platform. On UNIX machines, $HARDWARE$ returns the value of the command uname -m. On the Windows clients, it returns the value PC.
  • On UNIX machines, processes run under the Bourne shell.
  • When passing data fields as parameters to external programs, enclose the arguments with double quotation marks if the value might contain spaces or special characters.
  • The $PROCESS$ feature of the Set Fields action is effective for dynamically pulling or loading small amounts of data on the AR System client or server. For large amounts of data, use the API.
  • The Run Process string can have a maximum length of 4096 bytes. To execute large scripts, use field references to build the script's data.
  • For information about special Run Process commands, see the Developing an application section.
Was this page helpful? Yes No Submitting... Thank you

Comments