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 CRM (Archived)

FetchXML not retrieving data, column Position

(0) ShareShare
ReportReport
Posted on by

I'm running a FetchXML query using SSRS and the FetchXML connector for CRM Online. This is what I'm running:

<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
  <entity name="systemuser">
    <attribute name="fullname" />
    <attribute name="positionid" />
    <attribute name="systemuserid" />
    <order attribute="fullname" descending="false" />
    <filter type="and">
      <condition attribute="isdisabled" operator="eq" value="0" />
    </filter>
  </entity>
</fetch>


When I run this as an advanced find in CRM, it shows the Name and the Position of the active users. When I run this using the query designer in SSRS it yields the name, but the position column is blank down the line.

Has anybody run into something like this before? Am I doing something wrong?

Thanks!

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    BharatPremji Profile Picture
    2,485 on at

    Guy,

    The first thing to check is if the right field in CRM is populated, The position field on the User record in CRM is:

    1832.Capture3.PNG

    When you put your Fetch statement into SSRS, you should see something like this:

    3580.Capture.PNG

    The positionid field should contain the Text Value of the field you need and the positionidValue field will contain the GUID.

    If you add the fields to a table in the SSRS report:

    3580.Capture2.PNG

    and run, this is what you should see:

    1832.Capture3.PNG

    Hope that helps

    Bharat

  • Guy Parisi Profile Picture
    on at

    Bharat,

    Thanks for the reply! I'm positive the field is filled in. I'm using XrmToolBox to do a fetch query against the server. Here is my updated fetch:

    <fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false" >
      <entity name="systemuser" >
        <attribute name="systemuserid" />
        <attribute name="positionid" />
        <attribute name="positionidname" />
        <attribute name="fullname" />
        <order attribute="fullname" descending="false" />
        <filter type="and" >
          <condition attribute="isdisabled" operator="eq" value="0" />
        </filter>
      </entity>
    </fetch>

    Here are the two different result sets:

    VS.png

    VS.png

    Position is clearly showing up with the XrmToolKit, but not with Visual Studio. The fetch XML is exactly the same. Does VS function differently?

  • Guy Parisi Profile Picture
    on at

    Ok, I think I figured out WHY the problem is occurring, but not how to fix it.

    It looks like my visual studio is only connecting to my test environment. I've even changed my connection string to "https://2.crm.dynamics.com&quot; and it STILL connects to my test environment. At least this gives me something to look at.

  • Verified answer
    Guy Parisi Profile Picture
    on at

    Alright! I'm in. Looks like I was just being a noob about the whole thing. changing my connection string to:

    https://<server>.crm.dynamics.com;<OrgID>

    That worked perfectly.

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 CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans