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

New Post: UpdateList method can't unhide lists

$
0
0

Thanks @spevilgenius, but I'm still having the same issue (using 'false', 'False' and 'FALSE').

After some tests I conclude the following:

When I use the following code to show the properties:

$().SPServices({
  operation: "UpdateList",
  listName: "Doc2",
  completefunc: function (xData, Status){
    console.log($(this))
  }
});

I get this response:

<?xmlversion="1.0"encoding="utf-8"?><soap:Envelopexmlns: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><UpdateListResponsexmlns="http://schemas.microsoft.com/sharepoint/soap/"><UpdateListResult><Results><NewFields/><UpdateFields/><DeleteFields/><ListPropertiesDocTemplateUrl="/sites/PUMA/Doc2/Forms/template.doc"DefaultViewUrl="/sites/PUMA/Doc2/Forms/AllItems.aspx"MobileDefaultViewUrl="" ID="{71899C1A-20FE-40E9-B3E4-BEF0B7B89A06}"Title="Doc2"Description="" ImageUrl="/_layouts/images/itdl.gif"Name="{71899C1A-20FE-40E9-B3E4-BEF0B7B89A06}"BaseType="1"FeatureId="00bfea71-e717-4e80-aa17-d0c71b360101"ServerTemplate="101"Created="20121113 04:03:54"Modified="20121113 04:03:55"LastDeleted="20121113 04:03:54"Version="1"Direction="none"ThumbnailSize="" WebImageWidth=""WebImageHeight="" Flags="67112968"ItemCount="0"AnonymousPermMask="0"RootFolder="/sites/PUMA/Doc2"ReadSecurity="1"WriteSecurity="1"Author="1"EventSinkAssembly="" EventSinkClass=""EventSinkData="" EmailInsertsFolder=""EmailAlias="" WebFullUrl="/sites/PUMA"WebId="dddd41cf-6f87-4ae2-9aa0-901c4d85533a"SendToLocation="" ScopeId="d3c29d60-1974-46da-ab58-bcf1d2d0cda1"MajorVersionLimit="0"MajorWithMinorVersionsLimit="0"WorkFlowId="" HasUniqueScopes="False"AllowDeletion="True"AllowMultiResponses="False"EnableAttachments="False"EnableModeration="False"EnableVersioning="False"Hidden="False"MultipleDataList="False"Ordered="False"ShowUser="True"EnableMinorVersion="False"RequireCheckout="False"/></Results></UpdateListResult></UpdateListResponse></soap:Body></soap:Envelope>

That's ok.

Now, I'll hide the list with the following code:

$().SPServices({
  operation: "UpdateList",
  listName: "Doc2",
  listProperties:"<List Hidden='true' />",
  completefunc: function (xData, Status){
    console.log($(this))
  }
});

Perfect, the list is hidden!

PS: At the first time I did it, I think the list would be hide like when we do it by SharePoint Designer, that don't show the list for any user (except if they know the path), like the 'Workflows History' list. More details on: http://goo.gl/6OsOG

It means that if I know the list path, I can access it, click on Definitions> List Definition > Title, Description and Navigation>Display this list on the Quick Launch.

So it's not the main problem (although I would like to hide it as on SharePoint Designer).

The main problem is that the list can't be 'unhidden' using this method.

After all, if we use the first code to show the list properties (after turning the list visible), we will see again the propertyHidden="False".

Thanks for all help and suggestion :D


Viewing all articles
Browse latest Browse all 6517

Trending Articles



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