cancel
Showing results for 
Search instead for 
Did you mean: 
johannes
Nintex Newbie

Update list properties using the call web service action

Jump to solution

I am trying to update the properties using the UpdateList method of the lists.asmx webservice. As there are no  examples for the soap request on MSDN I like to know if anybody did this before and could provide an example. I know the guid of the list but I have no clue how the listProperties parameter should look like and which parametes are mandatory.

Any hints are appreciated.

Labels: (2)
0 Kudos
Reply
15 Replies
emha
Nintex Newbie

Re: Update list properties using the call web service action

Jump to solution

I played with it some time ago.

but I didn't bother with what's the exact definition of ListProperties attribute. I simply read in actual properties with GetList method, updated those properties that I needed and sent the full ListProperties set back to the list with UpdateList method.

Reply
johannes
Nintex Newbie

Re: Update list properties using the call web service action

Jump to solution

I tried the same but received an error 500. Do you know if any of the other paramters like listVersion, deleteFields, updateFields and newFields are mandatory?

0 Kudos
Reply
emha
Nintex Newbie

Re: Update list properties using the call web service action

Jump to solution

yes, you have provide at least empty XML node for each and every of the parameters, just like in the example on MSDN

0 Kudos
Reply
johannes
Nintex Newbie

Re: Update list properties using the call web service action

Jump to solution

Still no success. My soap request looks like this. Do you see any mistake? I tried it with and without method batch parts.



<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:m="http://schemas.microsoft.com/sharepoint/soap/">
  <soap:Header>
  </soap:Header>
  <soap:Body>
    <m:UpdateList>
      <m:listName>Projektideen</m:listName>
      <m:listProperties>
  <ListProperties
   DocTemplateUrl=""
   DefaultViewUrl="/test/poc/Lists/Projektideen/AllItems.aspx"
   MobileDefaultViewUrl="" ID="{CE9245B0-08BF-4F9A-A2E4-BD14A62594A4}"
   Title="Projektideen"
   Description=""
   ImageUrl="/_layouts/15/images/itgen.png?rev=23"
   Name="{CE9245B0-08BF-4F9A-A2E4-BD14A62594A4}"
   BaseType="0" FeatureId="00bfea71-de22-43b2-a848-c05709900100"
   ServerTemplate="100"
   Created="20180613 07:49:42"
   Modified="20180613 08:21:38"
   LastDeleted="20180613 07:49:42"
   Version="36"
   Direction="none"
   ThumbnailSize=""
   WebImageWidth=""
   WebImageHeight=""
   Flags="612372480"
   ItemCount="3"
   AnonymousPermMask="0"
   RootFolder="/test/poc/Lists/Projektideen"
   ReadSecurity="1"
   WriteSecurity="1"
   Author="1"
   EventSinkAssembly=""
   EventSinkClass=""
   EventSinkData=""
   EmailAlias=""
   WebFullUrl="/test/poc"
   WebId="eabf190b-7366-42a8-897d-64ad1e136702"
   SendToLocation=""
   ScopeId="e8fa6d7f-3a10-4d81-b726-bcdbaaa7d9db"
   MajorVersionLimit="0"
   MajorWithMinorVersionsLimit="0"
   WorkFlowId=""
   HasUniqueScopes="False"
   NoThrottleListOperations="False"
   HasRelatedLists=""
   Followable="False"
   AllowDeletion="True"
   AllowMultiResponses="False"
   EnableAttachments="True"
   EnableModeration="False"
   EnableVersioning="False"
   HasExternalDataSource="False"
   Hidden="False"
   MultipleDataList="False"
   Ordered="False"
   ShowUser="True"
   EnablePeopleSelector="False"
   EnableResourceSelector="False"
   EnableMinorVersion="False"
   RequireCheckout="False"
   ThrottleListOperations="False"
   ExcludeFromOfflineClient="False"
   CanOpenFileAsync="True"
   EnableFolderCreation="False"
   IrmEnabled="False"
   IsApplicationList="False"
   PreserveEmptyValues="False"
   StrictTypeCoercion="False"
   EnforceDataValidation="False"
   MaxItemsPerThrottledOperation="5000" />       
 </m:listProperties>
    <m:newFields>
  <NewFields>
   <Method ID="1">
    <ErrorCode>0x00000000</ErrorCode>
   </Method>
  </NewFields>
    </m:newFields>
        <m:updateFields>
   <UpdateFields>
    <Method ID="2">
     <ErrorCode>0x00000000</ErrorCode>
    </Method>
   </UpdateFields>
        </m:updateFields>
        <m:deleteFields>
   <DeleteFields>
    <Method ID="3">
     <ErrorCode>0x00000000</ErrorCode>
    </Method>
   </DeleteFields>
        </m:deleteFields>
        <m:listVersion>
   36
        </m:listVersion>
    </m:UpdateList>
</soap:Body>
</soap:Envelope>
 


					
				
			
			
				
			
			
				
			
			
			
			
			
			
		
0 Kudos
Reply
emha
Nintex Newbie

Re: Update list properties using the call web service action

Jump to solution

why do you send some error codes in a request? 

as well some nodes doesn't meet specification.

you seem to mix request and response nodes together ....

try with following

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:m="http://schemas.microsoft.com/sharepoint/soap/">
     <soap:Header>
     </soap:Header>
     <soap:Body>
          <m:UpdateList>
               <m:listName>Projektideen</m:listName>
               <m:listProperties>
                    <List
                         DocTemplateUrl=""
                         DefaultViewUrl="/test/poc/Lists/Projektideen/AllItems.aspx"
                         MobileDefaultViewUrl="" ID="{CE9245B0-08BF-4F9A-A2E4-BD14A62594A4}"
                         Title="Projektideen"
                         Description=""
                         ImageUrl="/_layouts/15/images/itgen.png?rev=23"
                         Name="{CE9245B0-08BF-4F9A-A2E4-BD14A62594A4}"
                         BaseType="0" FeatureId="00bfea71-de22-43b2-a848-c05709900100"
                         ServerTemplate="100"
                         Created="20180613 07:49:42"
                         Modified="20180613 08:21:38"
                         LastDeleted="20180613 07:49:42"
                         Version="36"
                         Direction="none"
                         ThumbnailSize=""
                         WebImageWidth=""
                         WebImageHeight=""
                         Flags="612372480"
                         ItemCount="3"
                         AnonymousPermMask="0"
                         RootFolder="/test/poc/Lists/Projektideen"
                         ReadSecurity="1"
                         WriteSecurity="1"
                         Author="1"
                         EventSinkAssembly=""
                         EventSinkClass=""
                         EventSinkData=""
                         EmailAlias=""
                         WebFullUrl="/test/poc"
                         WebId="eabf190b-7366-42a8-897d-64ad1e136702"
                         SendToLocation=""
                         ScopeId="e8fa6d7f-3a10-4d81-b726-bcdbaaa7d9db"
                         MajorVersionLimit="0"
                         MajorWithMinorVersionsLimit="0"
                         WorkFlowId=""
                         HasUniqueScopes="False"
                         NoThrottleListOperations="False"
                         HasRelatedLists=""
                         Followable="False"
                         AllowDeletion="True"
                         AllowMultiResponses="False"
                         EnableAttachments="True"
                         EnableModeration="False"
                         EnableVersioning="False"
                         HasExternalDataSource="False"
                         Hidden="False"
                         MultipleDataList="False"
                         Ordered="False"
                         ShowUser="True"
                         EnablePeopleSelector="False"
                         EnableResourceSelector="False"
                         EnableMinorVersion="False"
                         RequireCheckout="False"
                         ThrottleListOperations="False"
                         ExcludeFromOfflineClient="False"
                         CanOpenFileAsync="True"
                         EnableFolderCreation="False"
                         IrmEnabled="False"
                         IsApplicationList="False"
                         PreserveEmptyValues="False"
                         StrictTypeCoercion="False"
                         EnforceDataValidation="False"
                    MaxItemsPerThrottledOperation="5000" />

               </m:listProperties>
               <m:Fields>
                    <Fields>
                    </Fields>
               </m:Fields>
               <m:listVersion>36</m:listVersion>
          </m:UpdateList>
     </soap:Body>
</soap:Envelope>
‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍
Reply
johannes
Nintex Newbie

Re: Update list properties using the call web service action

Jump to solution

Thanks a lot. That helped. A bit tricky that you need to extract the version first after every update of the list. But easy to guess once you realize that it does not work a second time in the run now dialouge.

Reply
emha
Nintex Newbie

Re: Update list properties using the call web service action

Jump to solution

yeah, it's mentioned in documentation it's being checked to prevent conflicts.

0 Kudos
Reply
johannes
Nintex Newbie

Re: Update list properties using the call web service action

Jump to solution

Everything works like a charme if I update properties of a list which is created via Web GUI. But if I try to update a list which was created via workflow (either using the create list action or the addList method in a web service call) I was not able to update the properties.

I receive the following error message:

xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><faultcode>soapSmiley Frustratederver</faultcode><faultstring>Exception of type 'Microsoft.SharePoint.SoapServer.SoapServerException' was thrown.</faultstring><detail><errorstring xmlns="http://schemas.microsoft.com/sharepoint/soap/">Specified method is not supported.</errorstring></detail></soap:Fault>  

I am using exactly the same procedure: get list properties, change properties, update list.

Any clue what could be the issue? 

0 Kudos
Reply
emha
Nintex Newbie

Re: Update list properties using the call web service action

Jump to solution

I've no idea what could cause the difference.

could you post the requests that create list, query and update properties?

0 Kudos
Reply