Showing posts with label SharePoint File Location. Show all posts
Showing posts with label SharePoint File Location. Show all posts

Wednesday, October 8, 2014

Clear SharePoint Designer 2013 Cache

When using SharePoint Designer, especially in a development environment where content and assemblies can frequently change, SPD can start to behave erratically, sometimes loading content that has been removed from the web site, or using an older version of an assembly. This is due to how SPD caches content, which thankfully, is easy enough to clear.


Step 1: First, close SPD and then remove all files from the following folder:
%APPDATA%\Microsoft\Web Server Extensions\Cache

This contains things like page caches.

Step 2: Then, do the same for this folder:
%USERPROFILE%\AppData\Local\Microsoft\WebsiteCache

This contains cached items such as assemblies used and lots of other xml configuration files.

Step 3: Restart SPD and all should be good in the world

Reference: http://www.stuartroberts.net/index.php/2012/07/18/quick-tip-9/

Sunday, December 9, 2012

SharePoint 2013/2010 - Add PDF icon to the images library

Step 1: Open Image Folder at the SharePoint Server

c:\Program Files\Common Files\Microsoft Shared\web server extensions\<port>\TEMPLATE\IMAGES
<port>: e.g. 12

Step 2: Copy the following image to the folder:

(.gif for SharePoint 2010) (.png for SharePoint 2013)


Step 3: After you copy the picture file you need navigate to
“C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\XML”

Step 4: And edit the DocIcon.xml with notepad and add the line
<Mapping Key=”pdf” Value=”icpdf.gif”/>

Once this is edited and saved (I would also recommend doing a backup of the file before you save it) you will need to do an IISreset before the icon will display.

How to copy the Document Library Properties to the Custom List for SharePoint using Workflow - copy the document Type (icon) and URL

Step 1: Create a Document Library:

Document Library A

Step 2: Create a new Column at the Document Library A as follows:

Read Only Permission (People) - provide the read only permission to the document.

Step 3: Create a Custom list which have the same Column Name & Settings as the Document Library A.

Custom List A

Step 4: Create a new Column in the Custom List A:

File (Hyperlink or Picture) - Format URL as Picture
Document URL (Hyperlink) - provide document URL from Document Library A

Step 5: Create a SharePoint Designer Workflow to run when a new documents added to the Document Library A.

Step 6: On the same Workflow, add a Impersonation Step and a code to to set the read only permission for the document base on Read Only Permission Column.

Step 7: On the same Workflow, added a code to copy the properties (Create New List Item) of the Document Library to the Custom List.

Step 8: On the same Workflow, added a code to copy the URL of the document to the Custom List A.




















Step 9: On the same Workflow, add a new Workflow Local Variables:

Typeoffile (string) - to temp store the icon URL

Step 10: On the same Workflow, added a code to copy the Type (icon linked to document) with the Code A to the Typeoffile (string). Then, add a code to update the item at Custom List A.

Code A: /_layouts/images/ic[%Current Item:Type%].gif















Step 11: Test the workflow by adding a new document to the Document Library A. The workflow will run and do the following actions:
  1. Change the Document Permission based on Read Only Permission (People) Column.
  2. Copy the Document Properties to the Custom List. Then set the Document URL value and Type of File (Picture) value in custom list based on Document Library A.

Saturday, December 8, 2012

Getting XML Data From a SharePoint List using OWSSVR.DLL

Reference 1: http://blogs.msdn.com/b/kaevans/
Reference 2: http://www.synergyonline.com/Blog/Lists/Posts/Post.aspx?ID=123

Ever since v1 of SharePoint Team Services, Microsoft has used OWSSVR.DLL to remotely invoke functions against SharePoint.  With the incorporation of Web Services in v2, this need is partly deprecated and even more so in v3.  Nonetheless, OWSSVR.DLL is still around and still plays an important role with external applications such as SharePoint Designer.  It is part of FP-RPC (Front Page – Remote Procedure Call) but should not be confused with Front Page extensions.

Step 1: Find the GUID for a list, just go to the List Settings page for the list and copy it from the URL. (_layouts/listedit.aspx)



Step 2: Use the following link to query the xml data from OWSSVR.DLL:

http://{0}/_vti_bin/owssvr.dll?Cmd=Display&List={1}&XMLDATA=TRUE
OR
http://{0}/_vti_bin/owssvr.dll?Cmd=Display&List={1}&View={2}&XMLDATA=TRUE

{0} – The URL to your site.  This could be the root web or a child site.
{1} – The GUID for your list. (Step 1)
{2} – The View GUID for your list. 

Location of Ribbon XML & Action JS for Ribbon


Location of Ribbon XML file is :

C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\GLOBAL\XML\CMDUI.XML

Action JS code for most of these ribbon elements you can find here:

C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\SP.Ribbon.debug.js

Actions for rich text editor ribbon are stored here:

C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\SP.UI.Rte.debug.js