0

I have troubles saving user property to XML file in zimlet folder.

XML structure:

<zimlet name="ca_uoguelph_ccs_archive" version="2.0.2" label="Archive" description="Archives emails in the inbox by date.">
  <include>ca_uoguelph_ccs_archive.js</include>
  <includeCSS>ca_uoguelph_ccs_archive.css</includeCSS>
  <handlerObject>ca_uoguelph_ccs_archiveHandlerObject</handlerObject>
  <userProperties>
    <property type="string" name="archive_mainFolderId" value="" />
    <property type="string" name="archive_by_preference" value="y" />
    <property type="string" name="archive_auto_enabled" value="false" />
    <property type="string" name="archive_auto_last_run" value="" />
    <property type="string" name="archive_auto_settings" value="" />
  </userProperties>
</zimlet>

Function which should save property:

CcsArchive.prototype.setArchiveFolderId = function(id) {
    if (this.getArchiveFolderId() !== id) {
        this.setUserProperty(CcsArchive.CCS_ARCHIVE_FOLDER_ID, id, true);
    }
};

// (CcsArchive.CCS_ARCHIVE_FOLDER_ID = archive_mainFolderId)

setUserProperty is called and it don't give any errors, but property is't saved to xml file...

PsychoX
  • 1,088
  • 4
  • 21
  • 43

1 Answers1

0

have You tried on ZDesktop or Zimbra environment?
I think the problem be in "ModifyPropertiesRequest" soap request: http://files.zimbra.com/docs/soap_api/8.0/soapapi-zimbra-doc/api-reference/index.html

In dev mode with ZDesktop seems to not work properly.

I usually use ZmMetaData to persist user information.
http://files.zimbra.com/docs/zimlet/zcs/8.0.4/jsdocs/symbols/ZmMetaData.html