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)
        =IF(MONTH(Today)=MONTH(DateDisplay),"1","0")
      • 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:
Low
Medium
High
Standby
  • 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) {
case PRIORITY_HIGH:
DUE = TODAY;
break;
case PRIORITY_LOW:
DUE = TODAY.setDate( TODAY.getDate() + 14);
break;
case PRIORITY_NORMAL:
DUE = TODAY.setDate( TODAY.getDate() + 7);
break;
case PRIORITY_STANDBY:
DUE = TODAY.setDate( TODAY.getDate() + 30);
break;
}
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);
}
else
{
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


Wednesday, December 1, 2010

Proper path to upgrade your SharePoint 2007 to SP2

Below are the steps and links to upgrade SharePoint 2007 to SP2, properly. You must perform these upgrades before you migrate to SharePoint 2010.

1.Download the WSS 3.0 SP1 from the below link
http://www.microsoft.com/downloads/details.aspx?FamilyID=4191a531-a2e9-45e4-b71e-5b0b17108bd2&displaylang=en

  • Download the WSS 3.0 SP1 and run the .exe file
  • Once installation is successful run the "SharePoint Products and Technologies Configuration Wizard" (This wizard should complete all the steps successfully)
  • Recommended Reboot


2.Download the MOSS SP1 from the below link
http://www.microsoft.com/downloads/details.aspx?FamilyId=AD59175C-AD6A-4027-8C2F-DB25322F791B&displaylang=en

  • Download the MOSS SP1 and run the .exe file
  • Once installation is successful run the "SharePoint Products and Technologies Configuration Wizard" (This wizard should complete all the steps successfully)
  • Reboot (This Reboot is necessary)


3.Download the WSS 3.0 SP2 from the below link
http://www.microsoft.com/downloads/details.aspx?FamilyID=79bada82-c13f-44c1-bdc1-d0447337051b&displaylang=en

  • Download the WSS 3.0 SP2 and run the .exe file
  • Once installation is successful run the "SharePoint Products and Technologies Configuration Wizard" (This wizard should complete all the steps successfully)
  • Recommended Reboot


4.Download the MOSS SP2 from the below link
http://www.microsoft.com/downloads/details.aspx?FamilyID=b7816d90-5fc6-4347-89b0-a80deb27a082&displaylang=en

  • Download the MOSS SP2 and run the .exe file
  • Once installation is successful run the "SharePoint Products and Technologies Configuration Wizard" (This wizard should complete all the steps successfully)
  • Reboot (This Reboot is necessary)


**In order to upgrade to SharePoint 2010 YOUR MOSS2007
MUST BE AT SERVICE PACK 2.

SharePoint Users : Last Name Change

This has come up twice now, So I figured I would address this for any future situations... But I received a call this morning, that a user changed her last name. Simple, I first figured, it was updated in Active Directory, so once the SPuser sync occurs everything should be updated... right?

Not so right... I noticed this did not update properly, the account name was updated as well as the Name field. But the email, Last name, and User Name still showed the old last name.

My next step was to delete the user out of the SharePoint group and re add the user. Well same result, right account name, wrong username...

I figured there now has to be a way to delete a single user from the entire site collection then re add them back in as a brand new user, I clicked on the user, and it took me to their mysite, then I clicked on "View User Info" and it took me User Information, where I could edit the user or Delete User from Site Collection. Instead of manually editing the user, I went ahead and deleted them the site collection. Then once I re added them to the SharePoint group, it went out and pulled the new users from AD along with all the updated fields.

I found this odd because one would think this should be an automatic syncing feature, but apparently not.

If anyone has encountered this and AD automatically updated the user in SharePoint, give me a shout.