Tasks, by design, will return a user to the referring page upon saving (or cancelling).
To cause a different page to render, use javascript to set the referring page to a different value.
From the Task GUI Designer:
- click on the
Foo
field
- in the Javascript > onblur field, enter code similar to the following (carriage returns are not required; just used here for readability):
if (this.value == 'Bar')
qbo3.getObject(this).setReferrer('api/importform/summary?Object={{Object}}
&ObjectID={{ObjectID}}
&Method=RenderEdit
&Template=Task B', this);
Some notes / gotcha's with respect to the javascript snippet above:
qbo3.getObject(this).setReferrer(...)
changes the value of document.referrer
- the URL being passed is a relative URL, and causes a
Task
to be rendered
- the
Object
and ObjectID
parameters tell qbo3
to render a task on the same parent object as the current task
- using curly braces
{}
tell setReferrer
to substitute the expressions with matching values in the current task (E.g. Task A
and Task B
should each have the same Object
and ObjectID
- because this data is being passed into
XSLT
, the curly braces must be doubled: {{}}
so that XSLT
does not attempt to interpret them
- because this data is being passed into
XSLT
, the &
must be XML
-compliant; thus the use of &
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…