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

How do I fetch the Business Process Stages with OData API?

(0) ShareShare
ReportReport
Posted on by

The default stages appear to be Qualify, Develop, Propose and Close but these can be customised. I'd like to be able to fetch these values from the OData API but I'm not sure what Entity I can select them from.

  • Suggested answer
    btc_dynamics Profile Picture
    on at
    RE: How do I fetch the Business Process Stages with OData API?

    I had to select the workflowid and name from the workflow entity first to find the correct process. Following that I could select stagename from the processstage entity where _processid_value = workflowid

  • Emino273 Profile Picture
    19 on at
    RE: How do I fetch the Business Process Stages with OData API?

    Hello,

    maybe you have only to filter the process stages for the processid you need.

    For example if you consider the entity Work Order and look for its processes you will find that it has a specific Business Process Flow called Work Order Business Process which has three different stages (Work Order, Schedule Work Order, Close Work Order) and its unique identifier.


    Processes of Work Order entity:

    WorkOrderBPF.png

    Stages of BPF:

    8625.Stages.png

    Then if you execute your query as follow

    Xrm.WebApi.retrieveMultipleRecords("processstage", "?$select=stagename&$filter=_processid_value eq unique_identifier").then(
    	function success(results) {
    		console.log(results);
    	},
    	function(error) {
    		console.log(error.message);
    	}
    );

    you will get three records (stages of the BPF)

    apicall.png

    Best regards,

    Ema

  • btc_dynamics Profile Picture
    on at
    RE: How do I fetch the Business Process Stages with OData API?

    Hi Andrew,

    I'm not quite sure if this is correct or if I'm perhaps selecting the wrong properties. When selecting the stagename and stagecategory from processstage I was expecting < 10 results (Qualify, Propose etc.) but I get a load of results such as

    Flow_is_triggered_by_CFS_plugin

    Flow_is_started_by_IoT_plugin

    recordingsActionItemsDetails

    etc. all with stage category 0.

    I'm using this doc as a reference but perhaps it's not the same thing: learn.microsoft.com/.../processstage

    Many thanks.

  • Suggested answer
    a33ik Profile Picture
    84,329 Most Valuable Professional on at
    RE: How do I fetch the Business Process Stages with OData API?

    Hello,

    It seems that you are looking for processstage entity - stackoverflow.com/.../dynamics-365-webapi-getting-business-process-flow-stages

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,202 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,923 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans