UnlinkFromCopySource

Feb 12, 2010 at 9:13 AM

Thanks for the effort you have put into the SPServices.  This has made our SP scripting tasks a lot simpler.

I have written a script using your SPservices to effectively move a document between folders in a document library.  I have used the CopyIntoItemsLocal to create a copy and then UpdateListItems to perform a delete of the original document.  Before performing the delete I would like to make a call to the SPListItem.UnlinkFromCopySource method.  Is there any chance that you can wrap this in your code?

Thanks

Paul.

Coordinator
Feb 15, 2010 at 2:16 AM

Paul:

I don't think that UnlinkFromCopySource is exposed through the Web Services, though it sure would be great if it were. Let me know if I'm missing something.

M.

Feb 15, 2010 at 7:44 AM

Marc - ok I didn't do enough research here first.  Anyway, I have managed to do this using the UpdateListItems method by writing to _CopySource. Thanks.  Paul.

Coordinator
Feb 15, 2010 at 12:27 PM

No worries.  Glad you got it working!

M.

Jan 30, 2012 at 12:00 PM

@pshead

I appreciate this post is quite old but I don't understand how you were able to update _CopySource because from what I can tell it's a readonly guid field.  Any assistance appreciated.

Des Owen

Coordinator
Jan 30, 2012 at 6:19 PM

Des:

I don't think it's possible, either, but Paul seemed to come up with something. Perhaps he'll see you message and reply.

M.

Feb 2, 2012 at 10:33 AM

This may sound strange, but I have had success just setting the item as its own parent so it effectively breaks the source attribute and sets it to itself. I think it was sourceurl or something like that.

Feb 2, 2012 at 11:07 AM

Many thanks, I'll look into that. What I've done for now is hide the message, about the item being a copy, using JQuery. What the user doesn't know won't hurt them :-).

Des

From: spevilgenius [email removed]
Sent: 02 February 2012 11:34
To: des.owen@thefoxgroup.co.uk
Subject: Re: UnlinkFromCopySource [SPServices:85096]

From: spevilgenius

This may sound strange, but I have had success just setting the item as its own parent so it effectively breaks the source attribute and sets it to itself. I think it was sourceurl or something like that.