1

I created a SPList in SP 2010 on-prem platform, where 4 OOTB APPROVAL 2010 workflows have been created and running. Now, because of Auditing process, customer wants information of each and every items' workflow details like WF Status, why the item was approved why the item was rejected. using the JSOM API or SPServices lib , is it possible to get these kind of information and display in a html table?

I would like to get the comments fields of default infopath form, thats rendered in OOTB approval workflow and extract it.

I wrote the below code to get the WFStatus for the listitems.But, how can i extract the approval/rejection Comments, as well .

<script type="text/javascript" src="https://code.jquery.com/jquery-
               1.10.2.js"></script>
   <script type="text/javascript" 
  src="https://cdnjs.cloudflare.com/ajax/libs/jquery.SPServices/
        2014.02/jquery.SPServices-2014.02.js"></script>
<script type="text/javascript">
    function retrieveWFStatus() {
        $().SPServices({
            operation: "GetListItems",
            async: false,
            webURL: "/",
            listName: "testinglist1",
            CAMLViewFields: "<ViewFields><FieldRef Name='FileLeafRef' />
         <FieldRef Name='ApprovalWF' /></ViewFields>",
            CAMLQuery: "<Query></Query>",
            completefunc: function (xData, Status) {
            $(xData.responseXML).SPFilterNode("z:row").each(function () {
                    if ($(this).attr("ows_Approval" === 16)) {
                        console.log("It's complete");
                    }
                });
            }
        });
    }
  </script>
<input id="Button1" type="button" onclick="retrieveWFStatus()" 
             value="button" />

approvalform_comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.