
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:
Under the advanced settings, add your function:
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
Thanks for your post! I have adapted the function to open the document a workflow is run on instead of the item properties. For reference: replace the ‘[Common:Item URL]&mode=1’ with ‘[Site URL]/<>/[Item Property:Name]?Web=1’ .
Hi, this is not working for me. The form loads in edit mode briefly and then goes back to the display mode. Any workaround?