SharePoint: how retrieve the user manager in an approval workflow

In SharePoint it's quite easy to find the manager of a user, for example in an approval workflow.

Here are some links explaining how to do that:

SharePoint: how deploy lists or document libraries with a predefined folder structure via CAML

In SharePoint, it's possible to deploy lists and libraries with a predefined folder structure via CAML.

Simply, in the ListInstance tag, add Row tags (inside a global Rows parent tag), as shown in Provision a folder inside a document library.

It's also possible to create nested folders using the FileDirRef tag.


For example, the xml below creates one folder (FolderA) with a nested folder (FolderBinA) with a nested folder (FolderCinB).

<?xml version="1.0" encoding="utf-8"?>

<Elements xmlns="http://schemas.microsoft.com/sharepoint/">

<ListInstance FeatureId="{00bfea71-e717-4e80-aa17-d0c71b360101}" TemplateType="101" Title="DamianoDocLib" Description="" Url="DamianoDocLib" CustomSchema="Files\DamianoDocLib\Schema.xml" HyperlinkBaseUrl="http://test_sp" RootWebOnly="FALSE" xmlns="http://schemas.microsoft.com/sharepoint/">

<Data>

<Rows>

<Row>

<Field Name="ID">1</Field>

<Field Name="ContentTypeId">0x0120003CCC413DD038BE4CAB81E6C6F4C08742</Field>

<Field Name="_ModerationStatus">0</Field>

<Field Name="FSObjType">1</Field>

<Field Name="FileLeafRef">FolderA</Field>

<Field Name="MetaInfo">1;#</Field>

<Field Name="Order">100.000000000000</Field>

<Field Name="Title">FolderA</Field>

</Row>

<Row>

<Field Name="ID">2</Field>

<Field Name="ContentTypeId">0x0120003CCC413DD038BE4CAB81E6C6F4C08742</Field>

<Field Name="_ModerationStatus">0</Field>

<Field Name="FileDirRef">FolderA</Field>

<Field Name="FSObjType">1</Field>

<Field Name="FileLeafRef">FolderBinA</Field>

<Field Name="MetaInfo">2;#</Field>

<Field Name="Order">200.000000000000</Field>

<Field Name="Title">FolderBinA</Field>

</Row>

<Row>

<Field Name="ID">3</Field>

<Field Name="ContentTypeId">0x0120003CCC413DD038BE4CAB81E6C6F4C08742</Field>

<Field Name="_ModerationStatus">0</Field>

<Field Name="FileDirRef">FolderA/FolderBinA</Field>

<Field Name="FSObjType">1</Field>

<Field Name="FileLeafRef">FolderCinB</Field>

<Field Name="MetaInfo">3;#</Field>

<Field Name="Order">300.000000000000</Field>

<Field Name="Title">FolderCinB</Field>

</Row>

</Rows>

</Data>

</ListInstance>

</Elements>