Sunday, October 28, 2018

Dynamics 365 Workflow Scope - User or Organization

Hello mobile world,

Now this is something I didn't pay much attention until QA reported a bug. Workflow doesn't get fired when record create is synced using CRM Resco Mobile.

Workflow scope defines the level of records the workflow will be triggered on. This is something you must pay attention to as  much as the user role security. When you create a workflow in Dynamics 365 V9, by default it's set to User Scope. Workflows with user scope will trigger only for the records that user is privileged to. 


1. User
Choosing this scope means the workflow will run only on the records owned by the same user as the workflow user. This is more like a private workflow of the user.
2. Business Unit
This means the workflow will run on all records owned by the users of the same business unit as the workflow user. 
3. Parent: Child Business Unit
With this, the workflow will run on the records owned by the users of the same business unit as the workflow user as well as any child business units. 
4. Organization
The workflow will run on records owned by any user in CRM. Since it will trigger for all records, organization scope is the most used scope option.

For automatically triggered workflows, they are executed in the security context of the workflow process’s owner and not according to the user who performed the action on the record, that might trigger the workflow (if workflow scope supports).

No matter which Administrative privileges you have on your CRM User, you won't be able to trigger a workflow set to User Scope and Owned by other user. :P

And also this scope applies to all the records and logic in the workflow steps too. For example, imagine you triggered the workflow (Scope = user) on Contact record update (which your user owns) and then you are going to update the Primary Account of the Contact. To update, your User should own the relevant Account record too. Otherwise the workflow will give error.

Now, for the issue I got with CRM Resco Mobile, I had to set the workflow Scope to Organization, to allow it to trigger on Mobile data sync event.

Hope this will be useful to somebody.

1 comment: