Posts

Exporting Documents (folder structure) from SharePoint to Local Drive

http://technet.microsoft.com/en-us/magazine/2009.04.utilityspotlight.aspx?pr=blog

SharePoint 2010 List view Print

Please use the below URL for WSP download http://spprintlistbutton.codeplex.com/

Create a SharePoint Custom Action to Zip and Download a Document Set

Image
Here’s the URL to the built-in document set downloader page: {SiteUrl}/_layouts/DocSetExport.aspx?List={ListId}&ID={ItemId}. It takes in the GUID of the list and the ID of the document set. Here’s an example: http://sharepoint2010/sites/docman/_layouts/DocSetExport.aspx?List={4E2D11F5-7500-476A-B001-62A7BF92FD50}&ID=10 Adding a Custom Action to the Document Set List Item Menu using SharePoint Designer To add a custom action, open the site in SharePoint Designer and navigate to the document set list. Add a new list item menu custom action: Provide a Name, Description, and Navigate to URL: Save the custom action, and test it: I want to mention that there is a drawback to this approach. The custom action will show up for every list item, not just the document set. The list item menu will appear on documents in the document set as well: Adding a Custom Action to the Document Set Ribbon using SharePoint Designer We can also use SharePoint Designer to add a button ...

Update Hyperlink Field in SharePoint with PowerShell

I want to change the URL in list item from https://Texas.com to https://ta.com  using Powershell script 1) copy & paste (change the URLs and Listnames and field) the below script and name it with extension .ps1 (ex: ItemURLChange.ps1) #Add-PSSnapin Microsoft.SharePoint.PowerShell $siteUrl = "http://sharepoint/SiteCollection/SiteName" $webName = “SiteName” $listName = "Name of your list" $spSite = new-object Microsoft.SharePoint.SPSite($siteurl) $spWeb = $spSite.OpenWeb($webName) $spList = $spWeb.Lists[$listName] foreach($Item in $spList.Items ) { $ofldurl= new-object Microsoft.SharePoint.SPFieldUrlValue($Item["URL"]) $ofldurl.URL = $ofldurl.URL.Replace("Texas", "ta") $ofldurl.Description = $ofldurl.Description.Replace("Texas", "ta") $item["URL"] = $ofldurl $item.update() } $spWeb.Dispose() 2) Open the Powershell command and run using the below command PS C:\temp...

Email / Phone validation in SharePoint 2010 Column validation

=(LEN(LEFT([Email Address],FIND("@",[Email Address])-1))>0)+(LEN(RIGHT([Email Address],LEN([Email Address])-FIND(".",[Email Address],FIND("@",[Email Address]))))>0)+(LEN(MID([Email Address],FIND("@",[Email Address])+1,FIND(".",[Email Address],FIND("@",[Email Address]))-FIND("@",[Email Address])-1))>0)+(ISERROR(FIND(" ",[Email Address]))=TRUE)=4 -------------------- Phone Validation (example: 123-456-7896x486): =AND(LEN([Phone Number])=16,IF(ISERROR(FIND("",[Phone Number],1)),FALSE,(FIND("",[Phone Number])=1)),IF(ISERROR(FIND("-",[Phone Number],4)),FALSE,(FIND("-",[Phone Number],4)=4)),IF(ISERROR(FIND("-",[Phone Number],8)),FALSE,(FIND("-",[Phone Number],8)=8)),IF(ISERROR(FIND("x",[Phone Number],13)),FALSE,(FIND("x",[Phone Number],13)=13)),IF(ISERROR(1*CONCATENATE(MID([Phone Number],1,3),MID([Phone Number],5,3),MID(...

Specify page to redirect to when adding a item (new form or edit form)

1. Open your Newform.aspx page 2. Add a CEWP. Type following line in your site url ( http://serverip/Lists/Test/NewForm.aspx?&toolpaneview=2 ) 3. Paste below script in source code <script> function PreSaveAction() { var srcUrl=GetSource(); var newSrcUrl = "http://www.google.com"; var i = aspnetForm.action.lastIndexOf(srcUrl); aspnetForm.action = aspnetForm.action.substring(0,i) + newSrcUrl ; return true; } < /script> --------------------------------- JQuery for Cancel button: Use the following jQuery code to override the behavior of the cancel button: $(function() { $('input[value=Cancel]').click(function() {history.go(-1);}); });

Rename button Text in NewForm.aspx or EditForm.aspx

Rename button Text in NewForm.aspx or EditForm.aspx in SharePoint  Lists <script type="text/javascript"> function changeFinish() { var inputs = document.getElementsByTagName("input"); for(i = 0; i<inputs.length; i++) { if(inputs[i].type == "button" && inputs[i].value == "Save") inputs[i].value = "Submit"; } } _spBodyOnLoadFunctionNames.push("changeFinish"); </script>