Skip to Content
avatar image
Former Member

How to get multiple Tables in the result of a query in SDK?

I have written Query to get the Tax Numbers from Account to Sales Quote BO. The problem is that the "resultData" of the Query returns a single Table even though there are multiple tables maintained for the Selection Parameter. Code below:

var selectionParams = query.CreateSelectionParams(); selectionParams.Add(query.InternalID, "I", "EQ", BuyerPartyID);

// Result

resultData = query.Execute(selectionParams);

var TaxTypeCode;



foreach (var TCode in resultData)


if(TCode.TaxNumber.GetFirst().CountryCode == "IN" )




TaxTypeCode = resultData.TaxNumber.GetFirst().TaxTypeCode.content;

if( TaxTypeCode == "12")


if (!resultData.TaxNumber.GetFirst().TaxID.IsInitial())


this.GetFirst().AccountGSTNo = resultData.TaxNumber.GetFirst().TaxID.content; } } } } } }

In My case there should be 3 tables inside ResultData, but it returns only 1

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Apr 16, 2018 at 08:53 AM


    Which BO is the variable 'query' querying? If it's the CustomerQuote BO then you'll receive as many results as there are quotes for that customer ID. However, from the looks of it you're possibly querying the Customer BO? In which case you'll only ever receive 1 result as you can't have multiple accounts with the same ID.


    Add comment
    10|10000 characters needed characters exceeded

  • Apr 18, 2018 at 01:22 PM

    Hi Swagi,

    It seems that you did your query on InternalID of account, so it is correct that it returns you just 1 raw.

    I think you are expecting to have 3 tax numbers just for one account.

    Are you sure you have three Accounts with the same InternalID?


    Add comment
    10|10000 characters needed characters exceeded