To support compliance and reporting capabilities we will define a custom list that can be used for logging all of the delegation entries in a central list. This list can also be used to show a user what tasks were delegated on their behalf as we will see when we define the View Delegation History page referenced from the Task Delegation Web Part.
We will provision a List Definition and List Instance to store the notification content. This will make it easy to reuse the list, if necessary, in cases where you need to manage the notifications separately for sites that target different sets of users or in different farms.
To create the feature:
DelegationDefinition
. Delegation
. DelegationDefinition/Elements.xml
file and add in the content for Elements.xml
. SiteName
field we would define a Text
field with the following elements:<Field Type="Text" DisplayName="Site Name" Required="TRUE" MaxLength="255" ID="{F0A3BFF6-F8F9-40E2-8031-2FEFD66FE8F3}" StaticName="SiteName" Name="SiteName" Group="Compliance Columns" />
ListName
field we would define a Text
field with the following elements:<Field Type="Text" DisplayName="List Name" Required="TRUE" ID="{F6057985-C41D-4A30-8342-FF4E815BA51F}" StaticName="ListName" Name="ListName" Group="Compliance Columns" />
WorkflowName
field we would define a Text
field with the following elements:<Field Type="Text" DisplayName="Workflow Name" Required="TRUE" ID="{4B57EC1E-C6CD-4197-ABEF-81754013DDD4}" StaticName="WorkflowName" Name="WorkflowName" Group="Compliance Columns" />
OrigUser
field we would define a User
field with the following elements:<Field Type="User" DisplayName="Original User" Required="TRUE" ID="{68C1C89A-324D-48C3-AB1E-26AA7003A37F}" StaticName="OrigUser" Name="OrigUser" Group="Compliance Columns" />
DelegUser
field we would define a User
field with the following elements:<Field Type="User" DisplayName="Delegate User" Required="TRUE" ID="{83856973-C1B3-401A-8687-52633D8B2ADC}" StaticName="DelegUser" Name="DelegUser" Group="Compliance Columns" />
LogDate
field we would define a DateTime
field with the following elements:<Field Type="DateTime" DisplayName="Log Date" Required="FALSE" ID="{EF890C5F-0DE6-44D6-B994-BC269E830E0E}" StaticName="LogDate" Name="LogDate" Group="Compliance Columns" />
ID
field associated with the base content type item:<ContentType ID="0x010089E3E6DB8C9B4B3FBB980447E313CE97" Name="Delegation Log Entry" Group="Compliance Content Types" Description="Delegation Log Content Type." Version="0"> <FieldRefs> <FieldRef ID="{fa564e0f-0c70-4ab9-b863-0177e6ddd247}" /> <FieldRef ID="{F0A3BFF6-F8F9-40E2-8031-2FEFD66FE8F3}" /> <FieldRef ID="{F6057985-C41D-4A30-8342-FF4E815BA51F}" /> <FieldRef ID="{4B57EC1E-C6CD-4197-ABEF-81754013DDD4}" /> <FieldRef ID="{68C1C89A-324D-48C3-AB1E-26AA7003A37F}" /> <FieldRef ID="{83856973-C1B3-401A-8687-52633D8B2ADC}" /> <FieldRef ID="{EF890C5F-0DE6-44D6-B994-BC269E830E0E}" /> </FieldRefs> </ContentType>
ListTemplate
element which completes the configuration for the new List Definition:<ListTemplate Name="DelegationDefinition" DisallowContentTypes="FALSE" Type="12002" BaseType="0" OnQuickLaunch="FALSE" SecurityBits="11" Sequence="411" DisplayName="Delegation List Definition" Description="Delegation List Definition" Image="/_layouts/images/itgen.png"/> </Elements>
Since this list is primarily for administrative purposes, and not for general site content, it is a good idea to provide a link to the list on the Site Settings page. To add a link to any of the standard menus or ribbon, you will need to define a custom action. The groups of links are called action groups, and in order to distinguish this action from the other standard actions, we will also define a custom action group.
To create the custom action:
ComplianceActionGroup
as displayed in the Add New Item form in the previous screenshot. Elements.xml
to define the custom action group as follows:<CustomActionGroup Id="e5086212-6073-47e4-9f83-085e3d30d8df" Title="Compliance" Description="SPBlueprints Compliance Items" Location="Microsoft.SharePoint.SiteSettings" ImageUrl= "/_layouts/images/SPBlueprints/SPBlueprints_Bullet.png" />
With the action group defined, we can now define our custom action as follows:
ViewDelegationLog
as displayed in the following screenshot: Elements.xml
file with the following content to complete the configuration of the CustomAction
definition:<CustomAction Description="View Delegation Log" GroupId="e5086212-6073-47e4-9f83-085e3d30d8df" Id="cdbb5ebd-8599-41d2-8e54-c332d03242c1" Location="Microsoft.SharePoint.SiteSettings" RegistrationType="ContentType" RegistrationId="0x010089E3E6DB8C9B4B3FBB980447E313CE97" RequireSiteAdministrator="true" Rights="ManageWeb" Sequence="12001" Title="View Delegation Log"> <UrlAction Url="Lists/Delegation" /> </CustomAction>
With all of the project items created we can now finalize the SPBlueprints Delegation List Feature.
To configure the SPBlueprints Delegation List Feature:
SPBlueprints Delegation List Feature.feature
item and provide a Title and Description. It should resemble the next screenshot. SPBlueprints.Lists.Delegation.
The completed project structure should resemble the following screenshot:
18.223.172.224