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 3428192
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T06:55:46+00:00 2026-05-18T06:55:46+00:00

I downloaded an example application for using some web services with an online system.

  • 0

I downloaded an example application for using some web services with an online system.

I am not sure if all code below is needed but it is what I got and what I am trying to do is to use the search function.

I start by calling searchCustomer with an ID I have:

partnerRef.internalId = searchCustomer(customerID);

And the code for searchCustomer:

private string searchCustomer(string CustomerID)
        {

            string InternalID = "";

            CustomerSearch custSearch = new CustomerSearch();
            CustomerSearchBasic custSearchBasic = new CustomerSearchBasic();

            String nameValue = CustomerID;
            SearchStringField entityId = null;

                entityId = new SearchStringField();
                entityId.@operator = SearchStringFieldOperator.contains;
                entityId.operatorSpecified = true;
                entityId.searchValue = nameValue;
                custSearchBasic.entityId = entityId;

            String statusKeysValue = "";
            SearchMultiSelectField status = null;
            if (statusKeysValue != null && !statusKeysValue.Trim().Equals(""))
            {
                status = new SearchMultiSelectField();
                status.@operator = SearchMultiSelectFieldOperator.anyOf;
                status.operatorSpecified = true;
                string[] nskeys = statusKeysValue.Split(new Char[] { ',' });

                RecordRef[] recordRefs = new RecordRef[statusKeysValue.Length];
                for (int i = 0; i < nskeys.Length; i++)
                {
                    RecordRef recordRef = new RecordRef();
                    recordRef.internalId = nskeys[i];
                    recordRefs[i] = recordRef;
                }
                status.searchValue = recordRefs;
                custSearchBasic.entityStatus = status;
            }


            custSearch.basic = custSearchBasic;

            SearchResult response = _service.search(custSearch);

            if (response.status.isSuccess)
            {

                processCustomerSearchResponse(response);




                    if (seachMoreResult.status.isSuccess)
                    {

                        processCustomerSearchResponse(seachMoreResult);

                        return InternalID;
                    }
                    else
                    {
                        _out.error(getStatusDetails(seachMoreResult.status));

                    }

            }
            else
            {
                _out.error(getStatusDetails(response.status));
            }

            return InternalID;
        }

In the code above processCustomerSearchResponse gets called

processCustomerSearchResponse(response);

The code for this function is:

public string processCustomerSearchResponse(SearchResult response)
{
    string InternalID = "";
    Customer customer;

        customer = (Customer)records[0];
        InternalID = customer.internalId;

        return InternalID;
}

What the original code did was to write some output in the console but I want to return the InternalID instead. When I debug the application InternalID in processCustomerSearchResponse contains the ID I want but I don’t know how to pass it to searchCustomer so that function also returns the ID. When I debug searchCustomer InternalID is always null. I am not sure on how to edit the code under response.status.isSuccess
to return the InternalID, any ideas?

Thanks in advance.

  • 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-05-18T06:55:46+00:00Added an answer on May 18, 2026 at 6:55 am

    When you call processCustomerSearchResponse(response);, you need to store the return value in memory.

    Try modifying your code like this:

     InternalID = processCustomerSearchResponse(response);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am designing the application in Flex that connects to some web services to
When using downloaded R packages, such as tm, the given example usually loads an
I am using fedora , Unfortunately i had downloaded a package(for example 'selenium' or
I have been using the Windsor IoC Container for my web-based application, to resolve
I'm developing my application as a set of OSGi bundles using Maven 2. Some
I have a asp.net web application using MVC framework, the website allows the registrars
We're building a commandline application that needs some data from the IIS server using
I made test application in Delphi that beeps morse code using Windows API Beep
I am using DDMathParser in my application but I do not understand how to
I found a great C++/ODBC example here ... The project I downloaded builds great

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.