Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have a Document Library in WSS 3 which has the "Link to a Document" content type enabled, and I want to use a batch command (via lists.asmx updatelistitems) to create a series of links. Here is the Batch command I tried:

<Batch OnError='Continue'>
 <Method ID='1' Cmd='New'>
  <Field Name='ID'>New</Field>
  <Field Name='ContentType'>Link to a Document</Field>
  <Field Name='ContentTypeId'>0x01010A000CA269FA7C50E149A27BE7B09BBB05B7</Field>
  <Field Name='URL'>http://sampleurl/doc.txt, Sample Name</Field>
 </Method>
</Batch>

I was able to create something that looked like a "Link to a document", but it did not create the aspx file that redirects to the link. If I looked at the item properties I got this (I cannot post a screen shot because I am new):

Content Type: Link to a Document Name: 102_.000 URL: web address = http://sampleurl/doc.txt, Description = Sample Name

Which is closed, but note the file name (which is the item id followed by .000); and no it cannot be renamed as the file is empty 0 bytes.

Am I on a goose chase? Can this be done with web services alone?

Thank you.

share|improve this question
add comment

2 Answers 2

I tried "link to document" content type and it sucked. So I downloaded SP lookup with picker from codeplex. I created a look up field (in our case, docID, the new feature in sp2010) in the library and took care of that way. It took me less than 10 minutes to download and set up the look-up column for LinkToDocument column. Hope this helps.

share|improve this answer
add comment

You got empty document, because Link to a Document is derived from Document. In your case you must use copy.asmx service.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.