Get the pages of a multipage meeting workspace - sharepoint

I currently do some testings on the multipage meeting workspace template to check whether it fit our needs to be the base template for our projects.
As you might know, a multipage meeting workspace is designed to be able to manage several dates within a single workspace and to display either pages that are only related to a certain date or pages that should appear on every date.
If you examine a multipage meeting workspace with SharePoint Designer you can see that there is a library which contains all the pages of the workspace. Pages that are displayed on every date are stored in the root folder, pages that are only displayed on single dates are stored in folders which are named with the according date.
So now we come to my problem. In order to set the permission for a single page that is displayed on each date, I iterate over the page library to find the page I want to change the permissions on. Strangely, the ListItemCollection of the library pretend to contain the number of pages I expected it to contain. But when I then iterate over the collection it only returns the pages that are attached to the actual date. Neither does it return the pages which should be displayed on every date nor the pages for the other dates.
I have already tried to get the pages by using SPSecruity.RunWithElevatedPrivilges() and with impersonation as the system account. I've also tried to get them via a command line application without using any context information. It seems as the behavior, that you can only get the items which are related to a certain date, is also followed by the object model.
So how could I get all pages of a multipages meeting workspace regardless of the actual date???

You can catch an event on workspace creation moment and at the event set permissions programmatically. You may want to know more about event receivers or setting permissions programmatically.
Those pages you mentioned are items added to a list called "Meeting Series"
alt text http://img22.imageshack.us/img22/8963/ss20090528181724.png
It contains following fields:
alt text http://img22.imageshack.us/img22/351/ss20090528181819.png alt text http://img22.imageshack.us/img22/7857/ss20090528181852.png
Example data from 1 item (not in tat order as columns are mentioned):
3 0x001C4383A41E441842A2A27CA249FED28F Meeting Series Recurrence 2009-05-28 18:11:20 2009-05-28 18:11:12 1073741823;#Sistēmas konts 1073741823;#Sistēmas konts 1 1 512 1.0 0 0 Recurrence Recurrence 3 100.000000000000 {A6E54DB5-3A60-464B-A9A0-D314B49C41E8} 3;#test2/Recurrence/Lists/Meeting Series/1_2.000 3;#test2/Recurrence/Lists/Meeting Series 3;#2009-05-28 18:11:20 3;#2009-05-28 18:11:20 3;#0 0x7fffffffffffffff 3;#1_2.000 3;#{6BE299E5-E81F-40A8-80B2-41494DF0353C} 3;# 3;#{965D0DB3-1AE0-4C23-B006-FB4FC1FE1AB7} 1_2.000 3 1_2.000 1_2.000 /test2/Recurrence/Lists/Meeting Series/1_2.000 http://test:10000/test2/Recurrence/Lists/Meeting%20Series/1_2.000 1_2 3;# 1 1 2 {D8839339-6DDA-48A6-B3B7-FBCA58C8B436} 2009-06-03 19:00:00 2009-06-03 19:00:00 (null) (null) (null) 0 1 (null) 0 0 0 2009-05-28 18:10:57 (null) http://test:10000/test2/Lists/Calendar, Kalendārs 2009-06-03 19:00:00

The pages for this kind of events get created only when a user tries to access them. This is by design, and the only solution I found was to try and access the page via the website (or some emulation) and then try to access them by code.
Regarding Flo's Comment, I fount the source for this on Microsoft Sharepoint 2007 Development unleashed (sams, ISBN 0-672-32903-4). on p 101 says:
CAUTION
Obtaining data from recurring meetings
can be tricky. You might encounter
situations in which your code attempts
to access a list item for a meeting
occurrence that has not yet been
provisioned in the Meeting Series
list. To ensure that the individual
instance has been created, you can
make a dummy web request to the
instance’s home page, for example:
http://server/sites/mymeeting/default.aspx?InstanceID=20061012
If you find another way, please post it It will save us lots of effort!!!

Related

SharePoint Online and prevent users from editing old list items after specific time

We have SharePoint Online site with list. Users can add, edit and delete own items in this list.
How I can resolve new issue - Users can't edit and delete own items older than one week (from creation date).
Is it possible without coding Remote Event Reciever or Azure function?
Per my knowledge, there is not an OOTB way to achieve it, we have to write some custom code.
If you only want to the user can't see some items in list view base on some condition, we can use list view Filter to achieve it. Note:User also access item form through URL.
I suggest you use remote event receiver or azure function to achieve this requirement.
In classic site, we can also add some JavaScript code into master page to prevent users access edit form page and hide the delete button in the page.
For this kind of requirement the solution which is 'no code' and with SP online is Power automate (previously MS Flow).
The best option in Your case would be to create a recurring flow which for example starts every day at 00:10 AM -> please see MS docs with description how to do this.
The Flow should get all items from a specific list for a specific site. You can do that with the 'Get Items' step. After that You can use the 'Apply to each' Step to check each item creation date with a 'Condition' Step. When some item will be older than one week You can use additional steps to break permission inheritance on item and remove all groups from permissions on this item or change the permissions on item from edit to read. Here I found an interesting article where are some predefined steps shown how to remove all permissions, remove and add a group. To tell You the truth I was not aware there already are this kind of steps in Power automate (maybe something new :) ) .
I would use SharePoint HTTP request and use SharePoint API to remove permissions on item and change some group role from edit to read. So I would do a similar procedure like here the only difference is not to break permission on all list but just on a specific item which I would get by ID. You can do all of those API request with a 'SharePoint HTTP request' Step
Please be aware there usually is a 5 000 unique permission levels threshold (50 000 is in on-prem) in list (place check here for latest info on limits in SP Online). So a better option would be to create a folder with view only permissions for the users before and when an item is older than one week You could only move this item to that folder also with Power Automate. That way all the files (items) in this folder would be read only and You would have only one unique item scope in this list and not as many as the old items.
Some other options You could use are:
Also code solution, but not RER and Azure function, would be to create a console app that uses CSOM to look through items in this list and either breaks permission on each item or moves to a folder (like the flow) and schedule this CSOM app on some local or remote server in Task Scheduler... Of Course You would need some local (or other) server for it which is always up and running :)
If You would like to use some 'little coding' and by any chance You are still using classic UI (not modern) You could use JSLink attached to CT or some column like Title and block editing of fields in edit forms etc (this is not the best option as always the users may create a view without a columns with this JSLink and go around this or modify the item using CSOM or Rest API)
You might consider using PowerApps (In case you have it configured in your subscription) to customize the edit form,
Then you use the validate() method, and disable a user from submitting the form in case ("Created" + 7 days) <= Today() or something like that.

Sharepoint 2007 - List ID Function

I have read many posts that say the automatically assigned list ID number in Sharepoint 2007 does not change.
It is very important that the list items in my sharepoint site stay in the same order as when they were originally created. My initial image was that I could sort on the ID # to keep the list in order (since it wasn't supposed to change). It has not worked out. I have noticed that the ID changes and my data gets out of order.
Could anyone please explain to me how the automatically assigned ID # works in Sharepoint 2007? How/When is it assigned, reassigned? Is there an action that causes the # to change?
When a workflow runs does Sharepoint reassign the item w another ID#? I do have several workflows running on this site.
A list item id is just like a SQL identity column. It is automatically incremented, is (or should be) unique within a particular list and doesn't change. Are you able to identify a point in your process where you are seeing an id change?
maybe you can take a look at the back-end sql server, there is no way you can manupilate it on user interface or object model as i know.

SharePoint 2010 List - Need direction

I'm a coldfusion developer, and I've been asked to rewrite a coldfusion application for SP 2010. I have no SP experience, but I'm now the SP admin.
My application is a waiting list for customers that enter a service center. The customer is entered into a List that tracks the following:
Name
Location (drop-down list of physical store locations. no multiple/custom values)
Check-In Time (timestamp for when customer was added to list)
Service Required (drop-down list, not allowing multiple or custom values)
Staff Member Requested (option, user select box)
Time Seen by Staff (timestamp when list item edit begins)
Seen By Name (name of user that edited record)
Time Finished with Staff (timestamp when list item edit is saved)
There are a few pieces of functionality that I don't know how to build into this list.
1
The records on the list view must be automatically filtered by the location column. The location to be viewed should be based upon the users group membership. (one group per location)
The Time Seen date/time field must be a timestamp that occurs when the list item is opened for editing.
The Seen By name must be automatically entered when when the user opens the list item for editing.
The Time Finished timestamp must be automatically entered when the user saves the list item after editing.
I don't expect anyone reading this to create this for me, but I would truly appreciate any tips, suggestions, or tutorials you can point me towards that will help me to accomplish these goals.
You will have to create such a list with the SharePoint Administration. You have several possibilities to do this. You can build them in you web browser using your SharePoint Site with the necessary rights, you can use the Microsoft SharePoint Designer (similar, less functionalities but in my opinion easier to use) or you could deploy the list after you built it in Visual Studio (best solution if you want to deploy it on more than one server or you want to change your list afterwards, but difficult).
There are some things you have to know: A list manages one or more content types. A content type is a collection of columns that contain the types (and more information) of your data. There are templates for content types and columns, but you will have to create your own content type and maybe some new columns as the templates might not be enough for your demands.
I'm not sure how to manage your first point. There is definitely a solution but I'm beginner, too.
The other 3 points could be managed by workflows: You can define workflows for a list, that do things after an item of your list is created or edited. I'm not sure if this will be useful for your 2nd point.
Another possibility would be to build a webpart, but that wont be a solution for a coldfusion project as I think. In a webpart you could handle all the interaction that are made by an user and change your list item individually.
A third way is to build an event receiver (using Visual Studio) for your list, but then you would have to build your list with the help of the VS as well.
I'm sure that won't answer all your questions but I hope you have some directions that you can inform about.

Aggregating news with Sharepoint MOSS 2007

Our company is split into divisions. These divisions work for client companies and are then further split into account teams that work on projects for a product of the clients.
So the structure goes Division > Clients > Accounts > Projects. And this is mirrored in the setup of our sharepoint installation. At each stage from Division to Account there is a subsite. Access to each subsite is controlled by AD groups and on each subsite there is a 'latest news' announcements list
What we want to do is have a 'wall' of announcements that feeds through so that each user can see on the top-level site all the posts in all of these anouncement lists, but this must be filtered using the AD groups that they are a member of so that confidential information isn't shown to someone who shouldn't see it.
Can anybody think of a way to do this?
Let's see - are those lists split accross site collection? With what tool you want to accomplish this?
You have several options (if you are within a site collection):
Use Content Query Web Part to
aggregate list items. You can
customize it to display fields
you like the way you like.
You can use SharePoint Designer.
Using Object Model/WebServices: Use
SPSiteDataQuery class to query
multiple lists at once and then
SPGridView to display data.
As you have a MOSS build, you could
even use CrossListQueryCache.
It's also a cross list query that
has builtin caching and audience
targeting. Be sure to read this to be sure caching is working.
If you want to aggregate between multiple site collections, then you will need to write code that get's all your SPSite objects and execute SPSiteDataQuery on them.
Maybe you can find out some additional information on Rollup of all Tasks of a Recurring Meeting in SharePoint
Here is how we are doing it.
Set up a content type for each level of announcement. We have national, state, district and the basic site level announcements. Therefore I have 1 national content type, 10 state content types (because we are in 10 states) and 1 content type for each district. All of these content types inherit from the base Announcement type with no modification.
I added a content query web part. I exported it. I edited the XML in the .webpart file to point to a new custom ItemStyle_Announcements.xsl file I had created. I import the modified .webpart and delete the default Content Query Webpart.
I modify the ItemStyle_Announcements.xsl to create the structure and divs I need for the styling. I add styles to the default style sheet I have already created for my site to get the look and feel I want. (I happend to have two styles for these, one featured/most recent item which is big and full, then a listing the next 10)
I find an announcement list that will possibly post to the national new. I add the content types as needed. Now the end user can choose what scope of announcement they want from the New menu.
This remaining issue is that right now, the States and Districts must have TWO announcement webparts on their home pages. One that lists everything local to that site (regardless of scope) and one that has unit announcements aggregated from the other sites in the same state / district.

Access 2007 integration with Sharepoint 2007 Tasks list

A customer of ours has an Access 2007 application with a form for creating tasks for upload to a Sharepoint Task List. The user fills in the form (title, status, priority, start date, due date). The user then places check marks next to the sharepoint user names that this task must be assigned to (one task per sp user selected). This data is aggregeated into a TaskQueue table and the tasks are added to the Sharepoint list successfully (through a linked list - i think). The problem is that we need to include zero or more attachments for each task item. Is there a way to do this through a macro, VBA, or some other built in functionality that I haven't learned about yet?
My initial idea was to use a C# windows service that monitors this taskqueue table then uses the Lists.asmx Shareopint web service and the AddAttachment method when given the List item ID and NTFS path to the attached file to add the attachments to the task list item in Sharepoint.
After playing around with Access and setting up a linked table to a Task List in Sharepoint, I found that you can add attachments through the Access 2007 datasheet view. The problem is that you can only select one user or SP group in the Assigned TO field. They have a lot of repetitive tasks to assign to a bunch of separate people.. That's why they developed this form. If anyone has an idea on how to solve this issue please let me know. Also does anyone know of any good Access 2007/Sharepoint integration resources?
Thanks in advance!
have the attachments upload as part of the Access form.
load attachments into a Document Library
Check off users like they are currently being done
Add hyperlinks to the attachments uploaded in step 2 to the Description (rich text) field. (maybe done automatically in steps 1-2)
Leave TaskQueue table alone.
This way, 0..n documents can be included. The task list just stores structured data, and the documents are stored in a document library once, and you don't have runaway growth when attaching 1 document to 5 different tasks (resulting in 5 copies of the document).

Resources