Quantcast
Channel: jQuery Library for SharePoint Web Services
Viewing all articles
Browse latest Browse all 6517

New Post: How to properly store the stream and fields for an item using SPServices?

$
0
0
I have this piece in my code:
     $().SPServices({
            operation: "GetItem",
            Url: source,
            async: false,
            completefunc: function (xData, Status) {
                mystream = $(xData.responseXML).find("Stream").text();
                      console.log("mystream= " +mystream);
                myfields = "";
                $(xData.responseXML).find("FieldInformation").each(function(){
                    myfields+=$(this).get(0).xml;
                    console.log("myfields= " +myfields);
                });
                
                 alert("Status=" + Status + "\n" + xData.responseText);
            }
        });
When I run the CopyIntoItems operation, everything copies properly, but because mystream and myfields become seem to remain blank according to the console, nothing is actually copied over aside from what I've named the new document and a "this item was copied from ____ click here to unlink" message. The new document itself is blank and it doesn't retain any of the properties because of the issue with mystream and myfields.
The status for GetItem operation and CopyIntoItems operation both return "success", and the xdata response for GetItem looks like this (continues with a lot of fields):

Image

Is there any way someone can point me in the right direction to figuring out the issue?

Viewing all articles
Browse latest Browse all 6517

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>