Sweez
6 days agoContributor
Function to get the workflow to which an entity is assinged?
Is there a function, or other method, to get the workflow an enitty is assigned to, if it is assigned? Seems like an there should be an api for this but for the life of me I can not find it. Thanks...
- 13 hours ago
All the api functions approach from the workflow aspect to show the hierarchy and the workflow attributes. And the Entity is an attribute of the workflow. The options you have are to use the existing api calls such as BRApi.Workflow.Metadata.GetProfileEntities or query the WorkflowProfileEntities table something like this:
SELECT WPH.ProfileName FROM WorkflowProfileEntities AS WPE INNER JOIN Member AS M ON WPE.EntityMemberID = M.MemberId INNER JOI WorkflowProfileHierarchy AS WPH ON WPE.WorkflowProfileKey = WPH.ProfileKey WHERE (M.DimTypeId = 0) AND (M.Name = 'myentity')