Understanding Security Context in CRM 4 Workflow.

A “on demand” workflow runs under the security context of the user who ran that workflow using the “Run workflow” option.

In all other cases workflow would always run under the context of the user who owns that workflow.

Let’s take a simple example to understand this

Suppose this is our workflow, which is registered against lead entity and which runs while a lead record is created and can be run “on demand” as well. It updates one of the fields in the lead record.

wf1

The owner of the record is “Nishant Rana” i.e. me.
Now if i log into the CRM and create a new lead record. The workflow would get triggered and update the record.

Now if we check the properties we would find this

wf1 

Now suppose another user logs into CRM and creates a new lead record. The workflow would get triggered and it will update the lead record.

Here it would show the workflow owner’s name for the modified by field.

wf3

And if the same user is running the workflow manually using “Run Workflow” option, the modified by would get updated with the uuser’s name and not the owner of the workflow.

wf4

Bye..


Author: Nishant Rana

I love working in and sharing everything about Microsoft.NET technology !

2 thoughts on “Understanding Security Context in CRM 4 Workflow.”

Share your thoughts

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s