The Content editor web part and Javascript

By peter.stilgoe









If you didnt know the content editor web part (CEWP) is a great way for adding code ie. JavaScript to your Sharepoint pages without having to edit / change the actual code. You need to add the CEWP to the bottom of your Sharepoint page & add the piece of script. Hey presto, desired effect without editing the actual code, a nice clean & easy way to make mods etc.

A couple of tips if you break your page with some bad code:

If you break your Web page:

When playing with the CEWP, you run the risk of adding bad code that will break your page. SharePoint will then throw out an error message, without offering any way to undo your changes.

If this happens to you, here is a useful trick: append the “?contents=1” querystring to your URL. It will give you access to the maintenance page, where you’ll be able to get rid of the faulty Web part.

For example, if you inadvertently break this page:

http://ThisServer.com/sites/ThisSite/ThisLibrary/allitems.aspx

Enter:

http://ThisServer.com/sites/ThisSite/ThisLibrary/allitems.aspx?contents=1

A trick to edit Web Part pages:

On some pages, the edit option is not available or is grayed out. This is for example the case for the edit form of a list.

The workaround here is to append the “?ToolPaneView=2” querystring to your URL, which will switch your page to edit mode. Note that it seems to be unsupported by Microsoft, though I haven’t read an official confirmation.

For example, if you want to edit:

http://ThisServer.com/sites/ThisSite/Lists/ThisList/editform.aspx

Enter:

http://ThisServer.com/sites/ThisSite/Lists/ThisList/editform.aspx?ToolPaneView=2

Thanks to http://pathtosharepoint.wordpress.com for the above 2 tips

Share

Leggi tutto

External Oracle data into BDC List web part

By peter.stilgoe









Install Oracle instant Client on Sharepoint server

Download Oracle instant client from

http://www.oracle.com/technology/tech/oci/instantclient/index.html

Unzip the file into C:\Program Files\Oracle\instantclient_11_1

In the PATH environment variable, add this directory to the end.

Create a new system variable TNS_ADMIN and set to C:\Program
Files\Oracle\instantclient_11_1

Ensure your tnsnames.ora file is in this directory with the database connection defined

Log out and then back into machine to take effect.

Install BDC Metaman on Sharepoint server

Download BDC Metaman from http://www.lightningtools.com

Start BDC Metaman

Select Configurations->Settings

In the “Application Definition Filename” textbox, enter the .xml file you will be saving to (i.e. mydbconnect.xml)

In the “Namespace” textbox, enter a name i.e. “MYSHAREPOINT”

Click on “Connect to Datasource” dropdown->Oracle

In the “Connect to Database Source” dialogue box:
“Server Type” should be “Oracle”
“Server Name” should be the Database instance in your tnsnames.or a file

Enter Username and Password to connect to the database and click on “Connect”. After a few moments, a collapsible menu should appear in the left-hand pane.

Expand the list of tables and drag the table you require to the right-hand pane.

Click on the green arrow to generate your Application Definition xml file into the filename you specified earlier. We will use this as a template to import into Sharepoint in later steps.

Configure Sharepoint Single Sign-On

Follow the steps exactly from Robert Bogue’s excellent site under “Create the SSO Service Account” and “Create the SSO Groups” in the following document:

http://thorprojects.com/blog/archive/2008/08/02/moss-single-sign-on-setup-step-by-step.aspx

In the web document, under “Configure the SSO Service”, after step (3), Under “Logon”, select the radio button next to “This account” and enter the Single SignOn account details as outlined in the web document (e.g. DEMO\SharePointSSOSvc).

Start the service as per the web document.

The next part of the web document shows how to add database privileges, under the heading “Configure SQL Server for the SSO Service Account”. If you don’t have the SQL Server management studio installed on the server, you can issue the following commands:
Cmd osql -E -S important\officeservers
exec sp_grantlogin ‘DEMO\SharePointSSOSvc’
exec sp_addsrvrolemember ‘DEMO\SharePointSSOSvc’,'dbcreator’
exec sp_addsrvrolemember ‘DEMO\SharePointSSOSvc’,'securityadmin’
go

Follow the steps outlined at the following address:

http://thorprojects.com/blog/archive/2008/08/02/moss-single-sign-on-setup-step-by-step.aspx

At the “Create Enterprise Application Definition” screen, make a note of the text you enter in the “Application Name” box (e.g. “my_sso”). You will soon use this text string as you will need to modify your xml file before you create your BDC List web part.

Select “Individual” as Account Type

Leave “Username” in field1

Leave “Password” in field2

Click on “OK”

Go back into “Manage Single Sign-On Settings”-> Manage account information for enterprise application definitions

In the “Enterprise application definition” dropdown select the Application you created earlier.

In “User account name”, enter “DEMO\SharePointSSOSvc”

Ensure “Update account information” is selected

Click “Set”

In the next screen where you’re asked to provide the Connection Account Information, enter the username and password for the Oracle Database you’re connecting to.

Click on “OK”. You will be returned to the previous screen.

Click on “Done”.

Modify and import the BDC xml file

Find the xml file you created with BDC Metaman

Find the following lines:

When connecting to an external Oracle database, the connection credentials are ignored and the single sign-on settings are used.Replace with the following:

Save the file

Go back to the Sharepoint admin homepage.

If already logged in as “DEMO\SharePointSSOSvc”, go to top right of page, go to the drop-down where the user logged in is shown (next to Welcome) and “Sign In as Different User” and log in as the Administrator

Go to “SharedServices1”->Import application definition under “Business Data Catalog”

In the textbox for “Application Definition file”, browse to the xml file you saved previously.

Click on Import. This process will import and validate the xml file and create the application definition.

Create a BDC List Web Part

Go to your page where you want to add the web part.

Click on Site Actions->Edit Page on top right of page

Click on “Add a web part” where you want to add the BDC List

Select “Business Data List” in the list of web parts to add

Click on the text “open the tool pane” which appears in the new web part

In the new pane that opens on the right-hand side, click on the small book icon to the right of the text box (may have to scroll the entire page right)

Select your Oracle application you created previously

Click on “OK”.

Now your Oracle data should appear in your webpart.

Share

Leggi tutto

Sharepoint Information Architechture Tips

By peter.stilgoe









Chris Poteet shares some great tips on the EndUserSharePoint.com site:

*Expose the global navigation from the parent site(s) in your subsites. It will help to orient users in the application.

*When naming lists and libraries, use descriptive names that make sense to your audience. For instance, “Documents” isn’t a great name for a document library, because you have many document types.

*Develop a consistent naming convention for lists and libraries that can be enforced throughout the enterprise.

*Use columns to manage document information, not file names. End Users have a tendency to insert metadata into the name of the document.

*Instead of a name such as “2008-08-01-MeetingMinutes-ProductionTeam.docx”, create three columns that will hold the important information about the document: Date, Type of Document, Team.

*When using document workflow, insert a “Status” column .

*Use columns to query, organize, and present information.

*Leverage the Quick Launch bar. It is local navigation that you can control. Fill it with descriptive link titles and headings to aid navigation around your site..

*When creating/requesting a new site, make it a Publishing site (MOSS, only). A
Publishing Site allows the creation of many, individual web pages. These can be used to give a “dashboard-like” view into your content.

*Ask potential users try to navigate through your site and give you feedback on what you can change to make it easier.

Share

Leggi tutto

The Forgotten Folder Content Type

By peter.stilgoe









Many people including myself seem to forget there is a ‘folder’ content type in WSS / MOSS. The main reasons to use folders has always been performance issues for me & for archiving data in certain scenrios, but a big thing is that by using folders you can assign custom views that specifically are only available for the folder(s) that you specify.

However when considering using folders in your Information Architechture consider the following that you do not appear to be able to do:

- attach workflow to folders via UI
- move folders via UI
- move folders via explorer view without losing your metadata
- have version history on folders
- show folders in data view rollups
- CQWP won’t be able to surface all your data in folders – need to test to confirm this

Share

Leggi tutto