chandler's blog - MOSS SharePoint 2007, Office 2007, Windows Server 2003 RSS 2.0
 Tuesday, 08 December 2009
If you need the SharePoint DisplayName ("Lastname, FirstName") within a CQWP or for example for a jquery WebService
to filter list items, you can use the following JS function:

Javascript Function:

function getCurrentUser()
{
 var temp= document.getElementsByTagName('a');

 for (var i=0; i < temp.length; i++)
 {
     if(temp[i].innerText.substr(0,7) == 'Welcome')
     {
         return temp[i].innerText.substr(8,temp[i].innerText.length);
     }
 }
}

Tuesday, 08 December 2009 13:18:51 (W. Europe Standard Time, UTC+01:00)  #    -
General | SharePoint
 Sunday, 04 October 2009

Add jQuery to your SharePoint System and add the following script into a Content Editor Webpart:

<script type="text/javascript" src="http://jqueryjs.googlecode.com/files/jquery-1.3.2.min.js"></script>

<script type="text/javascript">
    $(document).ready(function() {
        var soapEnv =
            "<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'> \
                <soapenv:Body> \
                     <GetListItems xmlns='http://schemas.microsoft.com/sharepoint/soap/'> \
                        <listName>Tasks</listName> \
                        <viewFields> \
                            <ViewFields> \
                               <FieldRef Name='Title' /> \
                           </ViewFields> \
                        </viewFields> \
                    </GetListItems> \
                </soapenv:Body> \
            </soapenv:Envelope>";

        $.ajax({
            url: "_vti_bin/lists.asmx",
            type: "POST",
            dataType: "xml",
            data: soapEnv,
            complete: processResult,
            contentType: "text/xml; charset=\"utf-8\""
        });
    });

    function processResult(xData, status) {
        var counter = 0;
        $(xData.responseXML).find("z\\:row").each(function() { counter = counter + 1;
var liHtml = "<li>" + $(this).attr("ows_Title") + "</li>"; $("#tasksUL").append(liHtml); });

$("#counter").html(counter);
} </script> <ul id="tasksUL"/>
<div id="counter"></div>
Sunday, 04 October 2009 15:46:40 (W. Europe Standard Time, UTC+01:00)  #    -
SharePoint
 Sunday, 03 May 2009
Gneral & HTML

  • LightBox 2:
    http://www.lokeshdhakar.com/projects/lightbox2/#how

jQuery & Javascript

  • Core Product - jQuery:
    http://docs.jquery.com/Main_Page

  • Using SharePoint List WebService and jQuery:
    http://weblogs.asp.net/jan/archive/2009/05/06/querying-sharepoint-list-items-using-jquery.aspx

  • JavaScript & PopUp Windows - windows.open
    http://molily.de/javascript-popups

SharePoint

  • Using calculated columns to write HTML:
    http://pathtosharepoint.wordpress.com/2008/09/01/using-calculated-columns-to-write-html

  • Displaying a list on another site:
    http://blogs.msdn.com/jackiebo/archive/2007/02/27/displaying-a-list-on-another-site-in-the-same-site-collection.aspx

  • Customizing SharePoint Context Menus:
    http://blogs.msdn.com/bowerm/articles/175691.asp

  • SPSecurityTrimmedControl to change directly permissions on *.aspx pages for different controls, tags, ...
    http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.webcontrols.spsecuritytrimmedcontrol.aspx
    http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spbasepermissions.aspx

InfoPath

  • Get User Details for InfoPath with SharePoint Webservice "GetUserProfileByName"
    http://blogs.microsoft.co.il/blogs/itaysk/archive/2007/04/05/InfoPath-_2D00_-Get-the-current-user-without-writing-code.aspx


Sunday, 03 May 2009 15:03:01 (W. Europe Standard Time, UTC+01:00)  #    -
General | Infopath | Office | SharePoint
 Monday, 09 February 2009

Issue:

In some cases the deployment of InfoPath forms has to be done through the central administration of the SharePoint 2007 as administrator approved form. For example if you are using custom C# or VB code this procedure is necessary. But are there other ways of deploying the forms to SharePoint server 2007, despite the way using the Publishing wizard of the InfoPath client?


Solution
:

Yes, there are many ways of getting the form templates into the SharePoint server 2007. Depending on your requirements different ways could be appropriate for you. Here I’d like to summarize the differences between administrator-approved Form Server Templates and the simple usage of site content types.

Source code in InfoPath forms requires the form to be fully trusty and therefore you have to upload it through the central administration. This is also leading the SharePoint Server to recycle the application pool of the SharePoint Portal web application. Something that is not very welcome in production environments, because the server is not serving requests for several seconds, up to a minute depending on the hardware and the workload.

Also it is difficult, when the designer of the form does not have administrator privileges on the form server. Such environments require steady contact between designer and administrator to publish, upload and approve the form templates.

So, we’ve not talked about the disadvantages of administrator-approved Form Server Templates, but what about site content types? Probably the site content types requires also a lot of work for the designer, but administrator privileges are only required on the site where the content type is created. But the greatest advantage of using site content types is that the application pool is not recycled and the server is not interrupted.

The procedure is as follows: On the “Modify all site settings” page go to “Site content types”. Click on create and give the content type a name (I suggest you do not use blanks here, you can change it later anyway) and a description. As parent content type please select “Document Content Types” and “Form”. Finally a group has to be set for the content type. A good starting point is the existing group “Microsoft Office InfoPath”.

If you created your content type add site columns from existing site columns or create new ones to be used in your form libraries and finally go to advanced settings and upload your InfoPath form template. The forms will be stored under \\servername\_cts\CONTENT*TYPE*NAME\Template*Name.xsn, but they will work like the administrator-approved Form Server Templates without any restrictions regarding the use of source code. The only real difference is the storage of the files that differs from the \\servername\FormServerTemplates\Template*Name.xsn folder when using the FormServerTemplates method. Probably this could help you a lot and if you experience disadvantages of the site content type method let me know. I didn’t either experience any by now…


Thanks to maikl for this great entry!

Monday, 09 February 2009 11:52:11 (W. Europe Standard Time, UTC+01:00)  #    -
Infopath | SharePoint
 Sunday, 01 February 2009

Issue:

Quite often you run into situations, where you have InfoPath forms in several variations. For example a form with red colored design for critical issues, a yellow one for normal issues, and a green one for absolutely not critical issues. Each of these content types has different fields, but all of them share the same fundamental columns.

To use multiple lists should not be considered to be the correct solution, it would be better to use a single form library and group by content types. Here comes the big drawback: using the same fundamental columns is not easy when using the publishing feature of InfoPath and you probably will run into issues like values of published columns not appearing or multiple columns are created for each content type.


Solution
:

A good start is to create the xml data structure of the forms first, before designing the forms. This helps you to find out about the shared columns. This is important, because you have to know the shared columns before you publish them the first time to the form library.

After developing the xml schemas for the forms and finding out about the shared columns, let’s move to the SharePoint Server 2007 to create what we need. A blank form library is a good starting point. There are several options; here I will describe the one that is in my opinion the cleanest and most appropriate way of doing it.

Create site columns on the site that contains your new form library. I have experienced, that using new groups for the site columns that are named accordingly to your project is a big DO, while using blanks in the names of the site columns is a absolute DON’T. This is because when you are writing XSLT queries or if you are programming C# or VB code for your InfoPath forms and query the lists fields, the blanks will be converted to “%5Fx0020%5F” resulting for example in the field name “This%5Fx0020%5Fis%5Fx0020%5Fa%5Fx0020%5FTest” so not a very desirable name for a variable.

If you finished this first step you are almost done. Just select the site columns in the publishing wizard of InfoPath and all of your forms will publish their data to the same columns, no additional ones will be created and the values will appear correctly when the forms are submitted to the list. At the end, just group the form library entries view by content type or create views that filter by content type to enhance the user experience. It’s really that easy…


Thanks to maikl for this great entry!

Sunday, 01 February 2009 11:45:57 (W. Europe Standard Time, UTC+01:00)  #    -
Infopath | SharePoint
 Saturday, 22 November 2008

Solution:

Save the workflow.  In Tag Properties of your Form Action Button, change the value property to “Sign Up”.  Go to your “onClick” event.  It should read something like this:

javascript: {ddwrt:GenFireServerEvent('__workflowStart={{7696F6EA-2079-4A53-A97B-CE61D99A02AB},New,{66402E3B-C94E-4E6F-9936-10E596CC5795},}')}

Modify it and add the following (see changes bold):

javascript: {ddwrt:GenFireServerEvent(concat('__workflowStart={{7696F6EA-2079-4A53-A97B-CE61D99A02AB},New,{66402E3B-C94E-4E6F-9936-10E596CC5795},ClassID=’,@ID,’}__redirect={MyClasses.aspx}'))}

This change will allow you to pass an input parameter into a workflow and redirect your employee to MyClasses.aspx page that has attendees list view filtered by Created field equals [Me].

Saturday, 22 November 2008 12:28:29 (W. Europe Standard Time, UTC+01:00)  #    -
SharePoint
 Sunday, 19 October 2008
stsadm extensions

Many thanks to Gary Lapointe who developed some very useful extensions for the SharePoint command line tool stsadm.exe.

Link: http://stsadm.blogspot.com/2007/08/stsadm-commands_09.html

Among other cool features with this extesions you are able to:

  • copy lists and list items between sites, sitecollection... including versions and more
  • move sites, create searchscopes, and a lot of more...

SharePoint Designer - Custom Workflow Activities

The team from codeplex did a great job again. They developed some very useful custom workflow activities for the SPD.

Please find them here: http://www.codeplex.com/SPDActivities

This useful activities will include:
  • grant permissions on items
  • reset list permissions inheritance
  • check user permissions/groups
  • extended email features
  • and more ...

Sunday, 19 October 2008 10:04:04 (W. Europe Standard Time, UTC+01:00)  #    -
SharePoint
 Sunday, 24 August 2008
Issue:
 
When your trying to add an Active directory import to your Sharepoint SSP and get an error when retrieving the schema you have to create the following registry key on your SharePoint server:
 
 
Solution:
 
HKEY_LOCAL_MACHINE -> System -> CurrentControlSet -> Services -> NetLogon -> Parameters -> NeutralizeNT4Emulator (New DWord)
 
After creating the registry key you have to set the value of it to "1".
 
Following this procedure you will immediately be able to retrieve the schema and finish the step for creating the AD profile import.
Sunday, 24 August 2008 11:04:15 (W. Europe Standard Time, UTC+01:00)  #    -
SharePoint
 Monday, 18 August 2008

Site object Guidelines for acceptable performance Notes Scope of impact when performance degrades
Site collection 50,000 per Web application

Total farm throughput degrades as the number of site collections increases.

Farm

Web site

250,000 per site collection

You can create a very large total number of Web sites by nesting the subsites. For example, 100 sites, each with 1000 subsites, is 100,000 Web sites. The maximum recommended number of sites and subsites is 125 sites with 2,000 subsites each, for a total of 250,000 sites.

Site collection

Subsite

2,000 per Web site

The interface for enumerating subsites of a given Web site does not perform well as the number of subsites surpasses 2,000.

Site view

Document

5 million per library

You can create very large document libraries by nesting folders, using standard views and site hierarchy. This value may vary depending on how documents and folders are organized, and by the type and size of documents stored.

Library

Item

2,000 per view

Testing indicates a reduction in performance beyond two thousand items. Using indexing on a flat folder view can improve performance.

List view

Document file size

50MB (2GB max*)

File save performance is proportional to the size of the file. The default maximum is 50 MB. This maximum is enforced by the system, but you can change it to any value up to 2 GB.

Library, file save performance

List

2,000 per Web site

Testing indicates a reduction in list view performance beyond two thousand entries.

List view

Field type

256 per list

This is not a hard limit, but you might experience list view performance degradation as the number of field types in a list increases.

List view

Column

2,000 per document library

4,096 per list

This is not a hard limit, but you might experience library and list view performance degradation as the number of columns in a document library or list increases.

Library and list view

Web Part

50 per page

This figure is an estimate based on simple Web Parts. The complexity of the Web Parts dictates how many Web Parts can be used on a page before performance is affected.

-

Monday, 18 August 2008 10:58:14 (W. Europe Standard Time, UTC+01:00)  #    -
SharePoint
 Monday, 10 March 2008
Issue:
 
Following error appears when opening a SharePoint list within the datasheet view:
 
The list cannot be displayed in Datasheet view for one or more of the following reasons:
  • a datasheet component compatible with Windows SharePoint Services is not installed
  • your browser does not support ActiveX controls
  • support for ActiveX controls is disabled
 
Solution:
 
1.       close your Internet Explorer
2.       open your Start menu -> Run… -> ""regedit
3.       delete the following folder in the registry
 
Path: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\ActiveX Compatibility
Sub-Key: {65BCBEE4-7728-41A0-97BE-14E1CAE36AAE}

4.       Start Internet Explorer again and try!
Monday, 10 March 2008 19:03:18 (W. Europe Standard Time, UTC+01:00)  #    -
SharePoint | Office
 Sunday, 13 January 2008

Issue:

After installing Sharepoint 2007 the Admin Content DB has a strange name.


How to rename the Admin Content DB:

  • within SQL Server, backup the Sharepoint_AdminContent_132465789... db
  • restore database with new name “Sharepoint_AdminContent”
  • within the Sharepoint Central Administration go to Application Management > Content Databases
  • select the Central Administration webapplication and delete the content database.
  • after the last step, you will get an error message on the Central Administration Page and you will
    not be able to get back into it -> thats normal!!
     
  • with the commandline tool stsadm start the following command:

    stsadm -o addcontentdb -url http://portal:1234 -databasename Sharepoint_AdminContent -databaseserver  servername

    (1234 = Port of Central Administration)


That's it!!

Sunday, 13 January 2008 09:28:53 (W. Europe Standard Time, UTC+01:00)  #    -
SharePoint
 Tuesday, 08 January 2008

Issue:

If you want to connect to a SharePoint Site or for example a SharePoint Document Library within
the Windows Explorer by entering for example "file://sharepointportal/homesote/docs/" and it does not
work the Web Client Service isn't installed proper.

Solution:

  1. Click Start -> Control Panel -> Administrative Tools -> Services
  2. Open the Properties of the WebClient Service
  3. choose as start type: automatic
  4. start the service

That's it!

Tuesday, 08 January 2008 17:59:11 (W. Europe Standard Time, UTC+01:00)  #    -
SharePoint
 Thursday, 03 January 2008

Issue:

People Search contains no results!

Solution:

  1. open your Central Administraion
  2. open your SharedServices Provider
  3. within the Search Settings go to Content Sources and Crawl Schedule
  4. edit the "Local Offices SharePoint Server Sites"
  5. within "Start Addresses" enter the following URL to activate and index "People Search"

    sps3://sharepoint/

   sharepoint is a placeholder for your SharePoint start address

After entering the "sps3://rooturl" start a full crawl and enjoy the people search!

 

Thursday, 03 January 2008 18:47:58 (W. Europe Standard Time, UTC+01:00)  #    -
SharePoint
 Sunday, 16 December 2007

Issue:

I'am using an extra Site Collection for all my My Sites (maybe also an extra Web Application). Within SharePoint I have to set the Portal Site Connection between different Site Collections manual, for each Site! Means for all my My Sites!

To set a default Site Connection from the My Site to the Portal for all my My Sites do the following:

  1. open: http://mysite/_layouts/settings.aspx
  2. go to Portal Site Connection
  3. enter the URL of your portal

Now every new generated My Site will have as default Site Connection,the URL of the Portal you have entered. You will see this by the link back to the portal on the My Site Page on the top at the left side!

 

Sunday, 16 December 2007 12:00:12 (W. Europe Standard Time, UTC+01:00)  #    -
SharePoint
 Sunday, 02 December 2007

Issue:

I am using SharePoint Server 2007. All my SharePoint Databases are stored on my SQL Server 2005, where Mirroring (for better redundance) is active.

If my principal SQL Server fails, all my SharePoint databases are active on my mirrored SQL Server and I have to tell my SharePoint Server the new SQL Server name.

I wrote a script, which contains all stsadm and windows commands to automatically change the database settings for my SharePoint Server.

  1. Create an empty batch file (new text file with extension *.bat) - e.g.: switch_sharepoint_dbs.bat

   enter the following commands: (bold -> enter your data, red -> comments)


      stsadm -o renameserver -oldservername oldsqlserver -newservername newsqlserver
       
(changes the name of the SQL Server)

      dir c:\windows /s
       
(one way to make a short break, before the next command will be fired -> needed)

      stsadm -o editssp -title SharedServices -ssplogin sspusername -ssppassword ssppassword
       
(Shared Service Provider Login Information has to be reentered)

      dir c:\windows /s

      iisreset

      dir c:\windows /s

      net stop sptrace

      net start sptrace

       (SharePoint Trace Service has to be restarted)

 

      dir c:\windows /s

 

      net stop sptimerv3

      net start sptimerv3

       (SharePoint Timer Service has to be restarted)

 

      dir c:\windows /s

 

      net stop spadmin

      net start spadmin

       (SharePoint Admin Service has to be restarted)

 

      dir c:\windows /s

 

      net stop osearch

      net start osearch

       (SharePoint Search Service has to be restarted - 2 times!)

 

      dir c:\windows /s

      dir c:\windows /s

 

      net stop osearch

      net start osearch

       (SharePoint Search Service has to be restarted - this is the second time)


To test the script, run a failover for all SharePoint databases. After that run the batch file. SharePoint Server will be up and running again after few minutes.


That's it! Have fun and good luck!

Sunday, 02 December 2007 12:24:06 (W. Europe Standard Time, UTC+01:00)  #    -
SharePoint
About the author
DI(FH) Handler Christian

DI(FH) Handler Christian
Graz, Austria


SharePoint Consultant &
Information Manager

© Copyright 2017
Categories
Archive
<2017 October>
SunMonTueWedThuFriSat
24252627282930
1234567
891011121314
15161718192021
22232425262728
2930311234
Blogroll
Statistics
Total Posts: 19
This Year: 0
This Month: 0
This Week: 0
Comments: 59

Sign In
All Content © 2017, DI(FH) Handler Christian
Graz, Austria