About Miles

This author has not yet filled in any details.
So far Miles has created 38 blog entries.

PreUpgrade Check fun

Great article for fixing pre upgrade related issues: http://sharepointreporter.wordpress.com/2010/07/30/fix-pre-upgrade-check-errors/ One thing to add.  Use the query here to find the name of the pages that contain the offending webparts.  I thought deleting the page would make them go away, but I was wrong.  I had to recover the pages that I deleted from the recycle bin and then open them in web part maintenance view (appending "?contents=1" to the url and then delete the webparts from the page.   http://surfpointtech.com/2012/06/28/how-to-find-a-sharepoint-webpart-name-from-the-id-or-guid/  Here's the STSADM commands: STSADM -o preupgradecheck and this one to find the sites that the webparts live in: stsadm -o enumallwebs -includewebparts > i:tempwebparts.txt Better yet, use the SQL command above to get the actual page that the webpart lives in.  

By |2012-06-28T20:02:46+00:00June 28th, 2012|Sharepoint on Premise|1 Comment

How to find a SharePoint webpart name from the ID or GUID?

SELECT DISTINCT D.SiteID, D.WebId, W.FullURL as WebURL, D.Id As DocumentId,                  D.DirName, D.LeafName, tp_ID As WebPartSK  FROM       dbo.Docs D WITH (nolock)   INNER JOIN dbo.Webs W WITH (nolock) ON D.WebID = W.Id  INNER JOIN dbo.WebParts WP WITH (nolock) ON D.Id = WP.tp_PageUrlID  WHERE WP.tp_ListId Is Null AND WP.tp_Type Is Null AND WP.tp_Flags Is Null        AND WP.tp_BaseViewID Is Null AND WP.tp_DisplayName Is Null         AND WP.tp_Version Is Null  AND WP.tp_WebPartTypeId='<your web parts id>'  Source for this query is Ryan's comment her: http://stackoverflow.com/questions/1498409/sharepoint-find-where-webpart-is-in-use    

By |2012-06-28T16:35:19+00:00June 28th, 2012|Sharepoint on Premise|3 Comments

Installing Adobe 9 IFilter x64 for SharePoint 2010

Ran into some issues after running through the install: http://support.microsoft.com/kb/2293357 Search would still not pick up the content of the pdf, just the title. Had to add this registry key and start a full crawl and it worked: • Using Regedit on the server, navigate to \HKEY_LOCAL_MACHINESOFTWAREMicrosoftOffice Server14.0SearchSetupFilters • Right-click the Filters folder and select New Key. Enter “.pdf” for the key value. • Add the following values to this key: Default = Extension = pdf FileTypeBucket = 1 MimeTypes = application/pdf

By |2022-12-11T19:44:49+00:00May 8th, 2012|Sharepoint on Premise|0 Comments

SharePoint Limits

These are some limits found in the 2007 version of SharePoint, specifically Windows SharePoint Services 3.0.   Site object Guidelines for acceptable performance Notes Scope of impact when performance degrades Site collection 50,000 per content database Total farm throughput degrades as the number of site collections increases. Farm Site collection 150,000 per Web application This limit is theoretical, and is dependent largely upon: Performance of the database server on which the configuration database resides. Performance of the Web servers in the farm. Network bandwidth between the Web servers and the database server. This is not a hard limit, and assumes a single database server. Your environment may not be able to host this many site collections per Web application. Distributing content databases across additional database servers can increase the effective limit of the number of site collections per Web application. You should perform testing to determine the actual effective limit [...]

By |2022-12-11T19:44:49+00:00March 26th, 2012|Sharepoint on Premise|0 Comments

SharePoint AuditData table is too large- Powershell script to schedule STSADM -o TrimAuditLog

If you have turned on Audit logging in SharePoint 2007, you will wake up some day with a nasty surprise of a bloated SQL server database.  The data is all being stored in the AuditData table in the content database. Luckily, there is an STSADM command for this, "stsadm -o trimauditlog" After some research, the general consensus is to not truncate the table directly, although no specific reason is ever given except "Not Supported." As I always prefer to use a standard API, I found that you must do this command in very small chunks or else you could lock up your SQL server and effectively crash your SharePoint installation (found out the hard way). I found 800,000 records to take approximately 15 minutes on a 2 Web Front end 1 Index Server, SQL Cluster type SharePoint farm.  To be safe, I wrote a PowerShell script to take care of [...]

By |2022-12-11T19:44:49+00:00February 1st, 2012|Sharepoint on Premise|1 Comment

Pull users and groups from a SP list that allows multiple users and groups. This is a follow up post from a previous post : http://surfpointtech.com/2011/09/12/how-to-pull-the-email-addresses-from-a-sharepoint-user-field-allow-multiple-users/ When examining a User field on a SharePoint list, you need to see whether the list setting allows for multiple users as well as both Users and Groups. The key to pulling both the groups and the users is to be able to test for a group as opposed to a user object.  In this case, I found that the fieldUser.User object is null for groups, but not for Users.  So, as you iterate through the fieldUser objects in the SPFieldUserValueCollection, you'll find a group when the fieldUser is not null, but the fieldUser.User object is null.  That way, you know you have a SPGroup at that point, and can loop through the users in the group. After that, you do the normal adding [...]

By |2012-01-31T23:42:51+00:00January 31st, 2012|Sharepoint on Premise|0 Comments

SharePoint Error in Visual Studio Debugging a workflow: Operation aborted (Exception from HRESULT: 0x80004004 (E_ABORT))

Leave it to Microsoft to break every SharePoint Dev server in the world in one fell swoop. When you go to debug a workflow from Visual Studio 2008, it builds fine, but on deploy, it fails while trying to attach to the list with this error: Operation aborted (Exception from HRESULT: 0x80004004 (E_ABORT)) Causing the Error: Security patch KB2493987 If you have automatic updates set on your dev servers (which many people do), you will automatically get this security patch.  And, it will break all your custom visual studio debugging abilities on all dev servers. Solution: = Running the SharePoint Products and Technologies Configuration Wizard and doing an IISRESET. For a full explanation, see this helpful post: http://deinfotech.blogspot.com/2011/09/sharepoint-2007errors-creating-site-and.html

By |2022-12-11T19:44:49+00:00October 25th, 2011|Sharepoint on Premise, Uncategorized|0 Comments

How to find which version of SharePoint 2010 is installed

http://msdn.microsoft.com/en-us/library/ff721969.aspx Go to the registry key: Regedit HKEY_LOCAL_MACHINE -SOFTWARE-MICROSOFT    SHARED TOOLS-Web Server Extensions - 14.0            WSS-Installed Products Then, match the key that is installed in the list below.                "BEED1F75-C398-4447-AEF1-E66E1F0DF91E", "SharePoint Foundation 2010" "1328E89E-7EC8-4F7E-809E-7E945796E511", "Search Server Express 2010" "B2C0B444-3914-4ACB-A0B8-7CF50A8F7AA0", "SharePoint Server 2010 Standard Trial" "3FDFBCC8-B3E4-4482-91FA-122C6432805C", "SharePoint Server 2010 Standard" "88BED06D-8C6B-4E62-AB01-546D6005FE97", "SharePoint Server 2010 Enterprise Trial" "D5595F62-449B-4061-B0B2-0CBAD410BB51", "SharePoint Server 2010 Enterprise" "BC4C1C97-9013-4033-A0DD-9DC9E6D6C887", "Search Server 2010 Trial" "08460AA2-A176-442C-BDCA-26928704D80B", "Search Server 2010" "84902853-59F6-4B20-BC7C-DE4F419FEFAD", "Project Server 2010 Trial" "ED21638F-97FF-4A65-AD9B-6889B93065E2", "Project Server 2010" "926E4E17-087B-47D1-8BD7-91A394BC6196", "Office Web Companions 2010"

By |2011-10-18T20:10:38+00:00October 18th, 2011|Uncategorized|0 Comments

How to add directly to the Workflow History from a custom SharePoint workflow

This one was a little hard to track down. How do you write directly to the SharePoint workflow history? It's easy enough to add a LogToHistory activity and set the HistoryDescription and HistoryOutcome, but what if you want to create those entries dynamically? After toying around with different ways of trying this, the answer was pretty easy: Here's the code sample: SPMember usermember = workflowProperties.OriginatorUser; SPWorkflow.CreateHistoryEvent(this.workflowProperties.List.ParentWeb, this.workflowId, 0, usermember, TimeSpan.MinValue, "Corp Legal Reviewed", "Status Change", string.Empty);

By |2011-09-12T03:29:28+00:00September 12th, 2011|Sharepoint on Premise|7 Comments

How to pull the email addresses from a SharePoint User field (allow multiple users)

To pull the user information, you first have to convert the field into a SPFieldUser object, and then create a collection of the SPFieldUserValueCollection. Then, loop through the collection and pull the Email property of the SPFieldUserValue. code sample: ---------------------------------------------------------------------- string sFieldNameTo = "BU Legal To Email"; string sFieldNameCC = "BU Legal CC Email"; //Add To and CC based on multiple user field if (workflowProperties.Item[sFieldNameTo] != null) { SPFieldUser UsersColumn = (SPFieldUser)workflowProperties.Item.Fields.GetField(sFieldNameTo); SPFieldUserValueCollection Users = (SPFieldUserValueCollection)UsersColumn.GetFieldValue(workflowProperties.Item[sFieldNameTo].ToString()); foreach (SPFieldUserValue fieldUser in Users) { if (fieldUser.User.Email != null && fieldUser.User.Email != string.Empty) { mail.To.Add(fieldUser.User.Email); }// }// }// if (workflowProperties.Item[sFieldNameCC] != null) { SPFieldUser UsersColumn = (SPFieldUser)workflowProperties.Item.Fields.GetField(sFieldNameCC); SPFieldUserValueCollection Users = (SPFieldUserValueCollection)UsersColumn.GetFieldValue(workflowProperties.Item[sFieldNameCC].ToString()); foreach (SPFieldUserValue fieldUser in Users) { if (fieldUser.User.Email != null && fieldUser.User.Email != string.Empty) { mail.CC.Add(fieldUser.User.Email); }// }// }//   Updated 5/11/16 For CSOM use this: foreach (FieldUserValue userValue in item["MultiUser"]as FieldUserValue[]) { }//    

By |2016-05-11T23:05:17+00:00September 12th, 2011|Sharepoint on Premise|1 Comment
Go to Top