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

June 22, 2016

Web Part Page Maintenance

When modifying SharePoint page layouts I'll occasionally end up with Web Parts with titles ending in [2].  This is due to a duplicate Web Part name.  Simply open up the web part maintenance page and delete the unwanted web parts.

Keyboard method:
  1. Append ?contents=1 to your URL, e.g. /SitePages/Home.aspx?contents=1

Mouse method:
  1. Open the page ribbon
  2. Click Edit Properties
  3. Click Open Web Part Page in maintenance view

Reference: https://support.office.com/en-us/article/Open-and-use-the-Web-Part-Maintenance-Page-eff9ce22-d04a-44dd-ae83-ac29a5e396c2

January 17, 2013

Fix: "A Microsoft SharePoint Foundation compatible application could not be found to edit this document."

You get the following error when trying to open a document stored on SharePoint in Microsoft Office 2010:

"The document could not be opened for editing.  A Microsoft SharePoint Foundation compatible application could not be found to edit the document."

Here are some things to check:
  • Internet Explorer is recommended for best compatibility.  However if you’re using Firefox, there are some steps you can take as outlined in KB979634.
  • Make sure you’re using 32 bit Internet Explorer.
  • Verify the Internet Explorer Add-on “SharePoint OpenDocuments Class” is installed and enabled (be sure to Show All add-ons).  If it’s not installed, do a repair install of Office and check again.
8/26/2013 Addendum:
Thought I'd update with what I've found for Office 2013, but not tried at this point.  See this msdn forum:
  • Office 2013 June CU (link)
  • Registry changes to add a US local key as mentioned in the forum linked above.

January 15, 2013

Records Center and Records Management

Records Center is a Site Template in SharePoint which has Records Management enabled. Records Management is explained below and can be enabled on any site within SharePoint and then managed on the Lists and Libraries within.

What Records Management does is allows automated control over items in a list and documents in a library (often refered to as just items below).  It has some similar features to a workflow, but is managed by list/library administrators instead of SharePoint admins.  For example, if a certain kind of item should be protected from modification for 1 year after it’s created and then it should be deleted, a library administrator can use Records Management to accomplish that.
How to manually declare/undelcare as a record:
  • If the following doesn’t work, make sure manual declaration is enabled on the list/library (see below).
  • Declare Record: Select the item and click Declare Record in the ribbon.
  • Undeclare Record: Click the drop-down menu on the item title field and select Compliance Details. Now, click Undeclare Record under Record Status.
Site Collection Settings (Site Collection Administration > Record declaration settings):
  • Record Restrictions: At the Site collection level (not list or library), items can be protected against edit and/or delete or none.
  • Roles: Select who can declare and undeclare records.  Choose from list contributors (list permissions: edit), list administrators (list permissions: manage list), or policy actions.
List/Library Settings (List/Library Settings > Record Declaration Settings):
  • Allow or deny manual declaration.  Still possible via policy actions regardless of this setting.
  • Can automatically declare as a record any new items added to the list/library.
Once an item is declared as a record the Library/List Settings > Information management policy settings are in effect:
  • Settings can be applied according to the list/library and its folders, or defer to the polices set for Site Content Types.  If using Site Content Types, my instinct is to create new Content Types instead of modifying the policies on any default site content types... it’d be bad if I setup a policy on the “Document” content type which in turn unintentionally started deleting stuff elsewhere on the site.
  • Retention performs actions on items after a select amount of time passes, e.g.: send to recycle bin, permanently delete, start a workflow, declare as a record, etc. Note: Retention policies can be set on non-records and records independently.
  • Auditing tracks what happens to a document while is is declared a record, e.g.: viewing, editing, copying, deleting, etc. Note: To view the audit log, open the Compliance Details found on the contextual menu on the item’s title field.
  • Barcodes can be required. SharePoint doesn’t automatically generate a barcode, but users can be prompted to add one.
  • Labeling can be required and either specified within sharepoint or manually entered by the user.
 

I’ve found these articles particularly helpful in getting started:
Configuring In Place Records Mangement on microsoft.com
Introducing Records Management in SharePoint 2010 on msdn.com
Introduction to the Records Center on microsoft.com

January 09, 2013

Workflow Status Values

When trying to filter based on a workflow status I need to know what the numeric value is behind the text.  I find this helpful when setting up views or site workflows for doing automated cleanup of old list items.

For example if I want filter for incomplete workflows I can filter WF Status Column not equal to 5.

This list of status Name/Value pairs is from MSDN:
0 - Not Started
1 - Failed on Start
2 - In Progress
3 - Error Occurred
4 - Canceled
5 - Completed
6 - Failed on Start (retrying)
7 - Error Occurred (retrying)
15 - Canceled
16 - Approved
17 - Rejected

I didn't see this on MSDN, but if a workflow has not been initiated on a list item the field content is Null.  Filter for "is/is not empty" if that's the case.  Also, this isn't a Nintex setting, but I use it all the time with Nintex workflows.

December 05, 2012

SharePoint Calculated Column from Date

When building a calculated date column SharePoint will show "12/30/1899" if the source field is null.  Instead, to display the calculated column as blank, an ISBLANK statement inside an IF statement can be used:

=IF(ISBLANK([DATE_COLUMN]),"",[DATE_COLUMN])

October 11, 2012

Switch to Claims Based Authentication and Nintex

If you're making the switch to Claims-based authentication in SharePoint, be prepared for lots of manual clean-up especially with Nintex (about 20 hours total for one web application with several workflows).  Here are a few things I found:
  • Authenticated Users (if used for access) needs to be re-setup
  • Nintex Workflows need to be republished
  • Some Workflows need to be restarted
  • This was about as messy as upgrading from 2007 to 2010.
Be sure to run this in test prior to production... If you're not 100% comfortable with the procedure below, I suggest going through the trouble of making a copy of your production environment... I know that can be a lot of work, but may be worth it since switching back from claims-based is not supported.

To make the switch to claims based authentication I used the steps provided by the MDSN library.  I used the steps listed in Tip 2 from the article... here is the process I used for a single web server:
  1. Log on to the SharePoint server with the Farm Admin account.
  2. In SharePoint Management Shell, run "get-SPWebApplication" and note the one to switch.
  3. Run the PowerShell script in the MSDN article and then after the $wa.MigrateUsers($true), run $wa.ProvisionGlobally().
  4. Once I was then able to log on with an admin account I starting verifying/updating "Authenticated Users" on the site and subsites, Search, and MySites.  In Claims based, Authenticated Users is now, "All Authenticated Users".
  5. Once things settle down, check all of your Alternate URLs... you might want to do this with a clean profile so any cached credentials aren't showing false problems... or delete them using Credendial Manager in control panel.
  6. Also check any outlook connections or mapped drives (drive mapped to a document library).
  7. Check the application event log for errors.
  8. Use the ULS logs for any errors you see with Correlation IDs.
  9. For Nintex I had several errors... but basically the same thing multiple times, "Object reference not set to an instance of an object" for scheduled workflows, as well as opening workflows for editing.  To resolve I opened the workflow, exported the entire workflow to a file, created a new workflow, imported the file, then published the new workflow replacing the old one.  Any stored credentials will need to be verified.  In several cases I then had to restart workflows that were running at the time of the switch to Claims.  I ended up rebuilding one older workflow because it was faster than troubleshooting each step... and it needed it anyway.

September 24, 2012

Filtering Infopath form for a SharePoint List

I'm very new to Infopath and I'm using it to build some list forms for SharePoint 2010 Enterprise.  I wanted to filter a drop-down box to just those items which I had flagged to be used in the list.  My problem was I couldn't filter on my Yes/No checkbox field because it didn't show up in the drop-down list box properties.

If I delete that data source and create a new one I could filter, but it wouldn't publish (or work right if it did publish).

I then came across this blog entry on nothingbutsharepoint.com where Toni explains (including screenshots) that I don't need to replace the data source, but instead create a new one to populate the available choices (duh!).

If you're not familiar with the process, please see that blog... for my purposes the field already exists and is in working order, just not filtered... there's also a Yes/No Checkbox on the source list.  These are the steps that I will likely miss in the future:
  1. Open the Drop-Down List Box Properties
  2. Add a new DataSource and select the source list (list of items you want to select from).
  3. Select the fields that you want to display and filter in addition to the ID field which should already be selected.
  4. Finish the wizard to get back to the properties page.
  5. Change the Value to the ID field (and Display to the appropriate display field)
  6. Click the button next to entries (looks like a directory tree) and click Filter Data... from here you can setup to filter on the filter field.

September 21, 2012

Add Indicators to Custom List

I spent some time trying to figure out how to add an indicator to a custom list in SharePoint.  I finally cam across this: http://sytrea.blogspot.com/... who references another blog (http://blog.pathtosharepoint.com/).

It's quite helpful so I don't want to lose it and have included it here.  The example he provided I've copied here and uses a Yes/No column, a calculated column, and some java script in a content editor window.

  1. Create the Yes/No column and name it "Approved".
  2. Create a calculated column and enter this as the calculation:      ="<div> <img src='/_layouts/images/KPIDefault-"&IF([Approved]=TRUE,0,2)&".gif'/></div>"
  3. On the page where you want the images displayed add a Content Editor web part and include this as the source code:
<script type="text/javascript">
/*
Text to HTML Lite - version 2.1.1
Questions and comments: Christophe@PathToSharePoint.com
*/


function TextToHTML(NodeSet, HTMLregexp) {
var CellContent = "";
var i=0;
while (i < NodeSet.length){
try {
CellContent = NodeSet[i].innerText || NodeSet[i].textContent;
if (HTMLregexp.test(CellContent)) {NodeSet[i].innerHTML = CellContent;}
}
catch(err){}
i=i+1;
}
}


// Calendar views
var regexpA = new RegExp("\\s*<([a-zA-Z]*)(.|\\s)*/\\1?>\\s*");
TextToHTML(document.getElementsByTagName("a"),regexpA);


// List views
var regexpTD = new RegExp("^\\s*<([a-zA-Z]*)(.|\\s)*/\\1?>\\s*$");
TextToHTML(document.getElementsByTagName("TD"),regexpTD);


</script>

From here changes can be made to fit the current needs... the images, column, etc...

September 20, 2012

Disable mobile browsing view in SharePoint

The default mobile browsing interface for SharePoint is awful for mobile navigation.  To preview, add "?mobile=1" to the end of your sharepoint URL (i.e., http://sharepoint/default.aspx?mobile=1).  Not very usable... left navigation is gone and only webparts that are enabled appear.  Images are not scaled down, and if you want to setup webparts specifically for mobile access, they're also visible to desktop users.

Instead of even looking into custom building a mobile interface for SharePoint, I found Randy's blog entry explaining how to change it so mobile devices use the same interface as desktop users.  I've summarized the steps I took here:

  1. Navigate to a folder in the virtual directory of your site which is something like [Drive]:\inetpub\wwwroot\wss\VirtualDirectories\[Site ID as found in IIS]\App_Browsers.  If you can't find it, open IIS and check the virtual directory location.
  2. Make a backup copy of the compat.browser file then open with notepad or other text-based editing tool.
  3. Locate <capability name="isMobileDevice"  value="true" /> and change it to false.  There are several entries for various mobile devices... so many changes to make.
  4. Restart the site within IIS.  Performing an IISReset.exe is not necessary.

September 06, 2012

Deleting sealed columns in SharePoint 2010

"Sealed" columns can't be deleted through List Settings or SharePoint designer.  I had accidentally added a sealed column to a list and needed to delete it, not just hide it from the content types.  I found this PowerShell script in a few places around the internet though JShidell presented it best.

Run in SharePoint 2010 Management Shell (PowerShell):

$web = Get-SPWeb -identity http://portal/site
$list = $web.Lists["Name of List"]
$column = $list.Fields["Name of Column"]
$column.Hidden = $false
$column.ReadOnlyField = $false
$column.Allowdeletion = $true
$column.Sealed = $false
$column.Delete()
$list.Update()

August 29, 2012

Hide Left Navigation, Top Navigation, Ribbon, etc in SharePoint 2010

I was trying to find a way to hide the quick launch for a particular page in SharePoint 2010 and this blog explains how to use a Content Editor Web Part to hide the quick launch which works well... with a minor modification... otherwise it's pretty much the same.  See that blog for details.

See far below for hiding the everything including the top navigation, ribbon etc.

Here's the quick process:
  1. Add a Content Editor web part (under Media and Content).
  2. Click to edit the new web part and under the 'Format Text' ribbon, in the Markup section click HTML --> Edit HTML Source.
  3. Paste the following text (slightly modified from Christian's blog):

  4. <style type="text/css">#s4-leftpanel { DISPLAY: none}.s4-ca { MARGIN-LEFT: 0px}</style>
  5. Click OK.
  6. I had to open the webpart in SharePoint designer and set the webpart to hidden... the option was greyed out in the browser.
I also changed the title on the Web Part to "Hide Quick Launch" so I could quickly identify exactly what it does.


The same concept can be applied to the 'Recently Modified' added to the left navigation for Wiki pages as shown here on Microsoft.com.  The content is slightly different:

<style type="text/css"> .s4-recentchanges { display:none; } < /style>


Here's how to hide everything using a Content Editor web part (CEWP) as I found it on the Sharep10nt blog.  The way I accomplished it is I put this content into a txt file and saved it to the Site Assets library then pointed the CEWP to that file.  I can then simply remove that file if I need to edit the page.  Another option for disabling the CEWP is appending "?Contents=1" to the URL then selecting and closing the CEWP.  Here's the CEWP content:

<style type="text/css">
#s4-ribbonrow, .ms-cui-topBar2, .s4-notdlg, .s4-pr s4-ribbonrowhidetitle, .s4-notdlg noindex, #ms-cui-ribbonTopBars, #s4-titlerow, #s4-pr s4-notdlg s4-titlerowhidetitle, #s4-leftpanel-content {display:none !important;}
.s4-ca{margin-left:0px !important; margin-right:0px !important;}
</style>

June 08, 2012

Microsoft Office prompts for username and password when accessing SharePoint

If a Windows 7 computer using IE 9 (or 8) is prompted for a username and password when accessing Word or Excel documents on SharePoint there are some things that can be done.

First, make sure the site is in the local intranet zone and that "Automatic Logon only in Intranet Zone" is selected in Internet Options.  To verify this setting, close all IE windows and Office apps connected to the sharepoint server.  Then in Control Panel open up Credential Manager and remove any credentials to the server (run "control userpasswords2" in Vista).  If you're logged into your computer using a domain account, then the next time you open the SharePoint page it should automatically log in.

If the connection to the server is using a Fully Qualified Domain Name (FQDN), there are some additional steps that may need to be completed so Office doesn't prompt for a username.  The notes below are sourced to MS article http://support.microsoft.com/kb/943280:

In the registry, browse to HKLM\System\CCS\Services\WebClient\Parameters and add a multi-string value named "AuthForwardServerList" (without quotes).  Then add *.domain.com as a value.

These two settings have fixed almost all credential problems in both Vista and 7.  I still have some lingering XP machines that are dealing with credential prompts... if I find an answer I'll post it.

May 31, 2012

Importing profile pictures from AD to SharePoint 2010

Tried many things, many of them complicated, but in one of the more recent cumulative updates Microsoft has a way to get this to work.  To start, I followed this SharePointAdam blog entry: http://sharepointadam.com/2010/11/18/import-user-profile-photos-from-active-directory-into-sharepoint-2010/

The first thing to do is get pictures into active directory.  Our Network admin person used a tool from CodeTwo to upload pictures.

To get them into SharePoint I logged onto the server as the Farm Admin (admin rights are required for PowerShell script later on):

1. Opened up Manage User Properties and setup the Picture Property to import from the thumbnailPhoto attribute.
 
2. Verified that the correct OUs are selected in the Synchronization Connections and Start a Full Sync.

3. Ran the following command in the SharePoint 2010 Management Shell:
Update-SPProfilePhotoStore -CreateThumbnailsForImportedPhotos 1 -MySiteHostLocation <My Sites host location url>

I found the sitehosts by typing Get-SPSites in the console... just used the one I know is for My Sites.

Note: If "-CreateThumbnailsForImportedPhotos" isn't recognized then you don't have a recent enough Cumulate Update... I don't know when it was added, but I do know it's in the March 2012 CU.  Any other errors are likely permissions related and can be resolved by logging in as the Farm Admin.

4. At this point I'm able to pull up a users profile and see the picture is now displaying.

5. To setup the script as a scheduled task I used http://get-spscripts.com/2011/01/running-sharepoint-powershell-script.html as a guide. I created the script in notepad, saved it as a PS1 file, and setup the scheduled task.

Script text:
Add-PSSnapin Microsoft.SharePoint.PowerShell -erroraction SilentlyContinue
Update-SPProfilePhotoStore -CreateThumbnailsForImportedPhotos 1 -MySiteHostLocation <My Sites host location url>

Schedule Setup:

May 03, 2012

SharePoint Library Incoming E-Mail failure

I have document libraries that are setup with incoming email.  However the email was never reaching the document library.  It was getting to the drop folder ([drive]:\inetpub\mailroot\drop) so the problem was within SharePoint.  Turns out the logs were complaining about the site collection quota had been exceeded... which wasn't the case because I know the site quota was more than 4 times the current size.

After talking to Technical Support the quota needs to be set in two locations:
  • Web Applications > General Settings  (I had it set here)
  • Site Collections > Configure Quotas and Locks (I didn't have it set here)
After setting it in both locations emails began to flow.  I think I kicked off the job to make sure (Timer Job Status > Microsoft SharePoint Foundation Incoming E-mail > Run Now).


There are several other pieces to the puzzle to make incoming email functional.  Many of these are the functional rolse of a network and exchange administrator(s):
  • Install and configure SMTP service on the SharePoint server via IIS Manager 6.0.
  • MX Records in DNS
  • Incoming E-mail settings in Central Admin.  Setup as basic first, then advanced to allow SharePoint to create contacts in AD so they show up in the global address book... there are some exchange settings to make that work.
  • Hub Transport --> Send Connector in Exchange 2010 (for local senders).
  • If internet accessible: Firewall settings and spam filters.
  • Important: Be sure to prevent spam and open relay when setting up SMTP.

Add Top Navigation Bar to SharePoint Search Center

By default the top navigation bar is not included in Search Center.  This TechNet Forum discussion explains it well.  I'm not a coder and I don't want to lose this information so I've summarized it here.  I don't know exactly what all of it does, but I can guess at it.

Using SharePoint Designer to edit the Search Center site, check-out the page layout SearchMain.aspx, edit it in advanced mode, find this section of code shortly after the ContentPlaceHolderID="PlaceHolderTitleBreadcrumb" (creating a backup copy is recommended)... again not a coder so I don't know the correct terminology:

</ContentTemplate>
</SharePoint:UIVersionedContent>
<SharePoint:UIVersionedContent UIVersion="4" runat="server">
<ContentTemplate>


Then add this code (mine was at line 100):

<div class="s4-lp s4-toplinks" style="background-image:url(/_layouts/images/selbg.png); background-repeat:no-repeat;
repeat-x:left top; background-color:#f6f6f6; vertical-align:middle; min-height:25px; border-top:1px solid #e0e0e0;
border-bottom:1px solid #b8babd">
    <SharePoint:AspMenu
    ID="TopNavigationMenuV4"
    Runat="server"
    EnableViewState="false"
    DataSourceID="topSiteMap"
    AccessKey="<%$Resources:wss,navigation_accesskey%>"
    UseSimpleRendering="true"
    UseSeparateCss="false"
    Orientation="Horizontal"
    StaticDisplayLevels="2"
    MaximumDynamicDisplayLevels="1"
    SkipLinkText=""
    CssClass="s4-tn"/>
    <SharePoint:DelegateControl runat="server" ControlId="TopNavigationDataSource" Id="topNavigationDelegate">
       <Template_Controls>
          <asp:SiteMapDataSource
          ShowStartingNode="False"
          SiteMapProvider="SPNavigationProvider"
          id="topSiteMap"
          runat="server"
          StartingNodeUrl="sid:1002"/>
       </Template_Controls>
    </SharePoint:DelegateControl>
</div>


Save the file and check it back in.  If Source Control is enabled, you'll need to approve the changes before they're visible to everyone.  This goes for the file modifications below as well.

Now, because these changes are referencing the corev4.css file and the minimal.master page does not include a reference to that I need to include that css file in the minimal.master.  Again, I'm not a coder so there might be a cleaner way to do this!

Edit, save, check-in, and approve the Master Page minimal.master to add this line where the other css are referenced (mine was line 22):

<SharePoint:CssRegistration Name="corev4.css" runat="server"/>

This will fix the default page.  The same code as far above needs to be done to SearchResults.aspx (my line 114).  Haven't found the place to add it in Advanced Search yet.

April 24, 2012

SharePoint prompted to save instead of open

The default installation of SharePoint 2010 will require users to save some files (such as PDFs) locally instead of opening them using the default program on the client.  There is a central admin setting to change that behavior:
  1. Central Admin --> Manage Web Applications
  2. Open up the General Settings on the desired application
  3. Change the "Browser File Handling" setting from Strict to Permissive

SharePoint Authentication

Had some users (not all) who were being prompted to logon to sharepoint everytime they connected.  They'd enter their username and password, but because the server is using a public friendly URL alias it didn't check active directory by default.  My Network Admin friend found that adding it as a trusted site and then setting the advanced settings to automatically log on using the current user's credentials it'd work.

I'm thinking adding it to the Local Intranet would do the same thing and wouldn't require settings changes, but I'm wondering if there's something screwy with Vista clients.  Oh well, at the very least it's something to check into in the future.

Something else he found along the way is to get to the credential manager (Windows 7 Control Panel) in Vista: "control userpasswords2" on the start --> search.

April 09, 2012

Looback errors on SharePoint server

While testing a migration from one SharePoint server to another I was noticing several various errors that may all be attributed to the same problem.  The underlying configuration is the default zone URL is a dns alias.  Errors:
  • Nintex Workflow returns "Error returned from server: The remote server returned an error: (401) Unauthorized. The workflow is starting another workflow which saves attachments on a list item to a document library.
  • In the IIS log there are several 401 errors at the time of the workflow but no username.
  • The SharePoint Server Search has error ID 14 in the event log which is the SharePoint URL cannot be crawled.  The same errors can be found in the Crawl History for the Search Service Application (Central Admin --> Application Management --> Manage Service Applications).
After creating and setting the registry key DisableLoopbackCheck (DWORD) = 1 at HKLM\SYSTEM\CurrentControlSet\Control\Lsa\ (see Microsoft Support Article 926642 for specific steps):
  • Search no longer errors trying to access the local SharePoint sites (there are errors trying to access specific files).
  • Workflow does not error when trying to call the second workflow.

April 06, 2012

How to Hide Quick Launch in SharePoint 2010

When the site is opened in Sharepoint Designer there's a check-box to enable or disable the Quick Launch for the site.  SharePoint Designer is a free tool from Microsoft.  Here are directions in MSDN: http://msdn.microsoft.com/en-us/library/gg144573.aspx.

April 03, 2012

Upgrading Nintex Workflow to 2010

I'm in the process of doing some test upgrades of SharePoint Service 3.0 to SharePoint Standard 2010.  Part of that features Nintex Workflow.  I'm following their 2007-2010 Upgrade Instructions using the Database Attach Upgrade method.  One part of the process is for changing the server and database name of the imported database.  I had to also include the instance name (should have been obvious) and restart IIS to get it to work.

I ran into the problem because my first round of testing was upgrading our test system which easily fit into the SQLExpress limit of 10 GB.  Our production system is more than 10 GB so I had to graduate to using the new production SQL Server for testing (though not actually in production yet).  As part of that process I there are certain roles that need to be on the server and I figured it'd be easiest if Nintex Workflow provisioned all of that rather than doing it manually.  I restored the production workflow database to the new server and when attempting to connect (Nintex Workflow Management --> Database Setup) to it I got this message in the browser: "Unexpected SQL error occurred.  Server name: servername Database name: database name. Correlation ID: [.....]".


Using ULS Viewer found on MSDN I was able to find out that it's basically a Named Pipes server can't be found (error 40)... but what's odd is it's the server and database of the current Nintex database (though without the instance ID), not the new location.

Resolution:
I pulled up the database table on the existing Nintex Workflow database and changed it to the current system\SQL Instance.  I rebooted the server (iisreset probably would have worked just as well) and was able to point the system to the new database on the production server.  Make sure the database table on the new server is correct before attempting to connect to it from Central Admin or your 2007 workflow environment will break.