Add button on Nintex task form to edit main item with JavaScript

Add button on Nintex task form to edit main item with JavaScript

It’s common have a main item or document with associated tasks when working with a workflow. If you need a link from the task form to the main item form, perhaps to update the main item, here’s how to do it.  This was tested on Office 365.

On the task form, add button and set the type to JavaScript:

Configure button
Under the advanced settings, add your function:

Add a function to open the main item in a new window

Here’s what the function looks like:

window.open('[Common:Item URL]&mode=1','_blank');

The [Common:Item URL] means that you should get the common reference “Item URL”. That returns the full URL to the item the task is associated with – in this instance, the main case.

The “mode=1” forces the item to open in edit mode.

If you test in in preview mode, the button will open a new window but doesn’t link to an item. You need to run the workflow to see it in action.

Source for mode=1 trick: A Better Way to Open Nintex Task Forms in Edit Mode Using Nintex Forms for Office 365

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s