Tuesday, February 21, 2012


My SharePoint Cave has been moved.


I will continue to blog about my SharePoint/CRM discoveries, over at Collective Intelligence.

Please update your bookmarks.

Monday, March 28, 2011

Migrating Sites to different Site Collections

There are three methods to exporting/backing up a site.
  1. Saving Site as Site Template
    • ​Click on site actions / site settings
    • Save Site as Site template
      • ​Click Include Site Content
    • Browse to Site Gallery
    • Save .tmp file
    • New Site Collection
    • Browse to New Site Gallery
    • Upload Site Template
    • Create New Site
    • Use Custom Site Templates

  2. Using SharePoint Designer
    • Open Site in SPD
    • Click Site > Administration > Back Up Site
      • Click Include Site Archives
    • New Site Collection
    • Create New Blank site
    • Open new Site in SPD
    • Click Site > Administration > Restore Site
    • Select the backedup site (.cmp)
    • Click Restore

  3. ​​Using STSADM CMD
    • On the SharePoint Server, Open CMD as Administrator
    • Browse to C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\Bin
    • Backup: STSADM -o export -url http://spsite:80/Site -filename c:\export\Site -includeusersecurity
    • Create new blank site
      • STSADM -o createweb -url http://newspsite:70/Site1
    • Restore: STSADM -o import -url http://newspsite:70/Site -filename c:\export\Site.cmp -includeusersecurity
​All Three Methods should successfully move/migrate your SharePoint Site.

If your new site uses a different Master Page, you may receive the error FILE NOT FOUND.  if so, do these following steps to fix the error

    • Click on the new site that is erroring
    • Browse to the settings
      • /_layouts/settings.aspx
    • Click on Master Page
    • Click off inherit Master Page and select the current Master Page
      • Reset all Sites to Current Master Page.
    • Click Okay
  • ​Now the site should be back up.
    • ​​Afterwards you can go back and switch the Master Page to inherit.
    Hopes this helps someone in the future.

    Thursday, January 6, 2011

    Setting a Fixed Width in SharePoint 2010

    This needs to blogged about once again, since it seems to be an ongoing issue with SharePoint skinning.

    This post will show how to easily go from the default liquid layout, to a 960px width with auto scrolling.
    Step 1. Alter the Body Tag – replace scroll="no” with style="overflow:auto;”
    (This will allow the Body to have a scroll bar when needed.) 
    Step 2. Add the below <div> tag directly after the <body> <form> tags
     <div style="width:960px; margin:auto;”>


    Step3. Don’t forget to add the closing </div> tag directly after  
    <SharePoint:DeveloperDashboard runat="server"/> around line 625

    Thats it, Save your master page and refresh your SharePoint... you now should have a fixed width
    Published with Blogger-droid v1.6.5

    Tuesday, December 7, 2010

    Upgrading to SharePoint 2010

    I was going to start typing up an upgrade blog then I stumbled onto this really nice set of articles by Anshul.  So instead of re-blogging I will just link to his blog and give him the credit for his work.  Enjoy.

    Here are the 4 Approaches Anshul took when upgrading from MOSS 2007 to SharePoint 2010.

    In-Place Upgrade
    The InPlace upgrade is the easiest way to upgrade from MOSS 2007 to SharePoint 2010. In this approach you will install SharePoint 2010 on the same machine where MOSS 2007 was installed and the Upgrade wizard will upgrade MOSS 2007 to SharePoint 2010.

    Database Attach Upgrade
    In database attach approach you install the SharePoint Server 2010 on a fresh Machine and you upgrade all the sites from your MOSS 2007 server by detaching the Content databases from MOSS Server and attaching them to the SharePoint 2010 server.

    Hybrid Approach 1
    In this approach you can make the databases of your MOSS 2007 farm read only and then Install SharePoint 2010 on a different machine. Upgrade your MOSS 2007 farm using the Database Attach approach. (On the new SharePoint 2010 farm) and the redirect your users to the new upgraded farm. This will allow you to give read only access to the users while the farm is being upgraded so it will help you in downtime mitigation.

    Hybrid Approach 2
    In this approach you can detach your content databases and then do an In-Place upgrade once that is done you can attach the databases using the Database Attach approach. The benefit of this approach is that you can have the speed of the DB Attach upgrade and you can also keep your farm wide settings as you are upgrading the farm by using the In-Place upgrade.

    Upgrade Methods in SharePoint 2010: Part 1

    Upgrade Methods in SharePoint 2010: Part 2

    How To Upgrade to SharePoint 2010 using Database Attach method: Part 1 

    How To Upgrade to SharePoint 2010 using Database Attach method: Part 2

    [courtesty of Anshul Sehgal - http://sharepoint2010blog.blogspot.com/]

    Monday, December 6, 2010

    Displaying a Holiday or Monthly Event in a Web Part

    I created several custom lists that display a specific Holiday, Pay Dates, Birthday, Etc...
    I now want this list to display as a web part and only display the "current month" activities.   After trying a few methods, I stumbled upon this calculated column to solve my issue.

    • First I created all the custom columns, including a Date Column (DateDisplay).  
    • Then I created a Calculated (calculation based on other columns) Column
    • Named it ItemDisplay
      • Made it a Content Type
      • Inserted the following formula: 
        • Calculated (calculation based on other columns)
        • Finally made the Data Type Return a Single Line of Text.
    • Next I added the web part, edited the current view
    • Place a filter on it so it shows only Items, "ItemDisplay" is Equal to 1
    What the calculated value means
    =IF the current Month of (Today) EQUALS the Month of (DateDisplay)
    Then set the value to 1, if not then set it to 0
    The Web Part filter will then display only items Equal to 1

    EDITED: I haven't been able to make this process automated, but at the beginning of each month, I just edit the current months items, don't make any changes, just save the item and the formula will kick in and display the month as a 1.  Hope this makes sense.

    Thursday, December 2, 2010

    Simple CRM Priority Dropdown to change Due Date

    This next situation I ran into, called for a Due Date field and a Ticket Priority Pick List, they requested that when a technician comes into the ticket and changes the priority status it will automatically update the Due Date.  The Due Date is auto-populated with a Normal priority, so the Due Date will be 7 Days after Todays date, This will be pushed forward or back depending on the priority status selected.

    For Example If I selected :
    High priority will change the Due Date to Todays Date.
    Normal priority will push the Due Date back 7 days from Today.
    Low priority will push the Due Date back 14 days from Today.
    Standby priority will push the Due Date back 30 days from Today.

    So, How'd I do this?
    I created two fields in CRM 4.0
    One is called datedue, which is a basic date field
    The second is a Priority picklist with the following types:
    • Open up the Main Form
    • Change properties on the Priority Field
    • Click Events Tab
    • Edit onChange
    • Check that the Event is enabled
    • Paste the following code:
    var PRIORITY_HIGH="High";
    var PRIORITY_NORMAL="Medium";
    var PRIORITY_LOW="Low";
    var PRIORITY_STANDBY="Standby";
    var DUE;
    var TODAY;
    TODAY = new Date();
    // If Due Date is null, set it to today's date.
    DUE = crmForm.all.new_datedue.DataValue;
    if (DUE == null)
    DUE = new Date();
    // Set the due date based on the value of the Priority field.
    switch (crmForm.new_priority.SelectedText) {
    DUE = TODAY;
    case PRIORITY_LOW:
    DUE = TODAY.setDate( TODAY.getDate() + 14);
    DUE = TODAY.setDate( TODAY.getDate() + 7);
    DUE = TODAY.setDate( TODAY.getDate() + 30);
    crmForm.all.new_datedue.DataValue = DUE;
    •  Save and Close, Test Changes, Publish the Entity

    Adding a CRM 4.0 Related Entity to the Main Form using IFRAME

    First create your two entities and relate them together.

    • On the main form, create an iframe section
    • Create a new IFRAME, place it in the section

    URL: about:blank
    • Open the Form Properties
    • Edit Onload
    • Check Event is enabled
    • Paste the following code
    var navId = "nav_new_new_assets_new_assetitem";
    if(document.getElementById(navId) != null)
    var tmp = document.getElementById(navId).onclick.toString();
    tmp = tmp.substring(tmp.indexOf("'")+1, tmp.indexOf(";"));
    var loadArea = tmp.substring(0, tmp.indexOf("'"));
    var roleOrd = (tmp.indexOf("roleOrd") == -1) ? -1 : tmp.substring( tmp.indexOf("roleOrd"), tmp.lastIndexOf("'")).replace("\x3d", "=");
    crmForm.all.IFRAME_Items.src = (roleOrd == -1) ? GetFrameSrc(loadArea) : GetFrameSrc(loadArea) + "&" + roleOrd;
    function GetFrameSrc(tabSet)
    if (crmForm.ObjectId != null)
    var id = crmForm.ObjectId;
    var type = crmForm.ObjectTypeCode;
    var security = crmFormSubmit.crmFormSubmitSecurity.value;
    var path = document.location.pathname.substring(0, document.location.pathname.indexOf("edit.aspx")) + "areas.aspx?";
    return (path + "oId=" + id + "&oType=" + type + "&security=" + security + "&tabSet=" + tabSet);
    return "about:blank";
    • Now there are two things we need to edit here (items in bold). 
    • First one is var navId=
      • This needs to be the related entity, but we want the navId, not the URL.
      •  Easy way to find this ID, is to use IE Developer Tools.
        • Open your main form
        • Click Tool > Developer Tools
        • Within Developer Tools, Click the ARROW (Select Element by Click)
        • Now go back to your main form and click the related entity under details
        • A New window will appear in Developer Tools, It should have highlighted the CRM Nav Subarea.
        • Locate the ID=

    • Next Change is the crmForm.all.IFRAME_Items.src
      • Make sure to use your proper iframe ID (Iframe_Items)
    • That should be it, Save and Close.
    • Publish your entity and make sure the related entity is displaying properly