Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Show Multi Select Option Set Values in Fetch XML Report.

Posted on by Microsoft Employee

Trying to show Multi Select Option Set Values in Fetch XML Report, but get an error the field doesn't exist when it does.

HAs anyone been able to show these in a field in a report?

*This post is locked for comments

  • Zhenyu Wang Profile Picture
    Zhenyu Wang on at
    RE: Show Multi Select Option Set Values in Fetch XML Report.

    Hi Drew,

    Do not try in XrmToolBox

    Have you tried in SSRS report in Visual Studio 2015?

    It still shows error, the attribute does not exist in that entity.

    Could you please have a try?

    Let me know your result

    Regards,

    Zhenyu

  • Suggested answer
    Drew Poggemann Profile Picture
    Drew Poggemann 9,079 on at
    RE: Show Multi Select Option Set Values in Fetch XML Report.

    Hi Graeme,

    So I just ran a test in a new instance I created.  I did the following:

    1.  Added new field (new_multioptionset) to Account and published "all customizations"

    2.  Set values on a few accounts

    3.  Ran the following fetchXML from the XrmToolBox:

    <fetch mapping='logical'>
      <entity name='account'>
          <attribute name='accountid'/>
          <attribute name='name'/>
          <attribute name='new_multioptionset'/>
          <link-entity name='systemuser' to='owninguser'>
               <filter type='and'>
                    <condition attribute='lastname' operator='ne' value='Cannon' />
               </filter>
           </link-entity>
       </entity>
    </fetch>

    4.  It returned a number of results, example below:

    A. Datum -  Selected A (100,000,000) and B (100,000,001)

    Adventure Works - Selected B (100,000,001) and C (100,000,002)

    Alpine Ski House - Selected A (100,000,000)

    multi_5F00_option2.PNG

    In my current instance it appears to be delivering the results I would expect for this.  Version 9.0.2.449 (DB 9.0.2.449) online

    Hope this helps!

  • Suggested answer
    sandeepstw Profile Picture
    sandeepstw 4,601 on at
    RE: Show Multi Select Option Set Values in Fetch XML Report.

    Hi,

    Use of Alias in FetchXML

    Follow this article - www.inogic.com/.../use-of-alias-in-fetchxml

  • Drew Poggemann Profile Picture
    Drew Poggemann 9,079 on at
    RE: Show Multi Select Option Set Values in Fetch XML Report.

    Thanks Graeme, I will review more and hope to get back to you tomorrow.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Show Multi Select Option Set Values in Fetch XML Report.

    Hi Drew, I get the error 'Object reference not set to an instance of an object.' when i put the code into the xml checker.

  • Suggested answer
    RaviKashyap Profile Picture
    RaviKashyap 55,410 on at
    RE: Show Multi Select Option Set Values in Fetch XML Report.

    Hi,

    As mentioned above, I would also suggest to check your fetchxml outside of your report. If it is a problem with fetchxml, you will be able to track it. Otherwise it would be a rendering issue at the SSRS level.

    Hope this helps.

  • Suggested answer
    Drew Poggemann Profile Picture
    Drew Poggemann 9,079 on at
    RE: Show Multi Select Option Set Values in Fetch XML Report.

    Hi Graeme,

    A couple of things here.

    First of all, you should be able to test your fetchxml online here if you like:  http://msxrmtools.com/fetchxml

    Secondly, please verify you have published all customizations, not just the entity to make sure the metadata is published.

    let me know if this does not help.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Show Multi Select Option Set Values in Fetch XML Report.

    Thanks drew.

    <?xml version="1.0"?>
    
    <fetch distinct="true" mapping="logical" output-format="xml-platform" version="1.0">
    
     <entity name="msdyn_project">
    
       <attribute name="msdyn_projectid"/>
    
       <link-entity name="msdyn_projectteam" alias="ProjectTeam" link-type="outer" to="msdyn_projectid" from="msdyn_project">
    
         <link-entity name="bookableresource" alias="BookableResource" link-type="outer" to="msdyn_bookableresourceid" from="bookableresourceid">
    
           <attribute name="new_salarytype"/>
    
         </link-entity>
    
       </link-entity>
    
     </entity>
    
    </fetch>


  • Drew Poggemann Profile Picture
    Drew Poggemann 9,079 on at
    RE: Show Multi Select Option Set Values in Fetch XML Report.

    Hi Graeme, can you paste the full code to review?  

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Show Multi Select Option Set Values in Fetch XML Report.

    Hi Drew, I had but keep getting the error its not in the system when it is.

    Obtainign it suing '<attribute name="new_salarytype"/>' via a lin entity refernce form a related record.

    It works for all the other fields i'm getting just not this multi-select option set.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans