Freigeben über


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, https://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.

Comments

  • Anonymous
    March 01, 2012
    Thanks for this just what I was looking for.

  • Anonymous
    January 08, 2013
    This is awesome! I have been looking for this. I can't wait to get to work tomorrow!! I am really hoping this works! Thank you

  • Anonymous
    April 22, 2013
    Can we get a snapshot of how this should look? Excellent tutorial :)

  • Anonymous
    May 30, 2013
    Work weeks employees See Holidays request list off day no work Summer week vacations off day no work July 4th Day off days me

  • Anonymous
    May 30, 2013
    Work weeks employees See Holidays request list off days no work Summer week vacations off day no work July 4th Day off days me

  • Anonymous
    May 30, 2013
    Work weeks employees See Holidays request list off days no work Summer week vacations off days no work July 4th Day off day me

  • Anonymous
    November 08, 2013
    Where does the manager approve or reject....is that on the event?

  • Anonymous
    November 08, 2013
    Nevermind...i figured it out...it show up under the tasks.   Another question....can you make the event reflect what state it is in.... for example ... if it gets rejected, delete the event. Hide the event until it gets approved - maybe

  • Anonymous
    April 08, 2014
    Hi Roshan I know you uploaded this ages ago but I'm trying to do the same thing and your tutorial is exactly what I'm looking for! I am (funnily enough) getting snagged at Step 2 as I don't seem to have the Lookup Manager of the User option under the Actions ribbon like you said. I was thinking it may be because I haven't done this "Make sure your User Profile Service Application configured and user profile is imported." If so do you configure this in Sharepoint designer? Thanks so much for your help I'm new to all this!