Dailycode.info

Short solution for short problems

WSS workflow access denied

I was finished developping and testing my workflows.

The result was very pleasing and with great spirit I deploy everything to the live environment. Again all tests work.

So we started to use the workflows. I went to the secretary who had to start a workflow manually. When she clicked on the workflow of a document, she got the error Access denied!!! What could this be? I try upgrading the rights ending up giving her full acces. Still access denied???

Then I started to google because a trigger in my mind jumped: Then I thought it was a SharePoint problem. And the triggerd fired correclty. It seems that when you create a workflow with  SharePoint designer, the workflow will work for all users who have access to the list. But users who are added after you created the workflow will not have access to start the workflow manually. There was only one working solution I found on http://www.sharepointu.com/forums/t/2088.aspx

But I was not in the mood to use the proposed workaround (backup and restore entire site). After looking some more I realized that it could only be solved with a work around, Microsoft has no solutions. So I found an easier workaround:

Copy the workflow. Rename it as described here earlier on this blog. Open the workflow and connect it to the list. Now the new users have access. When you add users after the work around, they again will not have access and you will need to perform this workaround again.This is not solved by any workaround!

Now the secretary can use the workflow. Hope this helps.

 

 


UpdateListItems

I'm developing a webpart that uses the WSS webservices to update en create list items.

Using the UpdateListItems method from the Lists webservice, it is possible to add or update listitems. I google a few minutes and came up with this solution:

try
{
	string sListName = "SOP response";
	string sSOPName = this.Page.Request.QueryString["qSOPName"];
	SOP.SPSLists.Lists list = new SOP.SPSLists.Lists();
	list.Url = "http://pmibeleudb02:777/SOP/_vti_bin/Lists.asmx";
	list.Credentials = System.Net.CredentialCache.DefaultCredentials;
	XmlDocument xmlDoc = new System.Xml.XmlDocument();
	System.Xml.XmlElement elBatch = xmlDoc.CreateElement("Batch");
	StringBuilder sb = new StringBuilder();
	sb.Append(@"<Method ID='1' Cmd='New'>");
	sb.Append(@"<Field Name='SOPName'>MarkSOP</Field>");
	sb.Append(@"<Field Name='Employee'>Mark</Field>");
	//sb.Append(@"<Field Name='Date' />");
	//sb.Append(@"<Field Name='EventDate' />");
	sb.Append(@"</Method>");
 
	elBatch.SetAttribute("OnError", "Continue");
	elBatch.SetAttribute("ListVersion", "1");
	elBatch.InnerXml = sb.ToString();
	XmlNode returnNod = list.UpdateListItems(sListName, elBatch);
 
}
catch (Exception er)
{
	_mylabel.Value = er.Message;
}
 

Then this error occured:

0x81020014One or more field types are not installed properly. Go to the list settings page to delete these fields.
 

This error was because I changed the Title field to SOPName, but the CAML name is still Title. If you have a simular problem but you can't find the caml name of the field, click to edit the field and look in the url at the end, there should be the CAML name of the field. When I used Title instead of SOPName it worked!

http://my server/SOP/_layouts/FldEdit.aspx?List=%7BB5343477%2D48A4%2D4C37%2D953A%2D153B7B2288E1%7D&Field=Title


WSS 3.0 Webservices

Here is a list of all webservices and their functions:

Below is a list of all WSS 3.0 web services and their methods. This is not intended to be comprehensive documentation of each service and its methods. This is simply a quick list of web methods intended to simplify the process of finding a particular method.

Web Service
Methods

Admin Web Service
http://<AdminSite>/_vti_adm/Admin.asmx
Provides methods for managing a deployment of Microsoft Windows SharePoint Services, such as for creating or deleting site collections.
CreateSite
DeleteSite
GetLanguages
RefreshConfigCache


Alerts
http://<Site>/_vti_bin/Alerts.asmx
Provides methods for working with alerts for list items in a SharePoint site.
DeleteAlerts
GetAlerts


Authentication
http://<Site>/_vti_bin/Authentication.asmx
Login
Mode


Copy
http://<Site>/_vti_bin/Authentication.asmx
Provides methods for copying files to or from or within a SharePoint site.
CopyIntoItems
CopyIntoItemsLocal
GetItem


Document Workspace
http://<Site>/_vti_bin/Dws.asmx
Exposes methods for managing Document Workspace sites and the data they contain.
CanCreateDwsUrl
CreateDws
CreateFolder
DeleteDws
DeleteFolder
FindDwsDoc
GetDwsData
GetDwsMetaData
RemoveDwsUser
RenameDws
UpdateDwsData


Forms
http://<Site>/_vti_bin/Forms.asmx
Provides methods for returning forms that are used in the user interface when working with the contents of a list.
GetForm
GetFormCollection


Imaging
http://<Site>/_vti_bin/Imaging.asmx
Provides methods that enable you to create and manage picture libraries.
CheckSubwebAndList
CreateNewFolder
Delete
Download
Edit
GetItemsByIds
GetItemsXMLData
GetListItems
ListPictureLibrary
Rename
Upload


List Data Retrieval (StsAdapter)
http://<Site>/_vti_bin/DspSts.asmx
Represents the adapter service used to perform queries against sites and lists in Microsoft Windows SharePoint Services.
Query


Lists
http://<Site>/_vti_bin/Lists.asmx
Provides methods for working with lists and list data.
AddAttachment
AddDiscussionBoardItem
AddList
AddListFromFeature
ApplyContentTypeToList
CheckInFile
CheckOutFile
CreateContentType
DeleteAttachment
DeleteContentType
DeleteContentTypeXmlDocument
DeleteList
GetAttachmentCollection
GetList
GetListAndView
GetListCollection
GetListContentType
GetListContentTypes
GetListItemChanges
GetListItemChangesSinceToken
GetListItems
GetVersionCollection
UndoCheckOut
UpdateContentType
UpdateContentTypesXmlDocument
UpdateContentTypeXmlDocument
UpdateList
UpdateListItems


Meetings
http://<Site>/_vti_bin/Meetings.asmx
Enables you to create and manage Meeting Workspace sites.
AddMeeting
AddMeetingFromICal
CreateWorkspace
DeleteWorkspace
GetMeetingsInformation
GetMeetingWorkspaces
RemoveMeeting
RestoreMeeting
SetAttendeeResponse
SetWorkspaceTitle
UpdateMeeting
UpdateMeetingFromICal


People
http://<Site>/_vti_bin/People.asmx
ResolvePrincipals
SearchPrincipals


Permissions
http://<Site>/_vti_bin/Permissions.asmx
Provides methods for working with the permissions for a site or list.
AddPermission
AddPermissionCollection
GetPermissionCollection
RemovePermission
RemovePermissionCollection
UpdatePermission


Site Data
http://<Site>/_vti_bin/SiteData.asmx
Provides methods that return metadata or list data from sites or lists in Microsoft Windows SharePoint Services.
EnumerateFolder
GetAttachments
GetChanges
GetContent
GetList
GetListCollection
GetListItems
GetSite
GetSiteAndWeb
GetSiteUrl
GetURLSegments
GetWeb


Sites
http://<Site>/_vti_bin/Sites.asmx
Provides a method for returning information about the collection of site templates on the virtual server.
ExportWeb
GetSiteTemplates
GetUpdatedFormDigest
ImportWeb


Search
http://<Site>/_vti_bin/spsearch.asmx
The QueryService class is the entry point for calling the Search in Microsoft Windows SharePoint Services Query web service.
GetPortalSearchInfo (MOSS only)
GetSearchMetadata (MOSS only)
Query
QueryEx
RecordClick (MOSS only)
Registration
Status


Users and Groups
http://<Site>/_vti_bin/usergroup.asmx
Provides methods for working with users, role definitions, and groups.
AddGroup
AddGroupToRole
AddRole
AddRoleDef
AddUserCollectionToGroup
AddUserCollectionToRole
AddUserToGroup
AddUserToRole
GetAllUserCollectionFromWeb
GetGroupCollection
GetGroupCollectionFromRole
GetGroupCollectionFromSite
GetGroupCollectionFromUser
GetGroupCollectionFromWeb
GetGroupInfo
GetRoleCollection
GetRoleCollectionFromGroup
GetRoleCollectionFromUser
GetRoleCollectionFromWeb
GetRoleInfo
GetRolesAndPermissionsForCurrentUser
GetRolesAndPermissionsForSite
GetUserCollection
GetUserCollectionFromGroup
GetUserCollectionFromRole
GetUserCollectionFromSite
GetUserCollectionFromWeb
GetUserInfo
GetUserLoginFromEmail
RemoveGroup
RemoveGroupFromRole
RemoveRole
RemoveUserCollectionFromGroup
RemoveUserCollectionFromRole
RemoveUserCollectionFromSite
RemoveUserFromGroup
RemoveUserFromRole
RemoveUserFromSite
RemoveUserFromWeb
UpdateGroupInfo
UpdateRoleDefInfo
UpdateRoleInfo
UpdateUserInfo


Versions
http://<Site>/_vti_bin/Versions.asmx
Provides methods for working with file versions.
DeleteAllVersions
DeleteVersion
GetVersions
RestoreVersion


Views
http://<Site>/_vti_bin/Views.asmx
Provides methods for working with views of lists.
AddView
DeleteView
GetView
GetViewCollection
GetViewHtml
UpdateView
UpdateViewHtml
UpdateViewHtml2


Web Part Pages
http://<Site>/_vti_bin/WebPartPages.asmx
Provides methods for working with Web Parts.
AddWebPart
AddWebPartToZone
AssociateWorkflowMarkup
ConvertWebPartFormat
DeleteWebPart
ExecuteProxyUpdates
FetchLegalWorkflowActions
GetAssemblyMetaData
GetBindingResourceData
GetCustomControlList
GetDataFromDataSourceControl
GetFormCapabilityFromDataSourceControl
GetSafeAssemblyInfo
GetWebPart
GetWebPart2
GetWebPartCrossPageCompatibility
GetWebPartPage
GetWebPartPageConnectionInfo
GetWebPartPageDocument
GetWebPartProperties
GetWebPartProperties2
GetXmlDataFromDataSource
RemoveWorkflowAssociation
RenderWebPartForEdit
SaveWebPart
SaveWebPart2
ValidateWorkflowMarkupAndCreateSupportObjects


Webs
http://<Site>/_vti_bin/Webs.asmx
Provides methods for working with sites and subsites.
CreateContentType
CustomizeCss
DeleteContentType
GetActivatedFeatures
GetAllSubWebCollection
GetColumns
GetContentType
GetContentTypes
GetCustomizedPageStatus
GetListTemplates
GetWeb
GetWebCollection
RemoveContentTypeXmlDocument
RevertAllFileContentStreams
RevertCss
RevertFileContentStream
UpdateColumns
UpdateContentType
UpdateContentTypeXmlDocument
WebUrlFromPageUrl


Installing WSS 3.0

Today I started with the installation of WSS 3.0 on a windows 2003 server using MS SQL 2000. Normally this proces takes up a few hours max.

The only difference is that this time I'm installing it in a company that has very strict regulations. It is not possible to reboot a server without permission, etc. I started with lots of courage because I never had big problems in the past. The only problem I ever had with installing WSS would come to haunt me again!

First I had to install IIS, framework 2.0 and 3.0. Still no problem here. I dindn't had to reboot the server! Then I started the installation of WSS.

GRRRaaaghhh, there it was. The collission of the database was not correct! So I created a database, with the correct collision (Latin1_General_CI_AS_KS_WS). But still it will not install. The default collission of the server needs to be changed because the install proces wants to create a database and therefore it needs the default collission. The last time a had this problemn, I could reinstall the server with the correct collission and all problems were solved. But in this case it is not an option.

So I started looking for other options. There is a tool called rebuildm.exe that rebuilds the master database to the new collision, resetting the default collission of the server. But this tool wasn't present. Because in the installation of the server, this tool was not included. Now I have to wait for the administrator to approve the change, which I'm guessing he won't allow. I'll have to prove that rebuilding the master DB does not affect the collission and data of the user databases. This is the challenge I'm up to now. I will write the solution in this post later.

If people have a better solution then rebuilding the master DB or reinstalling the SQL server, please inform us! 

 


Daily WSS: Sites

Sites 

An administrator or a user with sufficient rights has the possibility to create new sub-sites. He can choose a template and colour theme provided by the organization. You can create for example sub sites for each project. These sites are created from a template and contain automatically the correct layout and content. The sites can have different security then their mother site or children.
There is a possibility to save the site as template, with or without content.
It is possible to create these sites with web services, hence an external application can create these sites. From your site, you could create a new sub site when a new project is launched. Each site has a search functionality that can search the complete content of the site, including the content of the documents. Site content is created with web parts. You can have different web parts, HTML content, pictures list, document library web part (a view on the content of the library), custom web parts, etc.


Daily WSS: Content types

Content Types

Content types are types created by your organization. They can describe a document type or list item. A content type has its own workflow and specific metadata. These types can be reused throughout the entire site and are managed at site level.

For example: a financial form, it has a workflow that sends an email to the financial assistant, and has extra fields like department, total cost … When somebody creates a document of this type; it inherits these properties and activates the workflow.
You can still add extra metadata or specific workflows on items.


Daily WSS: Lists

Lists 

Lists in SharePoint can contain almost all types of data. You can add multiple attachments to list items; you can add metadata and calculated fields to the list. Metadata can be one of the following types: Single line of text, multiple lines of text, choice, number, currency, date and time, lookup (values in a list or library on the site), yes/no, person or group, hyperlink or picture, calculated (you can perform many functions on fields and show the result in this column).
It is possible to add different content types to the list, multiple workflows and in dept security… A list can be a very powerful source of information.
You can look at a list like a database table with a web interface and much more functionality. You can create these lists through a web interface and manage them. You can add columns at any time to the list, change views and order. The content is also completely searchable.
It’s possible to receive list content or notifications on your mobile.


Daily WSS: Document libraries

Document libraries

These libraries are specially created to store documents in a central place and provide lots of default functionality on these documents.
You can upload or create new documents to a library using the web interface or your windows explorer. That’s right; SharePoint enables you to control documents from your windows explorer, office application or the World Wide Web. You can even add documents to your library by email! There is a possibility to work with different content types in the same library, content types and their strength is explained later on this blog.

You can secure documents, folders and libraries on a different level. You can add workflows to libraries or content types.
WSS 3.0 offers publishing on documents. You can use version history with major and minor versions. The history of documents is kept by the system if we enable versions; therefore it is really easy to rollback previous versions. When multiple users are working on the same documents you can use the check in, check out functionality.

You can create and edit documents using your appropriate office application. When you open the document, the system will choose the correct office application and lets you chose whether to check out or not. You can even change the metadata of the document within the office application of you are using Office 2007.
Content of the documents is crawled by the system. This enables you to perform a search based on the contents of the documents.
It’s possible to receive content or notifications on your mobile.