Tags
It seems that upgrading my existing MCPD SharePoint Developer 2010 to MCPD SharePoint 2013, I need to take:
25 Tuesday Feb 2014
Posted Uncategorized
inTags
It seems that upgrading my existing MCPD SharePoint Developer 2010 to MCPD SharePoint 2013, I need to take:
09 Wednesday Oct 2013
Posted Sharepoint
inTags
Planning | Deployment | Administration, Operations and Troubleshooting | Development
14 Wednesday Dec 2011
Posted Sharepoint
inTags
I had an interesting request to find out who has done the Anonymous Surveys in SharePoint. you cannot see the name from the SharePoint interface but you can directly query your SharePoint content database:
SELECT AllUserData.*, UserInfo.tp_Title FROM AllUserData LEFT JOIN UserInfo ON UserInfo.tp_id = tp_author WHERE AllUserData.tp_listid = '00000000-0000-0000-0000-000000000000' AND UserInfo.tp_siteid = '11111111-1111-1111-1111-111111111111'
.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, “Courier New”, courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }
Where the 0000s and 1111s above are your actual survey list guid and site collection guid.
To find List GUID is easy, just go to list setting and click “Audience targeting settins”, the GUID will be at the end of the URL.
To find site collection guid, you will need go to your content database and open the “Sites” table. Also if you are interested on subsite ID you can search on web table
14 Monday Nov 2011
Posted Sharepoint
inTags
I used export to get a backup file for a publishing site but when I run the import I got this error:
To solve this problem, you need create the site first in the new location with the same site template. All works now.
11 Friday Nov 2011
Posted Sharepoint
inTags
Recently I am using Nintex workflow that need to look up a item from a list. After a few try, I found I need to call SharePoint GetListItems web service to retrieve a XML file. Then use Query to XML with XSLT to render the value out.
So the XML file looks like:
<?xml version="1.0" encoding="utf-8"?><xml><listitems xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema" xmlns="http://schemas.microsoft.com/sharepoint/soap/"><rs:data ItemCount="1"><z:row ows_PRDNO="00426" ows_DESCP="LC Bowl PmpkFet Psta 8x300g " ows_SubSBU="N,Frozen Meals " ows_BdcIdentity="__bk410003000300430023006300" /><z:row ows_PRDNO="00427" ows_DESCP="Test " ows_SubSBU="N,Frozen Meals " ows_BdcIdentity="__bk410003000300430023006300" /></rs:data></listitems></xml>For my purpose, as there will be only one result comes back. so I used
<xsl:stylesheet xmlns:x="http://www.w3.org/2001/XMLSchema" xmlns:d="http://schemas.microsoft.com/sharepoint/dsp" version="1.0" exclude-result-prefixes="xsl msxsl ddwrt" xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime" xmlns:asp="http://schemas.microsoft.com/ASPNET/20" xmlns:__designer="http://schemas.microsoft.com/WebParts/v2/DataView/designer" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:SharePoint="Microsoft.SharePoint.WebControls" xmlns:ddwrt2="urn:frontpage:internal"><xsl:template match="/" xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema"><xsl:value-of select="//rs:data/z:row/@ows_DESCP" /></xsl:template></xsl:stylesheet>
But below the code can loop the row and display each value
<?xml version="1.0" encoding="iso-8859-1"?><xsl:stylesheet xmlns:x="http://www.w3.org/2001/XMLSchema" xmlns:d="http://schemas.microsoft.com/sharepoint/dsp" version="1.0" exclude-result-prefixes="xsl msxsl ddwrt" xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime" xmlns:asp="http://schemas.microsoft.com/ASPNET/20" xmlns:__designer="http://schemas.microsoft.com/WebParts/v2/DataView/designer" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:SharePoint="Microsoft.SharePoint.WebControls" xmlns:ddwrt2="urn:frontpage:internal"><xsl:output method="text" indent="no"></xsl:output><xsl:template name="ShowVariables" match="/" ><xsl:for-each select="//*[name()='z:row']">P:<xsl:value-of select="@ows_PRDNO" /><br /></xsl:for-each></xsl:template></xsl:stylesheet>
20 Tuesday Jul 2010
Posted Sharepoint
inTags
Here is a project stores all the PowerShell scripts developed for SharePoint farms (WSS or MOSS) management.
Each script is available independently and can be modified as desired.
http://sharepointpsscripts.codeplex.com/
and Greg list the SP 2010 PowerShell here.
06 Tuesday Jul 2010
Posted Sharepoint
inTags
If you use ULS Viewer, you may find soem high messages:
05/01/2007 12:58:47.31 w3wp.exe (0x105C) 0x09A8 Windows SharePoint Services General 8l1n High An SPRequest object was not disposed before the end of this thread. To avoid wasting system resources, dispose of this object or its parent (such as an SPSite or SPWeb) as soon as you are done using it. This object will now be disposed. Allocation Id: {5BFFCA4B-3B91-45BF-98CD-0BB508BE30EE} To determine where this object was allocated, create a registry key at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\HeapSettings. Then create a new DWORD named SPRequestStackTrace with the value 1 under this key.
To identify which code is responsible for the problem after you identified the problem you have two options:
1. You can search the earlier ULS logs for the allocation ID in the warning (if the allocation was done beyond the threshold you will find it)
2. You can follow the hints in the warning and set the following registry key as this will ensure that the stack trace of the allocation of the SPRequest object is preserved in memory and added to the 8l1n ULS log entry:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\HeapSettings
SPRequestStackTrace = 1
Yes you need to cretae this key “HeapSettings” and the DWORD value below it.
They do not exist after installing the product.
The second option is more reliable as it will ensure that you get a callstack for each of the 8l1n messages. Be aware that after setting this registry key you need to restart the sharepoint services and the application pools (or restart the server) to ensure that the settings get effective.
By analyzing the emitted callstack you should then be able to identify the component causing the problem.
06 Tuesday Jul 2010
Posted Sharepoint, Tools
inTags
SPDisposeCheck is a tool to help you to check your assemblies that use the SharePoint API so that you can build better code. It provides assistance in correctly disposing of certain SharePoint objects to help you follow published best practice. This tool may not show all memory leaks in your code. Further investigation is advised if you continue to experience issues.
You can download from CodePlex here.
here is the example show you how to dispose the patterns.
How to use it
1. Install SPDisposeCheck.msi on your development server.
2. Open a command window.
3. Type following command:
“c:\Program Files\Microsoft\SharePoint Dispose Check\SPDisposeCheck.exe” “.dll”
16 Tuesday Mar 2010
Posted JavaScript, Sharepoint
inTags
I got request to remove the top buttons in the sharepoint survey to avoid user click next without scroll down the page. Below is the Javascript to do it.
var x=document.getElementsByTagName("input"); for (var i=0;i<x.length;i++) { if (x.item(i).type=="button"&&x.item(i).id.indexOf("top")>0) { if(x.item(i).value=="Save" || x.item(i).value=="Next" || x.item(i).value=="Cancel") { x.item(i).style.display = "none" } }; }
07 Thursday Jan 2010
Posted Sharepoint
inThe new SharePoint 2010 tools in Visual Studio 2010 have lots of options for extensibility and Wouter van Vugt has been working on some great extensions for developers. The tool can be downloaded from here. He has included:
* Sandboxed Visual Web Part Designer
* SPMetal integration in Visual Studio for creating Linq to SharePoint proxys
* Some Quck Deploy Steps in SharePoint Solution Deployment
It is on beta version but seems very useful.