Send Holiday Request to your reporting Manager for Approval
Its a common ask from a lot of organization who use SharePoint Calendar, to send the Holiday request for approval to their reporting manager. It is not possible out of the box, but can be achieved by writing a custom workflow in SharePoint Designer 2010.
Before you start the process make sure you have User Profile Service Application configured and user profile is imported.
Below are the steps to get it done.
1. Open SharePoint Designer 2010 and get connect to the site. In my case, http://sp2010:81
2. Under the Site Objects, click on Workflows.
3. Choose List Workflows, and click on Calendar ( I am using the default calendar).
4. In the Editor, in the Step 1, type " send" and choose send email to these users. Click on these users and select browse button to add users to "To". Select User who created current item.
5. Add another Step in Editor. (Step 2)
6. Click on Actions in Ribbon, and choose Lookup Manager of the User. Click on user and choose User who created current item. In the Output variable , choose new variable and name it ManagerName.
7. So now we have Manager is of the current user who has submitted the Holiday Request. New we need to assign Task to the manager for approval or rejection.
8. You can put a "send email" steps to send email to the manager. Same as 4th point, but here you need to click on Workflow Lookup for a User . In Data Source choose Workflow Variables and Parameters & in Field from source choose ManagerName.
9. Click on Actions in Ribbon, select collect data from user.
10. Click on data, it will start a Wizard. Click Next, Enter the name for the task and suitable Description ( such as Name: Holiday Request). Click next.
11. Here you need to add a field. Click Add, give the field name as Holiday Request. Information type has to be Choice type. Click Next
12. In the column Settings, add the options that you want to give to manager, such as Approval, Reject in seperate lines. Click Finish.
13. Click this user and select ManagerName similar to point 8.
14. Click on variable and choose new variable and choose Holiday variable.
15. Almost done.... Now all we need to do it compare the Holiday variable value.
16. Add another Step ( Step 3) in the editor.
17.Click on Conditions in Ribbon and select If value equals value, click on 1st value in the condition, click on fx button. Make sure Data Source is Workflow Variables and Parameters, Field from Source Variable: ManagerName.
18. In the 2nd value field in the condition, enter Approved.
19. If this condition holds true then send an email to the Submitter (Same as point 2)
20. Add another Else if condition and this time 2nd value field in If value equals value should be Rejected.
Thats it!!.. The workflow is done!!..
Snapshots of the process will be uploaded soon in a file.