Documentation Index

Fetch the complete documentation index at: https://guide.casepoint.com/llms.txt

Use this file to discover all available pages before exploring further.

Call JS Function

Prev Next

The Call JS Function executes the specified JavaScript expression in the JS Statement. It stops current execution and calls the JavaScript function.

NOTE: Any statement below a Call JS statement will not be executed.

If you want to send any data of a form field as parameter to the JavaScript function, the name of form field can be embedded with the symbols “!~” and “~!”. Any text within these symbols is treated as an expression and is evaluated. The JavaScript editor (covered more thoroughly in a separate section) can be used to include more complex JavaScript in your Call JS rules.

Here is a list of out of the box JS functions that are available to use with CallJS:

Function

Function Description

Details

GoToForm(internalName, additionalQueryParamString)

GoToForm function displays different case form in current tab. The form that gets shown is defined in the first parameter: internalName. User can also add additional query parameter(s) to the url when form loads

  • Parameter: internalName – it is the internal name of form. To go back to the original template for the current tab, please enter empty string (“”) in the parameter.

  • Parameter: additionalQueryParamString – a string with query parameter(s) that gets added on to the url when form loads. When none required, please enter empty string (“”) in the parameter.

Example usage:

  • Scenario 1: User is in a tab that uses form A and wishes to display form B in form A’s tab when a button is clicked:

GoToForm(“formB_Template_Name”, “”)

  • Scenario 2: User wishes to add a parameter, testParam=1, into the url when switching from form A to form B:

GoToForm(“formB_Template_Name”, “&testParam=1”)

  • Scenario 3: User wishes to view the original form A in the current tab when a button is clicked:

GoToForm(“”, “”)

ECase_FolderSave()

Allows user to save current case folder page

fn_refresh()

Allows user to refresh current page

OpenCaseAction(folderNumber, actionName, role, rowId, refreshParent)

Opens a popup to display a case action form

  • Parameter: folderNumber is the folder number of the folder

  • Parameter: actionName is the case action you want to fire

  • Parameter: role is the user role you want the form to open with

  • Parameter: rowId is the unique ID of the record you want the form to open. If 0 is passed then it will create a new record

  • Parameter: refreshParent is either “Y” or “N”, depending on if you want the parent window to refresh when the form closes.