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)

Missing EntitySet in web api metadata

(0) ShareShare
ReportReport
Posted on by 30

Hi! I'm trying to work with business process flows with the web api. I'm using Simple.OData.Client, which uses the OData metadata to make requests and parse responses. When I run the function RetrieveProcessInstances, the response body starts with

@odata.context=endpoint.crm.dynamics.com/.../v9.0$metadata#businessprocessflowinstances

However, the metadata document referenced does not contain an EntitySet named businessprocessflowinstances. This is causing an error in Simple.OData.Client when receiving the response because it doesn't know what type of objects it should be expecting.

Is there something I'm missing, or is it a bug that the response references a non-existant section of the metadata?

Thanks!

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Arun Vinoth Profile Picture
    11,615 Moderator on at

    I see this entity is available in web api documentation. You can validate this function in CRM REST builder, even execute & test it.

    docs.microsoft.com/.../businessprocessflowinstance

  • twastvedt Profile Picture
    30 on at

    Yep, all that is true. Is there a reason the EntitySet (businessprocessflowinstances) doesn't show up in the metadata though?

  • twastvedt Profile Picture
    30 on at

    Though, the entity actually doesn't show up in the web api documentation: docs.microsoft.com/.../about.

  • Suggested answer
    Arun Vinoth Profile Picture
    11,615 Moderator on at

    Scott responded in some old thread - saying that entity is not usable from SDK directly.

    community.dynamics.com/.../117642

    Still holding true for web api. Probably a MS bug.

  • Verified answer
    twastvedt Profile Picture
    30 on at

    I think I figured this out. I agree that there's a bug, as the url references a non-existent section of the metadata (#businessprocessflowinstances). RetrieveProcessInstances returns generic businessprocessflowinstance objects, which don't actually exist in the database. Instead, each instance exists as a row in the dedicated table for its business process flow type. One of the built-in BPFs, for example, is OpportunitySalesProcess, but each new BPF created gets its own table. These tables are all similar, but can have custom fields as well (I think?). So, the businessprocessflowinstance objects returned contain some fields common to the instances in the various BPF tables, as well as "_processid_value", which gives the id of the BPF in the workflows table. From there you can get the name of the BPF and use that to find the instance in the BPF's table using the "businessprocessflowinstanceid" field returned by RetrieveProcessInstance. Simple, right? ;)

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