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 😉
Leave a comment for Sebastiao Neto Cancel reply