Identify all the cloudflows on a particular entity along with its messages
The easiest way to identify the flows that trigger on a particular entity with its messages is to run a SQL query using the sql4cds tool in the xrmtoolbox.
The table that has the information is callback registration, querying the call back registration table provides information about the modern flow/ cloud flow guid.
We can then join it with workflow table to retrieve all the valid information.
SELECT
CR.entityname,
CR.messagename,
WF.name AS workflow_name
FROM
workflow AS WF
INNER JOIN
callbackregistration AS CR ON WF.workflowid = CR.name
GROUP BY
CR.entityname,CR.messagename,WF.name
ORDER BY
CR.entityname,CR.messagename;
CR.entityname
: Represents the name of the entity from the callbackregistration
table.
CR.messagename
: Represents the name of the message from thecallbackregistration
table.WF.name
AS workflow_name
: Represents the name of the workflow from theworkflow
It joins the
workflow
table (aliased asWF
) with thecallbackregistration
table (aliased asCR
) using the conditionWF.workflowid =
CR.name
. This condition ensures that records are matched based on the equality of theworkflowid
column in theworkflow
table and thename
column in thecallbackregistration
table.Then Groups the results based on the columns we need/specify and orders the results.