Skip to main content
Skip table of contents

Launching NexJ CRM dialogs from third-party applications

The NexJUtils.openNexJPopup JavaScript function can be used to launch NexJ CRM dialogs from third-party applications.

openNexJPopup function description

Opens a NexJ CRM dialog window in a third-party application. For example, you can use this function to create a new NexJ CRM task or display a NexJ CRM report while working in a different application.

Method signature

function NexJUtils.openNexJPopup(sScreenName, sScreenAlias, bNewWindow, paramObj)

API parameters


The screen to be opened in the dialog window. 

Currently, the valid values for this parameter are:

  • "mda:TaskCreate"
  • "mda:DocumentCreate"
  • "mda:ScheduleItemCreate"
  • "ReportBriefing"
  • "ReportEntity"

The list of supported screen names can be found in the NexJUtils file.

The NXJ_SCREEN_INFO_MAP variable holds a mapping between the dialog name and the value expected in the GenericProperties.portlet to launch the dialog.


The base screen alias to use for a particular dialog. It should be the same for all dialogs of the same type.

Example: cwActionNote


Specify whether opening a dialog should launch in a new window or re-use the last opened dialog window of the same type, if any.

Specify true. Opening multiple new windows is not currently supported; only a single dialog window can be opened for a given user at one time for the same dialog type.


Use this parameter to pass third-party specific values to your NexJ CRM application.

Example: {key1: value1, key2: value2, ... , keyN: valueN}


  • Users can only open one dialog of the same type at a time. If they trigger a second openNexJPopup call, the function returns a status object with a status code and the name of the previous dialog of that type opened for that user.
  • The status code found in the status object depends on whether the dialog was successfully opened.

Testing openNexJPopup functionality

To test this feature in the development environment without access to a third-party application, use the test harness provided with the finance project. The harness is not active by default.

To enable the harness:

  1. Move the Dashboard_Harness.html file from the etc/adapters/popup directory to the meta/web directory.
  2. Move the NexJUtils.js file from the etc/adapters/popup directory to the meta/web/js directory.
For more information about using and configuring the function and the test harness, refer to the readme.txt file in the etc/adapters/popup directory.

Access the harness by changing the URL used for accessing your application. Replace ui/portal in the URL with Dashboard_Harness.html. For example, if the application is normally accessed from, enter in the browser's address bar.

Use the testing harness only in development or testing environments. Ensure that these files are not located in the meta/web directory in production. 

Custom sizing and positioning of NexJ CRM dialogs

By default, NexJ dialogs try to maximize the usage of available screen space. To disable this default behavior, add the das=1 query string parameter to the opening URL; for example:


While disabled, the dialog opener code, which might not be NexJ code, will be responsible for both the position and size of the dialog.
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.