Skip to main content

Posts

Navigating to Bookmarks on Word document Uploaded to SharePoint online

 Requirement: Word document with bookmarks uploaded to SharePoint online and creating URLs for every bookmark to use them as links on SharePoint page.  Upload and open the word document on the site.  Select Navigation on the ribbon On the left Navigation pane hover over the bookmark and select the link icon Paste the link in a note pad. You can see the random extension got generated for the bookmark.  You can use this URL as a link on sharepoint page where it will directly point to the bookmark location. 

Change "Created By' field in SharePoint Library

I got an requirement to change the created by to different user after a user left the firm.  I tried an approach with Powershell but I found it easy to update in content database.  Change the "Created by" field through the SQL content database(Tables dbo.alldocs and dbo.alluserdata). In dbo.alluserdata change tp_author to the new sharepoint ID, and any of the nvarchar names referencing the old account name. In dbo.alluserdata and dbo.alldocs change just tp_draftownerid.  Through PowerShell and credit goes  here   # Get the SharePoint Assembly # You will need to run this on the SharePoint Server [Reflection.Assembly]::Load("Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c") # The site my list was in was at  http://dev # create a new object called $SPSite $SPSite = New-Object Microsoft.SharePoint.SPSite(" http://dev/") # Make sure you have the last “/” in the url on the site # allow $SPWeb to be the OpenWeb from the si...

Sign in as different User - SharePoint 2013 and higher

Usually when you have 2 user accounts (regular and admin) in your organization and infrastructure will give only access to your admin account and when you try to open a sharepoint 2013 site it says access denied by default coz you logged in with your regular account by default and SharePoint 2013 dont give option to "sign in as different user" by default. You can use _layouts/closeConnection.aspx?loginasanotheruser=true this extension to get the sign-in pop up window. Hope this helps

Run workflow on existing items - SharePoint 2013 or higher

I had to create a workflow on a existing list which has already around 250 items. I need to run the workflow on existing items which don't change.  1. I can use retention , but I dont have CA access to either enable or check the timer jobs related to it.  2. Custom timer job or solution (As this is one time thing I didnt wanted to exhaust my energy) Solution (Which i thought is useful for me)  Change the workflow initiation to "Run when the item is changed" create a column with number type open the lint in "quickview"  add "some number" in all the items in the new column Click "Stop" on the top of the list.  It will run the workflow on all items one time as you made the change on every item by adding a field value.  Hope this helps someone in need without any extra effort. 

Hide custom header and footer in windows for sharepoint 2010/13

Hi All, I gone through this and wanted to share. I had a master page with custom header and footer and everytime when I try to "add item" or "add document" to either list or document library, it shows the header and footer and it was so annaoying and after doing some research I found a piece of class from sharpoint need to be added to avoid them. In master page, where you add the header or footer you need to close the div with class="ms-dialogHidden noindex" , it will hide from the windows.

sharepoint 2010 list hyperlink column open in new window

Sharepoint designer solution: http://blog.sharedove.com/adisjugo/index.php/2011/06/26/setting-a-link-target-in-the-sharepoint-2010-data-view-web-part/ Lot of other possibilities: http://www.sharepointdiary.com/2011/02/sharepoint-link-list-open-in-new-window_21.html#ixzz2aWtiNarl I liked the java script one very much, might be bit tedious but works like a charm. You can Make Selected Links in a Links List Open in a New Window with Little JavaScript and content editor web part. Here is how: when creating links in the Links List, add   #openinnewwindow   on the end of each link that you would like to open in a new window. Add the content editor webpart, and place the following code in it: <script language= "JavaScript" > _spBodyOnLoadFunctionNames.push( "PrepareLinks" );   function PrepareLinks() {    //create an array to store all the anchor elements in the page     var anchors = document.getElementsByTagName...

Printing SP 2013/2010 List Item jQuery and CSS

This solution is originated by ROB (My personal favarote author in SharePoint Blogs) at https://rstagg.com/2013/09/25/sharepoint-2013-printing-list-item-forms-using-jquery-and-css/ I just want to make this solution reach out to more people. Calculated field for the print icon .  Start from a new team site: Create a new subsite from the Collaboration template using the Team Site template. Use listprint for the site name and URL. Create a new picture library named “Images1” Upload the print icon to the picture library.  Download image here Create a custom list named “List” Add the following columns to the list: Column name: Printed | Column Type: Text | Default value: No Column name: Print Item | Column Type: Calculated Column  Download calculated field formula example here Add a new item to the list. Click on the new item link. From the standard DispForm.aspx page select Settings > Edit page Add a new Script Editor web-part to the pa...

Adding a document link as a field in document library-SP 2010

Hi ALL, I got this requirement from my client that they need to display the document URL as a another column so that when they take the excel sheet out of it they have the URL in it. I know it sounds simple, but the URL Path column will get displayed only with some calculated column in SP Desginer. I can use this way but. I thought its simple writing a workflow using "encoded Absolute URL" field in the document library. Please follow the steps. Add the workflow to the document Library in SPD. Add action : Set field in current item set the textbox column to get value of "Current Item: Encoded Absolute URL Publish the workflow and make it run manually for existing documents and after you done running on existing then change the workflow settings to Run automatically when the item is created. Thanks for looking the blog. Happy SharePointing.

Hide Recently Modified from left hand side

Hi All, I got this query from one of my friend who recently joined the project. <style type="text/css">  .s4-recentchanges  {   display:none;  }  </style> add this code to CEWP if you want to hide "Recently added" on a page.  Add this code to masterpage, if you want to hide on the whole site.  Happy SharePointing!!!!!