Friday, May 25, 2012

How do I email the "originator" of a workflow?

Many customers want to include the originator of a workflow as a participant in the process.  Maybe they want to email the originator that an approval process was started on a record they saved, or perhaps that a change they made was rejected.

The SharePoint Designer workflow builder can identify the creator/updator of a SharePoint list item and use that information for the purpose of emailing the originator of the workflow.  However, with U-LINC, the workflow originator is the user account that the U-LINC Web Services has assigned.  As such, if this is an account like integrity\ulinc, the originator will not be the intended workflow participant.

The solution ...

When a user creates a U-LINC integration, the system automatically includes a "SQL User" column in the target list. This column will be populated with the user ID that made the connection to SQL Server.   If your application that is storing data in SQL is using Windows authentication, this will be populated with the Windows user ID.  You can therefore use the "SQL User" column to identify the workflow originator.

However, In the case of Dynamics GP, this will be the backoffice user ID because Dynamics GP uses SQL authentication to make the connection to SQL.  SharePoint workflow cannot email Dynamics GP user 'THOMAS', so, how do we include the true originator as a participant in the workflow for U-LINC enabled workflows?  Unfortunately, there is no one-size-fits-all answer.  The most common implementation is to create a SharePoint list ("User") that contains a column to store the Dynamics GP backoffice user ID and a column to store a "Person or Group" content type value.  This allows them to create items in the list for each Dynamics GP user, specifying the associated Active Directory user.

From our workflow builder, we lookup the Active Directory user using the SQL User value from the list item.

You will need to ensure all of your backoffice users are identified in the new SharePoint list.  One way to ensure that these records stay in sync, is to create the "User" list from our "New User Notification" template.  This includes an integration on the SY01400 table in the DYNAMICS database, the table that contains all the backoffice users.  Once you have the target "User" list, just add your Active Directory user column to the list.  Now, you can be sure that any backoffice users added to Dynamics GP will automatically be included in the list to cross reference the Active Directory user ID.  Finally, you can put a workflow on the "User" list to have your IT department identify the Active Directory user ID for all new Dynamics GP users.

And the uses for U-LINC continue to grow ...

No comments:

Post a Comment