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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T18:51:00+00:00 2026-06-03T18:51:00+00:00

I want to query the values from the different Picklist in Opportunity in dynamics

  • 0

I want to query the values from the different Picklist in Opportunity in dynamics CRM 4.0. I don’t want to query the actual Opportunity, just the values from the Picklist. So if I have a Picklist called Source and it has the values of 1, 2, 3, 4, 5. I want to query the picklist and get back those values. Is this possible? If so, how in the world do you do it?

I use Java (JAX-WS), but a .NET example is also welcome, due to the use of the same base entities.

What I’ve tried. I’ve setup the following query:

// Set up query ...
QueryExpression query = new QueryExpression();
query.setEntityName("picklistmapping");
// Set up columns to retrieve ...
// Add columns to retrieve to the query ...
query.setColumnSet(new AllColumns());

But this query, returns an empty result!

For the record, this is a copy of the following question: Query the Description Value of a Picklist. Difference: that question is about dynamics CRM 2011, mine is about dynamics crm 4.0! The accepted answer of that question says something with the class ‘RetrieveAttributeRequest’. Except mine wsdl didn’t generate that class, so I guess that’s specific for dynamics crm 2011.

  • 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-03T18:51:02+00:00Added an answer on June 3, 2026 at 6:51 pm

    You should use Metadata Service for that purpose. And here is the similar question, where you can find code sample.

    RetrieveAttributeRequest attributeRequest = new RetrieveAttributeRequest();
    attributeRequest.EntityLogicalName = <your entity name>;
    attributeRequest.LogicalName = <your picklist attribute name>;
    attributeRequest.RetrieveAsIfPublished = true;
    
    RetrieveAttributeResponse response = (RetrieveAttributeResponse)metaService.Execute(attributeRequest);
    PicklistAttributeMetadata picklist = (PicklistAttributeMetadata)response.AttributeMetadata;
    
    
    foreach (Option o in picklist.Options)
    {
        // do something e.g. take o.ValueValue
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to query the values from the different Picklist in Opportunity. I don't
I want to order values from database query by date but I want also
I want to get the query name and values to be displayed from a
In my Project i don't want to show query string values to users. For
I want to do a ranking grid. I have a table with different values
i have a query which i want to simplify: select sequence, 1 added from
I have data in two tables that I want to query from. Each table
I have different queries fetching from different tables in one single page. i want
I have a user table from which I want all values, so I have
I want to make a query which returns me some values between two dates

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.