This is what I require:
In this example I just want to send an e-mail to a specific group of people, the approvers. If you want to send an e-mail to the user’s manager, you can use the Lookup Manager of a User workflow action or create an additional list, containing the employee/manager relation where you can look it up.
To identify if an event requires approval, I created a new Yes/No column called “Approval required” in the “Scheduled Events” list.
Open the enrollment list’s list settings, click on versioning settings and activate content approval.
If content approval is activated in the enrollment list and a user enrolls, the enrollment stays pending until it is approved. Once approved, the invitation e-mail is sent to the user.
Open the enrollment list in SharePoint designer…
…and create a new workflow.
Create an impersonation step to ensure the permissions are sufficient.
A SharePoint designer workflow always runs under the permissions of the user who started the workflow. Since the user may not have permission to approve the enrollment, I used the impersonation step to run this section under the identity of the person who authored the workflow rather than the workflow’s initiator.
In the impersonation step I need the following ‘if any value equals value’ condition:
The value I’m looking for is in the Scheduled Events list and the field is “Approval required”.
To find the correct item I matched the ID of the event with the ID of the event lookup in the enrollment (Current Item)
In the Employee Training Management this field is called “Training Event” instead of “Event”.
This is what it should look like:
And this value should be equal to “Yes”.
So if “Approval required” is equal to “Yes” I want to send an e-mail.
I previously created a SharePoint group, the Approvers. The members of this group should receive the e-mail.
In my case the e-mail looks like this:
The important part is the link.
This is the link to the approval page for the enrollment. To get the correct list ID I opened the enrollment list’s list settings and copied the GUID from the address bar.
Now let’s move to the “Else” section. If approval is not required, I just want to approve the enrollment automatically. To do this I used the “Set Content Approval Status” action.
OK. Now let’s make sure the workflow starts when an item is created.
Finally let’s publish the workflow.
In the list settings of the enrollment list I clicked on “Permissions for this list” and “Stop Inheriting Permissions”.
The next step is to grant permissions to the approvers.
In this example I assign them the Design permission level. If you want to assign more accurate permissions, you can also create your own permission level.
OK, that should be it. Let’s test it.
To test everything, I created two events, one that requires content approval and one that doesn’t.
If I enroll in the event that requires content approval, I immediately receive the e-mail that I configured in the workflow.
The link opens the following page:
If I approve the enrollment, the user immediately receives the invitation to the event.
The second test is to enroll in an event that does not require approval. In this case the user receives the invitation immediately after registering.
I hope you found it useful, it’s a very simple workflow that basically just sends an email with a link to the approval page. Of course you can also use the Approval process action instead. This also creates and assigns task to the approvers.
If you have problems configuring the workflow or any other questions, please send an e-mail to email@example.com or post a comment.