web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

ASP.NET C# DropDown with multiple column values using QueryService - AIF AX 2012 R3

(0) ShareShare
ReportReport
Posted on by 1,215

Hi,

I have a DropDown control on an aspx page which consumes a QueryService in AIF of AX 2012 R3.

The query has CustTable in it and I am able to get the AccountNum column in the DropDown.

Now I want to concatenate the AccounNum with the name of the customer, but the DropDown can be assigned to only one data table (if I am correct).

Could there be any way to achieve this?

Any help is appreciated!

Regards,

Abhinay Tharwal

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Abhinay Tharwal Profile Picture
    1,215 on at

    This is how I achieved it:

    foreach (DataRow dr in dataSet.Tables[0].Rows)
    {
        DataRow[] foundRows = dataSet.Tables[1].Select("RecId = " + dr["Party"]);
    
        foreach (DataRow drParty in foundRows)
        {
            string NameStr =  dr["AccountNum"] + ":" + drParty["Name"].ToString();
            string custNum = dr["AccountNum"].ToString();
            ddlCustomers.Items.Add(new ListItem(NameStr, custNum));
        }    
    }


Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans