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 :
Customer experience | Sales, Customer Insights,...
Suggested Answer

When fetching custom entity data "The given key was not present in the dictionary"

(0) ShareShare
ReportReport
Posted on by 5

Hi,

I am using a web API to get the data of an entity and I am using postman to check the API working.

This is the API is am using:

{{base_url}}/api/data/v9.0/{{custom_entity_plural_name}}

But I am getting following response from the CRM.

{

    "error": {

        "code": "0x80040265",

        "message": "The given key was not present in the dictionary."

        ............. 

    }

}

I am using on-premises version of CRM. Same API is working fine when I try to fetch other entities like accounts, contacts, leads and opportunities.

Screenshot for reference:

pastedimage1660835776210v1.png

 

Kindly guide me on this. 

Thanks & Regards

I have the same question (0)
  • Suggested answer
    - Matt Bayes - Profile Picture
    890 on at

    Hi Muhammad,

    The issue usually comes up when the table you are referencing has a different name than what you expect.

    The API endpoint references the tables based on their collection name, not their plural name (in most cases it's the same but can be different).

    My thought is that instead of "bcp_customerproducts" it might be something like "bcp_customerproductss" because of the way Microsoft builds the collection name. If you wanted to confirm this, you can just open up CRM and navigate to the API endpoint ("crmrooturl/api/data/v9.0") and see if you can locate the "bcp_customerproducts" collection. You can do a search on the webpage (Ctrl + F) and locate it that way.

    Send a screenshot of the collection name if it does match what you are searching for, and we can figure out a solution from there.

    Thanks!

    Matt Bayes

  • Muhammad Shuja Profile Picture
    5 on at

    Hi Matt,

    Thanks for the quick response.

     I tried with the suggested name "bcp_customerproductss" but get the same response.

    Then I executed this endpoint ("crmrooturl/api/data/v9.0") as you suggested. 

    This is the entity information:

    pastedimage1660848320990v2.png

    Kindly check this screenshot.

    Thanks & Regards

  • Suggested answer
    Bipin D365 Profile Picture
    28,983 Moderator on at

    Hi,

    Try installing DRB tool on your instance to auto generate the code .

    carldesouza.com/.../

    You can check the exact URL from this tool.

  • Muhammad Shuja 1 Profile Picture
    20 on at

    Hi Bipin,

    It looks like this solution will work. I tried to install this on my local system and connect it with CRM cloud version and it works fine.

    But when I connect this to on-premises CRM. I am facing following issue.

    pastedimage1661161978419v1.png

    Connection to the CRM is also successful. But getting this error.

    I tried to look for the solution but didn't find it yet.

    Is there a way if we can install older version of DRB in XrmToolBox.

  • Suggested answer
    Bipin D365 Profile Picture
    28,983 Moderator on at

    Hi,

    Download managed solution from below link and install to your on premise instance

    github.com/.../releases

    This works for on premise instance too.

  • Muhammad Shuja 1 Profile Picture
    20 on at

    Hi,

    Tried it already.

    But getting following errors one by one:

    pastedimage1661164353191v1.png

    pastedimage1661164383311v2.png

    I tried on both Chrome and Edge but same response.

    Then I tried on internet explorer, I didn't get any above error in that case, but I get empty screen.

  • Suggested answer
    Bipin D365 Profile Picture
    28,983 Moderator on at

    Hi,

    Not sure why your url says localhost:

    It has to be https:\\orgname.domain.com\instancename

  • Muhammad Shuja 1 Profile Picture
    20 on at

    Hi Bipin,

    Also tried with this:

    pastedimage1661250416612v1.png

  • Suggested answer
    Bipin D365 Profile Picture
    28,983 Moderator on at

    Hi,

    What version of crm dynamics you have installed?

    May be your CRM version is not supported by Dataverse Rest Builder.

  • Muhammad Shuja 1 Profile Picture
    20 on at

    Hi,

    I am using version 9 of crm dynamics (on premises).

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 > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 83 Super User 2025 Season 2

#2
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 49 Most Valuable Professional

#3
#ManoVerse Profile Picture

#ManoVerse 40

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans