This Publishing feature Activation Dependency within the elements.xml ensures that your custom feature gets activated only when Publishing feature is enabled on your respective site collection. Copy and paste the code below in your custom feature project elements.xml file -
<ActivationDependencies>
<ActivationDependency FeatureTitle="Publishing Infrastructure" FeatureDescription="Publishing Infrastructure need to be activated prior to deploying the Custom PageLayouts, Site Content Types and Site Columns feature." FeatureId="f6924d36-2fa8-4f0b-b16d-06b7250180fa" />
</ActivationDependencies>
If the scope of your feature is Web, then you can even ensure whether Publishing site feature has been activated on your subsite as well:
<ActivationDependency FeatureTitle="SharePoint Server Publishing" FeatureDescription="Option to create Custom Page Layouts will not be visible, unless you activate SharePoint Server Publishing feature at the web level." FeatureId="94c94ca6-b32f-4da9-a9e3-1f3d343d7ecb" />
Mehul Bhuva is an AI and Data Platform Engineer bringing two decades of specialized experience across Microsoft's technology ecosystem. His proficiency spans Azure, Databricks, Microsoft AI Foundry, Azure Data Factory, Blazor/Angular frameworks, Powershell and Power BI.
Wednesday, November 24, 2010
Monday, November 22, 2010
Power Shell .wsp deployment scripts for SharePoint 2010
Copy the PowerShell scriptlet below and paste it in a notepad, modify your Site Collection URL in the code marked in yellow below and save it with a .ps1 extension.
Also have a look at Powershell script to deploy multiple solutions (.wsp) to your site collection. See the full post here: http://www.sharepointfix.com/2011/07/powershell-script-to-deploy-multiple.html
=======================================================================
Add-PsSnapin Microsoft.SharePoint.PowerShell
#Do not modify anything in the script from here onwards
function Get-ScriptDirectory
{
$Invocation = (Get-Variable MyInvocation -Scope 1).Value
Split-Path $Invocation.MyCommand.Path
}
#solutions to deploy
$SolutionName="PrintListItem.wsp"
$SolutionPath = Join-Path (Get-ScriptDirectory) $SolutionName
echo "Extracting information from $SolutionPath"
$SolutionPath= $SolutionPath
$FeatureName="PrintListItem_Feature1"
#Feature name
$FeatureID= $(Get-SPFeature -limit all | ? {($_.displayname -eq $FeatureName)}).Id
$SingleSiteCollection = Get-SPSite $SiteUrl
#Admin service
$AdminServiceName = "SPAdminV4"
$IsAdminServiceWasRunning = $true;
if ($(Get-Service $AdminServiceName).Status -eq "Stopped")
{
$IsAdminServiceWasRunning = $false;
Start-Service $AdminServiceName
Write-Host 'SERVICE WAS STOPPED, SO IT IS NOW STARTED'
}
Write-Host 'DEACTIVATING FEATURE ...'
Disable-SPFeature -Identity $FeatureName -Url $SiteUrl -Confirm:$false
Write-Host 'FEATURE HAS BEEN DEACTIVATED SUCCESSFULLY.'
#Uninstall
Write-Host 'UNINSTALLING SOLUTION ...'
$Solution = Get-SPSolution | ? {($_.Name -eq $SolutionName) -and ($_.Deployed -eq $true)}
if ($Solution -ne $null)
{
if($Solution.ContainsWebApplicationResource)
{
Uninstall-SPSolution $SolutionName -AllWebApplications -Confirm:$false
}
else
{
Uninstall-SPSolution $SolutionName -Confirm:$false
}
}
while ($Solution.JobExists)
{
Start-Sleep 2
}
Write-Host 'SOLUTION HAS BEEN UNINSTALLED SUCCESSFULLY.'
Write-Host 'REMOVING SOLUTION ...'
if ($(Get-SPSolution | ? {$_.Name -eq $SolutionName}).Deployed -eq $false)
{
Remove-SPSolution $SolutionName -Confirm:$false
Write-Host 'SOLUTION HAS BEEN REMOVED SUCCESSFULLY.'
}
Write-Host 'ADDING SOLUTION ...'
Add-SPSolution $SolutionPath | Out-Null
Write-Host 'SOLUTION HAS BEEN ADDED SUCCESSFULLY.'
Write-Host 'DEPLOYING SOLUTION ...'
$Solution = Get-SPSolution | ? {($_.Name -eq $SolutionName) -and ($_.Deployed -eq $false)}
#use '-force' paramater to install all commands in this if statement
if(($Solution -ne $null) -and ($Solution.ContainsWebApplicationResource))
{
Install-SPSolution $SolutionName –AllwebApplications -GACDeployment -Force -Confirm:$false
}
else
{
Install-SPSolution $SolutionName -GACDeployment -Force -Confirm:$false
}
while ($Solution.Deployed -eq $false)
{
Start-Sleep 2
}
Write-Host 'SOLUTION HAS BEEN DEPLOYED SUCCESSFULLY.'
Write-Host 'ACTIVATING FEATURE ...'
if ($FeatureName -ne $null)
{
Enable-SPFeature -Identity $FeatureName -Url $SiteUrl -Confirm:$false
}
#message
Write-Host 'FEATURE HAS BEEN ACTIVATED SUCCESSFULLY.'
if (-not $IsAdminServiceWasRunning)
{
Stop-Service $AdminServiceName
}
Remove-PsSnapin Microsoft.SharePoint.PowerShell
Echo Finish
=====================================================================
Now create a new notepad file and copy the code mentioned below, and then save the below mentioned code in a .bat file to automate the PowerShell deployment.
cd /d %~dp0
powershell -noexit -file ".PrintListItemDeploymentScript.ps1" "%CD%"
pause
Also have a look at Powershell script to deploy multiple solutions (.wsp) to your site collection. See the full post here: http://www.sharepointfix.com/2011/07/powershell-script-to-deploy-multiple.html
=======================================================================
Add-PsSnapin Microsoft.SharePoint.PowerShell
#Site Collection URL - Give your site collection url in quotation marks
$SiteUrl="http://localhost"#Do not modify anything in the script from here onwards
function Get-ScriptDirectory
{
$Invocation = (Get-Variable MyInvocation -Scope 1).Value
Split-Path $Invocation.MyCommand.Path
}
#solutions to deploy
$SolutionName="PrintListItem.wsp"
$SolutionPath = Join-Path (Get-ScriptDirectory) $SolutionName
echo "Extracting information from $SolutionPath"
$SolutionPath= $SolutionPath
$FeatureName="PrintListItem_Feature1"
#Feature name
$FeatureID= $(Get-SPFeature -limit all | ? {($_.displayname -eq $FeatureName)}).Id
$SingleSiteCollection = Get-SPSite $SiteUrl
#Admin service
$AdminServiceName = "SPAdminV4"
$IsAdminServiceWasRunning = $true;
if ($(Get-Service $AdminServiceName).Status -eq "Stopped")
{
$IsAdminServiceWasRunning = $false;
Start-Service $AdminServiceName
Write-Host 'SERVICE WAS STOPPED, SO IT IS NOW STARTED'
}
Write-Host 'DEACTIVATING FEATURE ...'
Disable-SPFeature -Identity $FeatureName -Url $SiteUrl -Confirm:$false
Write-Host 'FEATURE HAS BEEN DEACTIVATED SUCCESSFULLY.'
#Uninstall
Write-Host 'UNINSTALLING SOLUTION ...'
$Solution = Get-SPSolution | ? {($_.Name -eq $SolutionName) -and ($_.Deployed -eq $true)}
if ($Solution -ne $null)
{
if($Solution.ContainsWebApplicationResource)
{
Uninstall-SPSolution $SolutionName -AllWebApplications -Confirm:$false
}
else
{
Uninstall-SPSolution $SolutionName -Confirm:$false
}
}
while ($Solution.JobExists)
{
Start-Sleep 2
}
Write-Host 'SOLUTION HAS BEEN UNINSTALLED SUCCESSFULLY.'
Write-Host 'REMOVING SOLUTION ...'
if ($(Get-SPSolution | ? {$_.Name -eq $SolutionName}).Deployed -eq $false)
{
Remove-SPSolution $SolutionName -Confirm:$false
Write-Host 'SOLUTION HAS BEEN REMOVED SUCCESSFULLY.'
}
Write-Host 'ADDING SOLUTION ...'
Add-SPSolution $SolutionPath | Out-Null
Write-Host 'SOLUTION HAS BEEN ADDED SUCCESSFULLY.'
Write-Host 'DEPLOYING SOLUTION ...'
$Solution = Get-SPSolution | ? {($_.Name -eq $SolutionName) -and ($_.Deployed -eq $false)}
#use '-force' paramater to install all commands in this if statement
if(($Solution -ne $null) -and ($Solution.ContainsWebApplicationResource))
{
Install-SPSolution $SolutionName –AllwebApplications -GACDeployment -Force -Confirm:$false
}
else
{
Install-SPSolution $SolutionName -GACDeployment -Force -Confirm:$false
}
while ($Solution.Deployed -eq $false)
{
Start-Sleep 2
}
Write-Host 'SOLUTION HAS BEEN DEPLOYED SUCCESSFULLY.'
Write-Host 'ACTIVATING FEATURE ...'
if ($FeatureName -ne $null)
{
Enable-SPFeature -Identity $FeatureName -Url $SiteUrl -Confirm:$false
}
#message
Write-Host 'FEATURE HAS BEEN ACTIVATED SUCCESSFULLY.'
if (-not $IsAdminServiceWasRunning)
{
Stop-Service $AdminServiceName
}
Remove-PsSnapin Microsoft.SharePoint.PowerShell
Echo Finish
=====================================================================
Now create a new notepad file and copy the code mentioned below, and then save the below mentioned code in a .bat file to automate the PowerShell deployment.
cd /d %~dp0
powershell -noexit -file ".PrintListItemDeploymentScript.ps1" "%CD%"
pause
Friday, November 19, 2010
Custom Ribbon Actions in SharePoint 2010 - Elements.xml
Custom action to add a Ribbon button in the Display Form of a SharePoint List:
<CustomAction Description="Prints a single List Item" Title="Print List Item" Id="{055c63b4-58d8-4b4a-a366-70f69257b491}" Location="CommandUI.Ribbon.DisplayForm" RegistrationId="100" RegistrationType="List" Sequence="0" Rights="ViewListItems" xmlns="http://schemas.microsoft.com/sharepoint/">
<UrlAction Url="~site/_layouts/PrintListItem/PrintListItem.aspx?List={ListId}&ID={ItemId}" />
<CommandUIExtension xmlns="http://schemas.microsoft.com/sharepoint/">
<CommandUIDefinitions>
<CommandUIDefinition Location="Ribbon.ListForm.Display.Manage.Controls._children">
<Button Id="{C75857A4-C0BC-439A-813A-A1DCC885A14A}" Command="{06000B27-86BB-4203-AF44-29F61FDA678D}" Image32by32="~site/_layouts/Icon/PrintIcon.jpg" Image16by16="~site/_layouts/Icon/PrintIcon.jpg" Sequence="0" LabelText="Print List Item" Description="Prints a Single List Item" TemplateAlias="o1" />
</CommandUIDefinition>
</CommandUIDefinitions>
<CommandUIHandlers>
<CommandUIHandler Command="{06000B27-86BB-4203-AF44-29F61FDA678D}" CommandAction="~site/_layouts/PrintListItem/PrintListItem.aspx?List={ListId}&ID={ItemId}" />
</CommandUIHandlers>
</CommandUIExtension>
</CustomAction>
Custom action to add a Ribbon button in the Display Form of a SharePoint Task List:
<CustomAction Description="Prints a single List Item" Title="Print List Item" Id="{055c63b4-58d8-4b4a-a366-70f69257b491}" Location="CommandUI.Ribbon.DisplayForm" RegistrationId="107" RegistrationType="List" Sequence="1000" Rights="ViewListItems" xmlns="http://schemas.microsoft.com/sharepoint/">
<UrlAction Url="~site/_layouts/PrintListItem/PrintListItem.aspx?List={ListId}&ID={ItemId}" />
<CommandUIExtension xmlns="http://schemas.microsoft.com/sharepoint/">
<CommandUIDefinitions>
<CommandUIDefinition Location="Ribbon.ListForm.Display.Manage.Controls._children">
<Button Id="{C75857A4-C0BC-439A-813A-A1DCC885A14A}" Command="{06000B27-86BB-4203-AF44-29F61FDA678D}" Image32by32="~site/_layouts/Icon/PrintIcon.jpg" Image16by16="~site/_layouts/Icon/PrintIcon.jpg" Sequence="1000" LabelText="Print List Item" Description="Prints a Single List Item" TemplateAlias="o1" />
</CommandUIDefinition>
</CommandUIDefinitions>
<CommandUIHandlers>
<CommandUIHandler Command="{06000B27-86BB-4203-AF44-29F61FDA678D}" CommandAction="~site/_layouts/PrintListItem/PrintListItem.aspx?List={ListId}&ID={ItemId}" />
</CommandUIHandlers>
</CommandUIExtension>
</CustomAction>
Custom action to add a Ribbon button in the Display Form of a SharePoint Document Library:
<CustomAction Description="Prints a single List Item" Title="Print List Item" Id="{055c63b4-58d8-4b4a-a366-70f69257b491}" Location="CommandUI.Ribbon.DisplayForm" RegistrationId="101" RegistrationType="List" Sequence="1000" Rights="ViewListItems" xmlns="http://schemas.microsoft.com/sharepoint/">
<UrlAction Url="~site/_layouts/PrintListItem/PrintListItem.aspx?List={ListId}&ID={ItemId}" />
<CommandUIExtension xmlns="http://schemas.microsoft.com/sharepoint/">
<CommandUIDefinitions>
<CommandUIDefinition Location="Ribbon.ListForm.Display.Manage.Controls._children">
<Button Id="{C75857A4-C0BC-439A-813A-A1DCC885A14A}" Command="{06000B27-86BB-4203-AF44-29F61FDA678D}" Image32by32="~site/_layouts/Icon/PrintIcon.jpg" Image16by16="~site/_layouts/Icon/PrintIcon.jpg" Sequence="1000" LabelText="Print List Item" Description="Prints a Single List Item" TemplateAlias="o1" />
</CommandUIDefinition>
</CommandUIDefinitions>
<CommandUIHandlers>
<CommandUIHandler Command="{06000B27-86BB-4203-AF44-29F61FDA678D}" CommandAction="~site/_layouts/PrintListItem/PrintListItem.aspx?List={ListId}&ID={ItemId}" />
</CommandUIHandlers>
</CommandUIExtension>
</CustomAction>
Custom action to add an item in the Edit Control Block of a SharePoint List:
<CustomAction Id="PrintListItem.ItemToolbar"
GroupId="PrintListItem"
RegistrationType="List"
RegistrationId="100"
Location="EditControlBlock"
Sequence="100"
Title="Print List Item"
ImageUrl ="/_layouts/Icon/PrintIcon.jpg">
<UrlAction Url="~site/_layouts/PrintListItem/PrintListItem.aspx?List={ListId}&ID={ItemId}"/>
</CustomAction>
Custom action to add an item in the Edit Control Block of a SharePoint Task List:
<CustomAction Id="PrintListItem.ItemToolbar" GroupId="PrintListItem" RegistrationType="List" RegistrationId="107" Location="EditControlBlock" Sequence="300" Rights="ViewListItems"
Title="Print List Item" ImageUrl ="/_layouts/Icon/PrintIcon.jpg"><UrlAction Url="~site/_layouts/PrintListItem/PrintListItem.aspx?List={ListId}&ID={ItemId}"/></CustomAction>
Custom action to add an item in the Edit Control Block of a SharePoint Document Library:
<CustomAction Id="PrintListItem.ItemToolbar"
GroupId="PrintListItem"
RegistrationType="List"
RegistrationId="101"
Location="EditControlBlock"
Sequence="300"
Rights="ViewListItems"
Title="Print List Item"
ImageUrl ="/_layouts/Icon/PrintIcon.jpg">
<UrlAction Url="~site/_layouts/PrintListItem/PrintListItem.aspx?List={ListId}&ID={ItemId}"/>
<!--<UrlAction Url="javascript:window.open('{SiteUrl}/_layouts/PrintListItem/PrintListItem.aspx?List={ListId}&ID={ItemId}','PrintListItem','height=600,width=800,resizable=yes,scrollbars=1');"/>-->
</CustomAction>
Custom action to add a Ribbon item in the SharePoint 2010 Standard Actions Menu of a SharePoint List:
<CustomAction GroupId="ActionsMenu" Location="Microsoft.SharePoint.StandardMenu" Sequence="1000" Title="Print List Item" ImageUrl="/_layouts/Icon/PrintIcon.jpg" Description="Print list item" RegistrationType="List">
<UrlAction Url="~site/_layouts/PrintListItem/PrintListItem.aspx?List={ListId}&ID={ItemId}" />
</CustomAction>
Will keep updating this post with more Custom Action elements in the future.
<CustomAction Description="Prints a single List Item" Title="Print List Item" Id="{055c63b4-58d8-4b4a-a366-70f69257b491}" Location="CommandUI.Ribbon.DisplayForm" RegistrationId="100" RegistrationType="List" Sequence="0" Rights="ViewListItems" xmlns="http://schemas.microsoft.com/sharepoint/">
<UrlAction Url="~site/_layouts/PrintListItem/PrintListItem.aspx?List={ListId}&ID={ItemId}" />
<CommandUIExtension xmlns="http://schemas.microsoft.com/sharepoint/">
<CommandUIDefinitions>
<CommandUIDefinition Location="Ribbon.ListForm.Display.Manage.Controls._children">
<Button Id="{C75857A4-C0BC-439A-813A-A1DCC885A14A}" Command="{06000B27-86BB-4203-AF44-29F61FDA678D}" Image32by32="~site/_layouts/Icon/PrintIcon.jpg" Image16by16="~site/_layouts/Icon/PrintIcon.jpg" Sequence="0" LabelText="Print List Item" Description="Prints a Single List Item" TemplateAlias="o1" />
</CommandUIDefinition>
</CommandUIDefinitions>
<CommandUIHandlers>
<CommandUIHandler Command="{06000B27-86BB-4203-AF44-29F61FDA678D}" CommandAction="~site/_layouts/PrintListItem/PrintListItem.aspx?List={ListId}&ID={ItemId}" />
</CommandUIHandlers>
</CommandUIExtension>
</CustomAction>
Custom action to add a Ribbon button in the Display Form of a SharePoint Task List:
<CustomAction Description="Prints a single List Item" Title="Print List Item" Id="{055c63b4-58d8-4b4a-a366-70f69257b491}" Location="CommandUI.Ribbon.DisplayForm" RegistrationId="107" RegistrationType="List" Sequence="1000" Rights="ViewListItems" xmlns="http://schemas.microsoft.com/sharepoint/">
<UrlAction Url="~site/_layouts/PrintListItem/PrintListItem.aspx?List={ListId}&ID={ItemId}" />
<CommandUIExtension xmlns="http://schemas.microsoft.com/sharepoint/">
<CommandUIDefinitions>
<CommandUIDefinition Location="Ribbon.ListForm.Display.Manage.Controls._children">
<Button Id="{C75857A4-C0BC-439A-813A-A1DCC885A14A}" Command="{06000B27-86BB-4203-AF44-29F61FDA678D}" Image32by32="~site/_layouts/Icon/PrintIcon.jpg" Image16by16="~site/_layouts/Icon/PrintIcon.jpg" Sequence="1000" LabelText="Print List Item" Description="Prints a Single List Item" TemplateAlias="o1" />
</CommandUIDefinition>
</CommandUIDefinitions>
<CommandUIHandlers>
<CommandUIHandler Command="{06000B27-86BB-4203-AF44-29F61FDA678D}" CommandAction="~site/_layouts/PrintListItem/PrintListItem.aspx?List={ListId}&ID={ItemId}" />
</CommandUIHandlers>
</CommandUIExtension>
</CustomAction>
Custom action to add a Ribbon button in the Display Form of a SharePoint Document Library:
<CustomAction Description="Prints a single List Item" Title="Print List Item" Id="{055c63b4-58d8-4b4a-a366-70f69257b491}" Location="CommandUI.Ribbon.DisplayForm" RegistrationId="101" RegistrationType="List" Sequence="1000" Rights="ViewListItems" xmlns="http://schemas.microsoft.com/sharepoint/">
<UrlAction Url="~site/_layouts/PrintListItem/PrintListItem.aspx?List={ListId}&ID={ItemId}" />
<CommandUIExtension xmlns="http://schemas.microsoft.com/sharepoint/">
<CommandUIDefinitions>
<CommandUIDefinition Location="Ribbon.ListForm.Display.Manage.Controls._children">
<Button Id="{C75857A4-C0BC-439A-813A-A1DCC885A14A}" Command="{06000B27-86BB-4203-AF44-29F61FDA678D}" Image32by32="~site/_layouts/Icon/PrintIcon.jpg" Image16by16="~site/_layouts/Icon/PrintIcon.jpg" Sequence="1000" LabelText="Print List Item" Description="Prints a Single List Item" TemplateAlias="o1" />
</CommandUIDefinition>
</CommandUIDefinitions>
<CommandUIHandlers>
<CommandUIHandler Command="{06000B27-86BB-4203-AF44-29F61FDA678D}" CommandAction="~site/_layouts/PrintListItem/PrintListItem.aspx?List={ListId}&ID={ItemId}" />
</CommandUIHandlers>
</CommandUIExtension>
</CustomAction>
Custom action to add an item in the Edit Control Block of a SharePoint List:
<CustomAction Id="PrintListItem.ItemToolbar"
GroupId="PrintListItem"
RegistrationType="List"
RegistrationId="100"
Location="EditControlBlock"
Sequence="100"
Title="Print List Item"
ImageUrl ="/_layouts/Icon/PrintIcon.jpg">
<UrlAction Url="~site/_layouts/PrintListItem/PrintListItem.aspx?List={ListId}&ID={ItemId}"/>
</CustomAction>
Custom action to add an item in the Edit Control Block of a SharePoint Task List:
<CustomAction Id="PrintListItem.ItemToolbar" GroupId="PrintListItem" RegistrationType="List" RegistrationId="107" Location="EditControlBlock" Sequence="300" Rights="ViewListItems"
Title="Print List Item" ImageUrl ="/_layouts/Icon/PrintIcon.jpg"><UrlAction Url="~site/_layouts/PrintListItem/PrintListItem.aspx?List={ListId}&ID={ItemId}"/></CustomAction>
Custom action to add an item in the Edit Control Block of a SharePoint Document Library:
<CustomAction Id="PrintListItem.ItemToolbar"
GroupId="PrintListItem"
RegistrationType="List"
RegistrationId="101"
Location="EditControlBlock"
Sequence="300"
Rights="ViewListItems"
Title="Print List Item"
ImageUrl ="/_layouts/Icon/PrintIcon.jpg">
<UrlAction Url="~site/_layouts/PrintListItem/PrintListItem.aspx?List={ListId}&ID={ItemId}"/>
<!--<UrlAction Url="javascript:window.open('{SiteUrl}/_layouts/PrintListItem/PrintListItem.aspx?List={ListId}&ID={ItemId}','PrintListItem','height=600,width=800,resizable=yes,scrollbars=1');"/>-->
</CustomAction>
Custom action to add a Ribbon item in the SharePoint 2010 Standard Actions Menu of a SharePoint List:
<CustomAction GroupId="ActionsMenu" Location="Microsoft.SharePoint.StandardMenu" Sequence="1000" Title="Print List Item" ImageUrl="/_layouts/Icon/PrintIcon.jpg" Description="Print list item" RegistrationType="List">
<UrlAction Url="~site/_layouts/PrintListItem/PrintListItem.aspx?List={ListId}&ID={ItemId}" />
</CustomAction>
Will keep updating this post with more Custom Action elements in the future.
Thursday, November 11, 2010
Cross Site collection dropdown Look Up using JQuery
Often times you might need to do a sub-site or a cross site collection look up and populate it as a dropdown control in your SharePoint application. This is possible using JQuery. Here is the code for the same:
<script type="text/javascript" src="/sites/SPFix/JQueryDemo/JQueryDocumentLibrary/jquery-1.4.2.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
var soapEnv =
"<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'>
<soapenv:Body>
<GetListItems xmlns='http://schemas.microsoft.com/sharepoint/soap/'>
<listName>Tasks</listName>
<viewFields>
<ViewFields>
<FieldRef Name='Title' />
</ViewFields>
</viewFields>
</GetListItems>
</soapenv:Body>
</soapenv:Envelope>";
$.ajax({
url: "/sites/SharePointFix/_vti_bin/lists.asmx",
type: "POST",
dataType: "xml",
data: soapEnv,
complete: processResult,
contentType: "text/xml; charset="utf-8""
});
});
function processResult(xData, status) {
$(xData.responseXML).find("z\:row").each(function() {
$('#crossSiteCollectionLookUp').
append($("<option></option>").
attr("value",$(this).attr("ows_Title")).
text($(this).attr("ows_Title")));
});
};
</script>
<body>
<select id="crossSiteCollectionLookUp">
</select>
</body>
1. Download and install the jQuery library from http://www.jquery.com/
2. Upload the jQuery library in any of your SharePoint document library and refer the path in the script source URL highlighted above. For best practices on integrating jQuery with SharePoint, refer: http://weblogs.asp.net/jan/archive/2008/11/20/sharepoint-2007-and-jquery-1.aspx
3. Drag and drop the Content editor webpart where you want to show your dynamic dropdown lookup column to be visible.
4. Copy and paste the above code in the Content Editor webpart. Change the highlighted sections like List name, Column name, URL and Display column names as required in your scenario.
In the code snippet above, I am dynamically populating the Title column from my Tasks List in a Dropdown control.
Should work like a charm :)
<script type="text/javascript" src="/sites/SPFix/JQueryDemo/JQueryDocumentLibrary/jquery-1.4.2.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
var soapEnv =
"<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'>
<soapenv:Body>
<GetListItems xmlns='http://schemas.microsoft.com/sharepoint/soap/'>
<listName>Tasks</listName>
<viewFields>
<ViewFields>
<FieldRef Name='Title' />
</ViewFields>
</viewFields>
</GetListItems>
</soapenv:Body>
</soapenv:Envelope>";
$.ajax({
url: "/sites/SharePointFix/_vti_bin/lists.asmx",
type: "POST",
dataType: "xml",
data: soapEnv,
complete: processResult,
contentType: "text/xml; charset="utf-8""
});
});
function processResult(xData, status) {
$(xData.responseXML).find("z\:row").each(function() {
$('#crossSiteCollectionLookUp').
append($("<option></option>").
attr("value",$(this).attr("ows_Title")).
text($(this).attr("ows_Title")));
});
};
</script>
<body>
<select id="crossSiteCollectionLookUp">
</select>
</body>
1. Download and install the jQuery library from http://www.jquery.com/
2. Upload the jQuery library in any of your SharePoint document library and refer the path in the script source URL highlighted above. For best practices on integrating jQuery with SharePoint, refer: http://weblogs.asp.net/jan/archive/2008/11/20/sharepoint-2007-and-jquery-1.aspx
3. Drag and drop the Content editor webpart where you want to show your dynamic dropdown lookup column to be visible.
4. Copy and paste the above code in the Content Editor webpart. Change the highlighted sections like List name, Column name, URL and Display column names as required in your scenario.
In the code snippet above, I am dynamically populating the Title column from my Tasks List in a Dropdown control.
Should work like a charm :)
Monday, October 18, 2010
SharePoint 2010 Enterprise Content/Web Content Management Features
New Enterprise Content Management (ECM) /Web Content Management (WCM) features in SharePoint 2010:
Ref # | Business Function | Description |
1. | Search | · Interactive Search Experience – A richer search experience providing flexible navigation, refinement and related searches. Both Standard and FAST Search for SharePoint get query completion, spell checking, wild cards and more. · FAST Search - Seamless integration with FAST Search enhances the search experience enabling feature content for common queries and providing more flexible navigation and document thumbnails and previews including in slide navigation of PowerPoint presentations which is a common end user scenario. · Relevance – Search includes Out-of-box ranking and relevance factors including social data such as tagging and usage (clicks). FAST Search adds more configurable set of relevance inputs for custom applications and specialized corpuses. · People Search – People finding based on social networking and expertise algorithms and tailored user experience for people including getting views of authored content. As users frequently do not know or recall the spelling of people’s names, search includes a new phonetic search algorithm that works much better than previous approaches to spell checking for names. · Connectivity – For data that lives outside SharePoint, search is expanded and improved with connectors to index web sites, file servers, SharePoint, Exchange, Lotus Notes, Documentum and FileNet. The updated Business Connectivity Services (previously the BDC) described below makes it much easier to index an arbitrary source such as a custom database. You can create this search connection without code using the new SharePoint Designer. · Scale and Platform Flexibility – Significant performance and scalability improvements through the new search technology. It also includes partitioned indices and scale-out query servers in SharePoint search. FAST scales-out even further and has significantly more pipeline extensibility to handle the largest collections and most complex value-added processing and search applications. The new capabilities support hundreds of millions of documents with great index freshness and query latency. |
2. | Metadata | · Managed Metadata - Companies often require the use of approved terms from a centrally controlled taxonomy. The SharePoint 2010 response is managed metadata, which is the ability to create, manage, and publish term sets across the enterprise from a single point of reference. · Term sets - Term sets are hierarchical trees, internally connected structures that display parent-child relationships. Term sets and content type galleries are available to any site collection that can securely access the url for the managed metadata service. · Folders based metadata- Folders are now first-class objects in SP 2010. Documents and subfolders can inherit metadata from their parent folder making it easier to find documents when metadata is automatically added, instead of forcing users to add the same value over and over to the hundred documents they just uploaded. |
3. | Document Management & Classification | SharePoint 2010 adds scale and depth in the areas of Enterprise Content Management well advancing the user experience. ECM features are as follows: · Large Lists and Libraries – Support for much larger document libraries with metadata driven navigation to help users go quickly to the content that is most important to them. Libraries will scale to tens of millions and archives to hundreds of millions of documents. This is a key investment for high-end document and records management but also helps organizations with lots of smaller sites. Enhancement of the workflow capabilities and tools in SharePoint Designer. · Enterprise Metadata – Support for enterprise wide content types and taxonomies not only across sites but also server farms. Applying this metadata is made easy (and valuable to users) in both the SharePoint and Office client user experience. The top-down taxonomy and bottoms-up social tagging (sometimes called folksonomy) combine to help improve search, navigation and people connections. · Document Sets – A new way to manage a collection of documents as a single object for workflow, metadata, etc. within SharePoint and Office so experience more closely models your work product (e.g. a proposal that may contain a presentation, budget, contract, etc.). · Web Publishing including Digital Asset Management – A number of key improvements to make it easier to publish rich sites on the intranet or internet. The new browser ribbon and editor experience to speed site customization, content authoring and publishing tasks. Support for digital asset management features like thumbnails, metadata and ratings for images as well as video streaming from SharePoint. Improved content deployment robustness from authoring to production for larger scale sites. · Governance and Records Management – Compliance is an increasingly important requirement for organizations. Enhanced Records Managements features in 2010 building on the scalable storage and enterprise metadata support described above. Just a few new features include location-based file plans, multi-stage dispositions, in-place records and e-discovery. · Social Feedback and Organization – SharePoint 2010 provides a consistent experience for organizing, finding and staying connected to information and people including bookmarks, tagging and ratings. It encompasses a new holistic approach across search, navigation, profiles, feeds and more. Bringing together informal social tagging with formal taxonomy described below so you can choose the right approach for a given set of content. · SharePoint Mobile Access – Improved the experience for mobile web browsers and are introducing a new SharePoint Workspace Mobile client so you can take Office content from SharePoint offline on a Windows Mobile device. These clients let you navigate lists and libraries, search content and people and even view and edit Office content within the Office Web App experience running on a mobile browser. · Content organizer - Content organization is largely a matter of individual upload decisions. Administrators could help guide those decisions, but ultimately, it was up to the contributors to decide where the content ended up. The new Content Organizer allows routing decisions to be centrally organized. It takes these decisions out of the hands of users and ensures that items are well organized. Users are guided to enter appropriate metadata rather than being allowed to dump documents wherever they like. |
4. | Audit | · Granular Lists, Libraries, and Sites audit management – Granular Audit management/logging settings enables you to track opening or downloading documents, viewing items in lists, or viewing item properties, editing items, checking out or checking in items, moving or copying items to another location in the site, deleting or restoring items. Includes editing content types and columns, searching site content, editing users and permissions . · Audit Log Trimming - You also have the ability in 2010 to enable Audit Log Trimming which includes storing the current audit data in a Document Library. · ULS logs - ULS is improved through several facets including the introduction of a new and extensible Logging database, configurable noise suppression (Event Log Flood Protection), throttling, correlation Ids, and control of the amount of disk space used by logs as well as native compression of said logs - at the end of the day you can expect an approximate 50% savings in size of ULS logs as a result. |
5. | Workflow Management | · Site and List level association - SharePoint 2010 workflow instances can be associated with a list item or a site. · Reusable workflows - Reusable workflow points to content type (including base item content type), so it can be associated with any list. You need to prudent on associating the workflow to content type as content type associated columns will be available to the workflow. · Document Sets - Associate workflows with multiple documents using the new content type: Document Set (basically it is collection of documents). · Integration with Visio - Workflow can be imported and exported between SharePoint Designer and Visio. Visio only allows Sequential workflows. Stencils in Visio will have conditions, actions and connectors. Saves as standard Visio (.vsd) file. File menu allows export to workflow file (.vdi) file which is a compacted set of “xoml” file. · SharePoint Designer (SPD) Enhancements – a. Allows you to export as WSP or solution package. Can use .aspx or InfoPath forms in the workflow. Nested actions – step inside a step, conditional logic statements, look ups etc. Out-of-the box workflows (like Approval Workflow) is configurable using SPD. SPD allows you to create Workflow tasks. b. Approval Workflow is configurable using SPD. SPD allowing you to create Workflow tasks. c. Easy to create no-code workflow solutions with built-in ready-to-use workflow activities. |
Subscribe to:
Posts (Atom)