Results 1 to 3 of 3

Thread: How to find accounts which have zimbraNotes field with no value using Java Soap API?

  1. #1
    Join Date
    Apr 2012
    Posts
    29
    Rep Power
    3

    Default How to find accounts which have zimbraNotes field with no value using Java Soap API?

    I'm trying to find all accounts which have zimbraNotes field equals "" (blank) using the following filter, but it's not working:

    Code:
    SearchOptions arg=new SearchOptions();
    
    arg.setQuery("zimbraNotes='' ");
    String attRet[]=null;
    arg.setReturnAttrs(attRet);
    arg.setFlags(Provisioning.SA_ACCOUNT_FLAG);
    
    List<NamedEntry> list = sp.searchDirectory(arg);
    How to do that?

  2. #2
    Join Date
    Mar 2011
    Posts
    23
    Rep Power
    4

    Default

    Quote Originally Posted by Roger75 View Post
    I'm trying to find all accounts which have zimbraNotes field equals "" (blank) using the following filter, but it's not working:

    Code:
    SearchOptions arg=new SearchOptions();
    
    arg.setQuery("zimbraNotes='' ");
    String attRet[]=null;
    arg.setReturnAttrs(attRet);
    arg.setFlags(Provisioning.SA_ACCOUNT_FLAG);
    
    List<NamedEntry> list = sp.searchDirectory(arg);
    How to do that?
    you can try this solution
    Code:
     List<com.zimbra.cs.account.Account>listAccounts= soapProvisioning.getAllAccounts(soapProvisioning.getDomainByName("domainName"));
    		       for(int i=0;i<listAccounts.size();i++){
    		    	   if(listAccounts.get(i).getNotes().equals("")){
    		    		   //account have zimbraNotes field equals "" 
    		    	   }
    		       }
    Regards

    Wissem

  3. #3
    Join Date
    Apr 2012
    Posts
    29
    Rep Power
    3

    Default

    You must be kidding... I wanna just getting the accounts with zimbraNotes equals("")! if I do like you said I'll spent a week in my process!

Similar Threads

  1. Adding an extra line to ZimbraNotes
    By ecobrazim in forum Administrators
    Replies: 3
    Last Post: 04-25-2012, 04:43 AM
  2. Where can I find Zimbra Java Developers documents
    By jemrusalem07 in forum Developers
    Replies: 0
    Last Post: 04-24-2012, 08:06 PM
  3. Replies: 6
    Last Post: 04-12-2012, 11:07 AM
  4. SOAP request to find resources?
    By mrincognito in forum Developers
    Replies: 1
    Last Post: 04-06-2009, 05:27 AM
  5. SOAP with JAVA
    By mauretto79 in forum Developers
    Replies: 1
    Last Post: 06-13-2008, 09:06 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
  •