Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Zimlets

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-23-2009, 11:53 PM
Starter Member
 
Posts: 2
Default Unable to create a new folder

I am trying to create a new folder using the below code, but it fails. Can anybody point out the mistake, and additionally any other threads or examples to create a folder would be really helpful. I am trying to create folder and associate a url (a rss feed) to it.

Thanks in advance

var soapDoc = AjxSoapDoc.create("CreateFolderRequest", "urn:zimbraMail");
var folderNode = soapDoc.set("folder");
folderNode.setAttribute("name", "folder-test");
folderNode.setAttribute("l", parent);
folderNode.setAttribute("view", ZmOrganizer.VIEWS[ZmOrganizer.FOLDER][0]);
var command = new ZmCsfeCommand();
var resp = command.invoke({soapDoc: soapDoc});
var id = resp.Body.CreateFolderResponse.folder[0].id;
if (!id) {
throw new AjxException("Cannot create evite folder ", AjxException.INTERNAL_ERROR, "createEviteFolder");
}
this.eviteFolderID = id;
Reply With Quote
  #2 (permalink)  
Old 05-05-2009, 09:03 AM
Project Contributor
 
Posts: 127
Default

You are trying to create a calendar folder for a mail folder you cant try this code

var soapDoc = AjxSoapDoc.create("CreateFolderRequest", "urn:zimbraMail");
var folderNode = soapDoc.set("folder");
folderNode.setAttribute("name", "folderName");
folderNode.setAttribute("l", "1");
var command = new ZmCsfeCommand();
var resp = command.invoke({soapDoc: soapDoc});
var id = resp.Body.CreateFolderResponse.folder[0].id;
if (!id) {
throw new AjxException("Cannot create folder ", AjxException.INTERNAL_ERROR, "checkFolderExist");
}
__________________
http://www.seacom.it
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.