Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8533865
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T10:03:50+00:00 2026-06-11T10:03:50+00:00

With Microsoft CRM 2011 online and using webservices, I am using below method in

  • 0

With Microsoft CRM 2011 online and using webservices, I am using below method in my Main.java using the OrganizationServiceStub class created by webservices call. The output retrieved no of records is -1 can someone help where I am going wrong. I want to retrieve the accounts where name begins with “Tel” without giving the accountid. I can see the data exists in CRM.
Thanks

public static void getAccountDetails(OrganizationServiceStub service, ArrayOfstring fields)
{
    try{
    ArrayOfanyType aa = new ArrayOfanyType();   
    aa.setAnyType(new String[] {"Tel"});

    ConditionExpression condition1 = new ConditionExpression();
    condition1.setAttributeName("name");


    condition1.setOperator(ConditionOperator.BeginsWith);
    condition1.setValues(aa);

    ArrayOfConditionExpression ss = new ArrayOfConditionExpression();
    ss.setConditionExpression(new ConditionExpression[] {condition1});

    FilterExpression filter1 = new FilterExpression();
    filter1.setConditions(ss);

    QueryExpression query = new QueryExpression();
    query.setEntityName("account");

    ColumnSet cols = new ColumnSet();
    cols.setColumns(fields);
    query.setColumnSet(cols);

    query.setCriteria(filter1);

    RetrieveMultiple ll = new RetrieveMultiple();
    ll.setQuery(query);

    RetrieveMultipleResponse result1 = service.retrieveMultiple(ll);

    EntityCollection accounts = result1.getRetrieveMultipleResult();

    System.out.println(accounts.getTotalRecordCount());        
} 
catch (IOrganizationService_RetrieveMultiple_OrganizationServiceFaultFault_FaultMessage e) {
    logger.error(e.getMessage());
    e.printStackTrace();
} 
catch (RemoteException e) {
    logger.error(e.getMessage());
    e.printStackTrace();
}
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T10:03:51+00:00Added an answer on June 11, 2026 at 10:03 am

    Not sure how similar your EntityCollection object is to the .Net version in the SDK, however you need to specify ReturnTotalRecordCount in the query’s PagingInfo in .Net for the TotalRecordCount property to have a value. Could you not instead check accounts.Entities.Count?

    Note: I’m not a Java guy either…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Our client is using Microsoft CRM 2011 outlook client and they have a unique
Environment I am using the native document management integration between Microsoft Dynamics CRM 2011
I have a file that I want to import into Microsoft Dynamics CRM 2011
Is there a way to add a deployment administrator to Microsoft CRM 4.0 using
In Microsoft Dynamics CRM 2011, I wrote one plug-in in C# for Account entity
I've recently been toying with data migration into Microsoft Dynamics CRM using MS SQL
I'm trying to install MS CRM 2011, and I continually get the Action Microsoft.Crm.Setup.Server.InstallConfigDatabaseAction
I am trying to use the Microsoft CRM 4 webservices. However, I get the
I am building custom reports in Microsoft CRM and am using the CRM_URL parameter
Background Workflows and dialog processes in CRM 2011 (and CRM Online) allow us to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.