Auto-assigning workflow-created records to the current user

Standard

One of the ‘features’ of Dynamics CRM is that if you use a workflow to generate records, the owners of those records will be the author of the workflow, NOT the current user. Generally this is undesirable.

So how do we get around this? Without too much difficulty actually.

The trick is we can use the event trigger to tell us who the current user is. For example, let’s say we have a workflow that creates a set of task records when a new account is created. While easy to set up, all the tasks will be owned by the workflow creator and not the user. However, as we know the user created the parent account (the event trigger), we can populate the task owners with the ‘created by’ of the parent account.

If the status of a record changes or the attributes are modified, use the ‘modified by’. If the record is assigned, check the owner.

There you have it. A really easy way to assign workflow records to the current user and not the workflow administrator.

Advertisements

2 thoughts on “Auto-assigning workflow-created records to the current user

  1. How can I get the current user when you run an on-demand workflow?

    I have a workflow that creates an appointment, and I want the organizer of the appointment to be the person who runs the workflow. How do I get that to happen?

    Like

  2. For on-demand workflows, the owner of the created record is the person running the workflow. So you need to do two steps. One is to create the appointment. You then insert a second step to update the appointment. You will see the form assistant now lets you select fields from the created appointment record. So you populate the appointment organiser with the appointment owner.

    Like

Leave a Reply

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