Results 1 to 4 of 4

Thread: Accessing Account Data from Admin Extension

  1. #1
    tangasmaster is offline Junior Member
    Join Date
    Jul 2010
    Posts
    6
    Rep Power
    4

    Default Accessing Account Data from Admin Extension

    Hi,

    I've implemented an Admin Extension that adds a new Tab to the Zimbra Account panel - ZaAccountXFormView. I added a new LDAP schema to Zimbra, added new LDAP objects to Zimbra accounts and mapped the new fields with that objects and all is working well - data is stored and retrieved correctly.

    But after doing all that, now I would like to get access to Account data within the ZaAccountXFormView panel but I couldn't find any documentation explaining how to achieve this.

    Basically what I would like to do is to set textfield edition enabled / disabled depending on the value of one property. Something like:

    "
    if( ZaTabView.XFormModifiers["ZaAccountXFormView"] ) {
    my_extension_ext.AccountXFormModifier = function (xFormObject, entry) {
    if(ZaTabView.isTAB_ENABLED(entry,ZaAccountXFormVie w.PERSON_TAB_ATTRS, ZaAccountXFormView.PERSON_TAB_RIGHTS)) {
    ...
    ...
    if( accountx.propertyy == "" )
    enable_edition_on_fieldx; <- this would be the definition of the items to display
    else
    disable_edition_on_fieldx;

    ...
    ...
    "

    This seemed, at first, some trivial thing to do but I couldn't get this to work so far.

    If someone could give me a hand on this I would surely appreciated.

  2. #2
    tangasmaster is offline Junior Member
    Join Date
    Jul 2010
    Posts
    6
    Rep Power
    4

    Default

    In the function where I need this, I've got the "xFormObject" and the "entry" objects, and the value that I want to "read" is referenced by "ref:ZaPerson.A_extension".

    Basically what I want is to get the value referenced by entry[ZaPerson.A_extension], but I have not managed to do so.

    Can anyone help me, please?

  3. #3
    tangasmaster is offline Junior Member
    Join Date
    Jul 2010
    Posts
    6
    Rep Power
    4

    Default

    Is this impossible to achive or simply nobody cares to answer?!

    Zimbra is a great product but this forum is more like a questions depot. You should not call it a forum ...

    "Leave your question. No answer will be given!"

  4. #4
    tangasmaster is offline Junior Member
    Join Date
    Jul 2010
    Posts
    6
    Rep Power
    4

    Default

    I found a solution for my problem but it is a "going around the problem" solution. In the AccountXFormModifier function, before defining the items to display I do a GetAccountRequest for the account - for anyone interest the "entry" field is the account username + domain name - and will retrieve the info I need from there.
    Surely this is not the right way to do things since this data must be already available somewhere ... I just don't know where and nobody cared to tell me.

    Anyway, I'm interested in doing things right, so I would like to know how this should be done. If some sharing soul would, eventually, be so kind, and share it with the remaining community I'm sure the community would appreciate it. I certainly would ...

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Allow single account to be domain admin over multiple domains
    By peter@mxtoolbox.com in forum Administrators
    Replies: 2
    Last Post: 03-19-2008, 12:36 PM
  2. Replies: 2
    Last Post: 02-12-2008, 11:55 AM
  3. Admin Extension fail view
    By deugenin in forum Developers
    Replies: 5
    Last Post: 11-22-2007, 03:01 PM
  4. restore admin account
    By preem in forum Administrators
    Replies: 2
    Last Post: 01-19-2007, 07:56 AM
  5. Admin Account
    By rmvg in forum Users
    Replies: 4
    Last Post: 09-18-2005, 11:03 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •