Zengine Query Parameters

There are several query string parameters that can be passed to any route in the app, and will display something over the underlying page.

You can set these query parameters using the Angular $location service. Make sure to include the $location service dependency, which you can use in code similar to the following example.

formId = 1;
recordId = 2;
$location.search('record', formId + '.' + recordId);

Record Overlay

Plugins can open the record overlay by passing the appropriate form ID and record ID to the record query string param. The format of the record query param is {formId}.{recordId}.

You can jump to a specific tab by passing the tab query string param in a similar way.

$location.search('tab', 'activities');

The standard tabs available are listed below.

Name Tab
Linked Records linked
Activities activities
Tasks tasks
Events events
Files files

#

To open tabs for a specific plugin use the prefix ‘plugin.’ + plugin namespace.

$location.search('tab', 'plugin.cloudFiles');

File Viewer Modal

Plugins can also open a file viewer by passing the file ID to the file-viewer query string param. Currently, this is only supported for document type files (i.e. with extensions like .pdf, .doc, and .docx).

fileId = 2;
$location.search('file-viewer', fileId);

Image Lightbox

Plugins can open images in a lightbox by passing the appropriate resource name and resource ID to the lightbox query string param. The format of the lightbox query param is {resourceName}.{resourceId}.

resourceName = 'file';
resourceId = 2;
$location.search('lightbox', resourceName + '.' + resourceId);