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
Parameter | Value | Description |
---|---|---|
sScreenName | String | The screen to be opened in the dialog window. Currently, the valid values for this parameter are:
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. |
sScreenAlias | String | The base screen alias to use for a particular dialog. It should be the same for all dialogs of the same type. Example: cwActionNote |
bNewWindow | Boolean | 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 |
paramObj | Use this parameter to pass third-party specific values to your NexJ CRM application. Example: {key1: value1, key2: value2, ... , keyN: valueN} |
Response
- 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:
- Move the
Dashboard_Harness.html
file from theetc/adapters/popup
directory to themeta/web
directory. - Move the
NexJUtils.js
file from theetc/adapters/popup
directory to themeta/web/js
directory.
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 http://server.example.com:port/nexj/ui/portal
, enter http://server.example.com:port/nexj/Dashboard_Harness.html
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.