Check out feature triggering workflows

Forums Dynamic Forms for SharePoint Check out feature triggering workflows

This topic contains 2 replies, has 2 voices, and was last updated by  Leon 3 weeks, 1 day ago.

  • Author
    Posts
  • #26474

    Leon
    Participant

    Hi Alex,

    I have a list I am trying to use the check out feature for and came across an issue. When the item is being checked out it is triggering workflows and causing save conflicts. Is there a way to disable the workflow trigger on check out? Or is there a way to delay the refresh of the item until workflows are finished?

  • #26487

    Alexander Bautz
    Keymaster

    There is unfortunately no way to prevent the WF from triggering from DFFS, but you could edit the WF and configure it to exit if the CheckedOut field is checked – effectively only triggering the WF when the item is checked in again.

    If you need to delay the load to wait for the WF you can use this trigger: https://spjsblog.com/dffs/dffs-user-manual/#Workflow_status_BETA

    Use it for example to call a custom function like this in your Custom JS:

    function customReloadPage(){
        spjs.dffs.alert({
            "title": "Checking workflow status",
            "msg":"<div style='font-size:16px;padding:10px;'>The workflow hasn't finished yet. Hit OK to pause for 10 seconds and do a new check.</div>",
            "ok":function(){
                spjs.dffs.alert({
                    "title": "Checking workflow status",
                    "msg":"<div id='customReloadMsg' style='font-size:16px;padding:10px;'></div>",
                    "noBtn":true
                });
                runTicker();
            },
            "cancel": function(){
                location.href = location.href.split(/editform.aspx/i).join("DispForm.aspx");
            }
        });
    }
    
    function runTicker(){
        var ticker = 10;
        setInterval(function(){
            jQuery("#customReloadMsg").html("Doing a new check in "+ticker+" seconds...");
            ticker -= 1;
        },1000);
        setTimeout(function(){
            location.href = location.href; // looks strange, but reloads the form cleanly
        },10000);
    }

    Alexander

  • #26495

    Leon
    Participant

    Thanks I’ll give this a shot!

You must be logged in to reply to this topic.