Note that there are some explanatory texts on larger screens.

plurals
  1. POIn Sharepoint Workflow Forms how do I close form after clicking start or cancel
    primarykey
    data
    text
    <p>To be more clear, I am trying to modify the Form autogenerated by Sharepoint which you can see in Sharepoint Designer under Workflows -> Your Workflow -> Forms</p> <p><img src="https://i.stack.imgur.com/tw2D2.jpg" alt="alt text"></p> <p>By default you are given two buttons which is start and cancel which is self explainable, <strong>Start</strong> starts the workflow and <strong>Cancel</strong> does nothing. </p> <p><img src="https://i.stack.imgur.com/yRBAl.jpg" alt="alt text"></p> <p>Once I click on either of the buttons processing happens on the background but nothing interactive happens on the UI (I am expecting for it to go back on the sharepoint list and have a refreshed data or at least close the form). How do I make it close the form? The code behind for the buttons is</p> <pre><code>&lt;td nowrap="nowrap" class="ms-vb"&gt; &lt;input type="button" value="Start" name="btnSave" onclick="javascript: {ddwrt:GenFireServerEvent(concat('__insert;__commit;__redirectsource;__redirectToList={',ddwrt:EcmaScriptEncode($ListName),'};'))}" /&gt; &lt;/td&gt; &lt;td nowrap="nowrap" class="ms-vb" width="99%"&gt; &lt;input type="button" value="Cancel" name="btnCancel" onclick="javascript: {ddwrt:GenFireServerEvent(concat('__cancel;__redirectsource;__redirectToList={',ddwrt:EcmaScriptEncode($ListName),'};'))}" /&gt; &lt;/td&gt; </code></pre> <p>Even theres a <strong><code>redirecttolist</code></strong> parameter on the built in javascript I does not redirect. Any known workaround for this one? Or anything I am doing wrong?</p> <p><strong>Edit - the first issue is now solved</strong></p> <p>But I still have a slight problem as I dont know how to dynamically (not hard coded) pass TemplateID and ListID. With ItemID I use {ItemId} that works fine. To further illustrate what I mean see the screenshot and the comments below.</p> <p><img src="https://i.stack.imgur.com/NgOXp.jpg" alt="alt text"></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload