Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

How to use $count with expand?

Posted on by 420

Here's my query :
https://[org].com/api/data/v8.0/new_profiles([guid])?$expand=new_Profile_ProfileTeam&$count=true
However it only returns the profile team and not the count. Anyone know how to do this?

*This post is locked for comments

  • anonsgate Profile Picture
    anonsgate 420 on at
    RE: How to use $count with expand?

    Yes it works if I remove the GUID but then I get the count of all the profile teams. I want the count of profile teams for a specific profile.

  • Suggested answer
    ashlega Profile Picture
    ashlega 34,475 on at
    RE: How to use $count with expand?

    Hi,

     try removing the GUID - will you see the count?

    https://[org].com/api/data/v8.0/new_profiles?$expand=new_Profile_ProfileTeam&$count=true

    I have a feeling you don't see it for a specific GUID since it would not make sense (it's a single record all the time.. assuming that GUID is correct)

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,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans