DCSIMG
Rany Blog

Rany Blog

Sharepoint Point OF View

sharepoint 2007 Migrating content

the situation is  :


I have two boxes; web01 and web02 (Win2K3/MOSS 2007). Both boxes use an SQL box sql01 for their databases.


Web02 is going to be decommissioned, and required content needs to be migrated over to web01.


I am doing the easy stuff first like copying lists etc over as templates.


The tricky part is the document management system (DMS) that exists on web02. I need to copy the content including metadata to a new site on web01,

update the CT and metadata, and then decommission web02 and commission the new site on web01.

sharepoin 2007 migration conent

the best way to do this.



1. Backup the DMS website (on Web02) through SharePoint Designer (our DMS was a Document Center Website)

2. Create a empty site on Web01

3. Restore the backup on the newly created empty site on Web01, again using SharePoint Designer


It worked nice for me…hope it helps

Bug with the LookupField control when the number of items is greater than 20

 

If the number of items is <= 20 then the control generate a DropDownList.
If the number of items is > 20 then the control generate a TextBox and an Image

When the LookupField has more than 20 items, we receive thew following error:
Microsoft JScript runtime error: Object required

The problem is raised in the Core.js file in the AbsLeft method.

function AbsLeft(obj)  
{  
    var x=obj.offsetLeft;  
    var parent=obj.offsetParent;  
    while (parent.tagName !="BODY")  
    {  
        x+=parent.offsetLeft;  
        parent=parent.offsetParent;  
    }  
    x+=parent.offsetLeft;  
    return x;  
}


The error is on "while (parent.tagName !="BODY") ".

It appears that the loop never finds the BODY tag in the HTML document.  I read on the Internet that this situation can occurs when using relative and absolute positionning within the CSS.

 

The best way I have found to make sure a lookup field is rendered as a normal dropdown, rather than that quirky thing SharePoint likes to insert, is to change the bound control in the XSL from "SharePoint:FormField" to "SharePoint:DVDropDownList".

 

You then have to add an extra data source to populate the dropdown options, but I've found this to be usefull too, since you can sort and filter the items in the list.

 

This is more like the traditional dropdown binding scenario - get the list of options from the lookup table and populate the selected choice from the proper field in the "main" table. The wierdo thing here is that the DVDropDownList control doesn't look as if it is bound to the "main" table (or, in this case, List) because of the esoteric syntax of the ddwrt:DataBind method.

 

Solution Steps:

1.       Add a new "SharePoint:SPDataSource" to the web part that points to the list containing the lookup items

2.       Replace the "SharePoint:FormField" control with a "SharePoint:DVDropDownList" (I just leave the old control and overwrite the element)

3.       Change the appropriate element attributes (see code attachment)

4.       Update the ddwrt:DataBind call to pull input from the new DVDropDownList control

5.       ! Note that in ddwrt, "i" is for insert and "u" is for update

 

I hope this helps, as I know this is a frustrating problem.  It's a rather ridiculous work-around, but that's SharePoint for you...

 

<!-- Here's the new SPDataSource for the lookup: -->

<SharePoint:SPDataSource

                id="spdsRegions"

                runat="server"

                DataSourceMode="List"

                UseInternalName="true"

                selectcommand="&lt;View&gt;&lt;/View&gt;">

                <SelectParameters>

                                <WebPartPages:DataFormParameter

                                                Name="ListName"

                                                ParameterKey="ListName"

                                                PropertyName="ParameterValues"

                                                DefaultValue="Regions"/>

                </SelectParameters>

</SharePoint:SPDataSource>

 

 

<!-- This is the ORIGINAL control for comparison -->

<SharePoint:FormField

                runat="server" id="ff11{$Pos}"

                ControlMode="New"

                FieldName="Regions"

                __designer:bind="{ddwrt:DataBind('i',concat('ff11',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@Regions')}" />

 

<!-- And here is the NEW control, which will render as a dropdown -->

<SharePoint:DVDropDownList

                runat="server"

                id="ff11{$Pos}"

                DataSourceID="spdsRegions"

                DataTextField="Title"

                DataValueField="ID"

                SelectedValue="{@Region}"

                __designer:bind="{ddwrt:DataBind('i',concat('ff11',$Pos),'SelectedValue','SelectedIndexChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@Region')}" />

 

<!-- Don't forget to change the 'i' in ddwrt:DataBind to a 'u' if this is an update rather than an insert form -->

Access denied error when adding new page to sharepoint

  1. Go to Site Actions -> Site Settings ->Modify all site settings
  2. Go to Galleries -> Master pages and page layouts
  3. From the list toolbar, select Settings -> Document library settings
  4. Select permissions for this document library
  5. Add 'Restricted Read' access to the required groups

PDF Icon In Moss (Sharepoint 2007)

moss doesn't install an icon for pdf document type file by default . inorder to

install the pdf icon into moss you should follow the following stips :

1)  right click to download image   

2)  save the icon to  (C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\template\images)  and rename the file to icpdf.gif

3) open the file docicon.xml  you should find it  here : C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\template\xml\docicon.xml

4) add a new mapping key 

          <Mapping Key="pdf" Value="icpdf.gif" />

5) save the file docicon.xml then restart IIS (iisreset /noforce).

 and now you can see the pdf icon for all the pdf documents within your portal .