Setting OnQuickLaunch parameter on a list

Jul 15, 2010 at 2:23 PM

I have a script that queries for a list and creates it if it does not exist

 $().SPServices({
   operation: "GetList",
   listName: "Tasks New",
   webURL : "http://server/",

  async: false,
  completefunc: function (xData, Status) {
  var id = $(xData.responseXML).find("List").attr("ID");
 //alert(xData.responseXML.xml);
 
 if(!id)
 {
  //alert ("List undefined");
  CreateList("Tasks New","http://server/");
 }
 
 $("#tasksUL").append("<li>List ID: " + id + "</li>");
 }
});
 
   
 function CreateList(listName,webName){
 
 $().SPServices({
  operation: "AddList",
 listName: "Tasks New",
 description: "New Task List",
 templateID: 107,
 webURL : webName
 
});

What I would like to do is update the list after it is created so that it appears on the Quick Launch bar. How would I do that?

thanks,

Luis

 

 

 

 

Coordinator
Jul 17, 2010 at 4:59 AM

Luis:

Frankly, I'm not sure. There doesn't seem to be an attribute on the list itself which determines this.

M.

Jul 17, 2010 at 3:43 PM

On the MSDN forums I read there is a boolean OnQuickLaunch property. I just don't know how to use the list properties function

thanks,

Luis

 

Coordinator
Jul 19, 2010 at 3:15 AM

Luis:

There is definitely an OnQuickLaunch property on lists. However, it isn't mentioned in the documentation for the Lists.UpdateList method. You can try using that method from SPServices to update the attribute.

Give it a whirl and let me know how it goes!

M.