ml365

Sharing a little about the world of Dynamics 365 and other related technologies

Get the stage ID of a Business Process Flow (BPF)

Sometimes we need to update the stage of a GMP through code and/or Power Automate, for example, but the ID's of the stages of a GMP are not easily obtained in Dynamics. To access the IDs, as well as other information that may be useful, we need to make a call to the following API:

https://<<SUA_ORG_URL>>.dynamics.com/api/data/<<VERSAO>>/processstages?$select=stagename&$filter=processid/workflowid eq <<BPF_GUID>>

As you may have noticed, there are some passages that must be replaced with their respective values. To make it easier, you can get the Root URL by going to:

  • Advanced Settings >> Customizations >> Developer Resources
  • Service Root URL

Com a URL em mãos, é só concatenar com o trecho /processstages?$select=stagename&$filter=processid/workflowid eq <<BPF_GUID>>, onde <<BPF_GUID>> é o GUID do Business Process Flow que você deseja consultar. O resultado será parecido com isso:

To make viewing easier, you can use a tool like JSON Viewer:

Abs and see you next time 😉

2 responses to "Getting the stage ID of a Business Process Flow (BPF)"

  1. Sebastiao Neto's avatar
    Sebastiao Neto

    Great, man!
    Thanks for sharing this valuable tip!
    And congratulations on starting the project with the blog! I'm looking forward to the next content 😉

    Big hug!

    1. mdclira's avatar

      Thank you for your support, my friend! Big abs

Leave a comment for mdclira Cancel reply

Your e-mail address will not be published. Required fields are marked with *