Sharepoint 2007 AddList and AddListFromFeature missing template columns and data content

What I've done

  • Inside SharePoint, I created a list based on the Project Tasks template
  • I removed most default columns and added new custom columns
  • I added data using the new format
  • Then I did "Save as template" and decided to save the template with the contents

What works

Now, when I use this template to create a new list inside SharePoint, it works fine. Custom columns are present and all data is pre-populated as expected.

What does not work

However, when I use the AddList or AddListFromFeature provided by SharePoint Web Services, a new list is created, but it is simply based on the original Project Tasks template with default columns and no data . strong>

What i tried

  • I tried to execute the sentence in the article from Phase 2 to set the user-id for the template, but that only prevented me from using the template (it was no longer specified when I create "Create").
  • I'm still trying to find out if this article is applicable - it seems to be a similar problem, but applies to sites instead of Lists.
  • , .

SharePoint 2007 ( ?), PHP NuSOAP . , , , , .

- Phase 2

<?xml version="1.0" encoding="ISO-8859-1"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns2034="http://tempuri.org"><SOAP-ENV:Body>
<AddListFromFeature xmlns="http://schemas.microsoft.com/sharepoint/soap/">
    <listName>2Test Milestone Release</listName>
    <description>Testing this out</description>
    <featureID>{00BFEA71-513D-4CA0-96C2-6A47775C0119}</featureID>
    <templateID>151</templateID>
</AddListFromFeature></SOAP-ENV:Body></SOAP-ENV:Envelope>

- - templateID

<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><soap:Fault><faultcode>soap:Server</faultcode><faultstring>Exception of type 'Microsoft.SharePoint.SoapServer.SoapServerException' was thrown.</faultstring><detail><errorstring xmlns="http://schemas.microsoft.com/sharepoint/soap/">Cannot complete this action.

Please try again.</errorstring><errorcode xmlns="http://schemas.microsoft.com/sharepoint/soap/">0x81072101</errorcode></detail></soap:Fault></soap:Body></soap:Envelope>

! , , ! , !

+5
1

, , -, , , :

( )

http://site/_layouts/new.aspx?FeatureId= {00bfea71-513d-4ca0-96c2-6a47775c0119} & ListTemplate = 150

Custom ( )

http://site/_layouts/new.aspx CustomTemplate = PT6.stp & FeatureId = {00bfea71-513d-4ca0-96c2 -6a47775c0119} & ListTemplate = 150

Custom (manifest.xml 151)

http://site/_layouts/new.aspx CustomTemplate = PT6.stp & FeatureId = {00bfea71-513d-4ca0-96c2 -6a47775c0119} & ListTemplate = 151

, , - , ( ), ListTemplate, CUSTOM, .

, :

  • .NET, , Voodoo ,
  • IFRAME http://site/_layouts/new.aspx CustomTemplate = PT6.stp & FeatureId = {00bfea71-513d -4ca0-96c2-6a47775c0119} & ListTemplate = 150 javascript, , , .

2 , PHP (), SharePoint, , , - - , , , OK , , .

: New.aspx, (bIsCustomTemplate = strCustomTemplate!= null, strCustomTemplate = querystring "CustomTemplate" ):

<% if (bIsCustomTemplate) { %>
<input id="onetidCustomTemplate" type="Hidden" name="CustomTemplate" value=<%SPHttpUtility.AddQuote(SPHttpUtility.HtmlEncode(strCustomTemplate),Response.Output);%> />
<% } %>

, , , , (Request.Form) CustomTemplate, - , .

+1

All Articles