I always get the complaints from the user saying being a manager I can't edit the document(s) which are created by other members.I always explain them , This is how Quickplace works.Quickplace shows "Edit" button to Author of the document or for those who are listed as "Additional Editors" section in the document.Yesterday, One of my user asked me to allow all AUTHORS and MANAGERS of the Quickplace to edit all the documents in the Quickplace.It could be only possible if you are writing your own LS code which executes manually or on schedule basis.Here was my solution , which worked fine and user got smile too :)
1- Open the Quickplace in Lotus client (It will depend on your requirement which room
you are going to implement this solution, I assume its main.nsf)
2- Write a LS agent which will take all documents handle from "h_Index" view (h_Index
only shows user documents)
Set view = db.GetView("h_Index")
Set entryColl=view.AllEntries
(I prefer entryCollection Class , Because it gives you better performance)
3- Checking whether document is "Published" or not. We need this checking because we
can't run the code which modify the personal draft documents.
You can use "h_PageCmd" field to check whether document is in draft mode or not.It
may contains three possible values , "h_MakeDraft" , "h_Publish" and
"h_MakeDraftFromPublishedVersion".
If doc.HasItem("h_PageCmd") And (doc.GetItemValue("h_PageCmd")(0)="h_Publish" Or doc.GetItemValue("h_PageCmd")(0)="h_MakeDraftFromPublishedVersion" ) then
4- Next, We have to get document's Author field handle.In my situation, I had
requirement to stamp all authors and managers of the main.nsf ACL.
5- Use NotesACL and NotesACLentry class to make list of desire authors and managers.
6- Update those Authors/Managers list to "h_Authors" fields of the document.
7- Save and close the document , go to the next document handle.
It is quite a long time for me to work on Quickplace.Initially, I have really missed the counseling and better resource for a Quickplace over the Internet.We have IBM Quickplace forum, But I have personally experienced a lack of proper response from the forum members.I think Quickplace is not as much as used like a Lotus Notes.So,This could be the primary cause to get Quickplace professionals actively.Few days back, I have got a question saying "How to custimize a quickplace ?" from one of my friend.So, I have decided to write a series of article on quickplace development and Architectural view.So, Here it goes the first part.
What is Quickplace (Quickr )?
Quickplace is a self-service Web tool for team collaboration. Use quickplace to publish, share, and track all information relevant to a project. Teams can use quickplace to store resources (such as files, discussions, and schedules) related to a project in a common place where everyone can access the latest information.
for more information refer IBM Quickplace Site
Architecture overview
Quickplace has its own metaphors and object model independent of Domino, it is implemented using core Domino technology and takes advantage of Domino data structures. A place is created using templates to structure data, and databases to store the data. Information in a place is stored in data notes — the basic unit of information in a Notes database. The structure of a place is further defined with objects such as rooms, folders, and pages that map to Domino objects.
Because the place objects are based on Domino objects, you can use the Notes client and Domino Designer to view, customize, and create new objects in a place.
Quickplace also uses a subset of the Domino/Notes security and authentication model to manage access to a place. It is helpful if you are familiar with the Notes security model, in particular with basic access control list (ACL) settings, and the use of Reader and Author fields.
Relationship between Quickplace and Domino objects
Quickplace file directory structure
Quickplace data is stored within a subdirectory named QuickPlace, below the Domino server's data directory. The complete directory structure is as follows.
One of the handy option Quickplace provides to view Office documents as Inline attachment.It can be achieved by selecting following options while creating a new page.
Quickplace opens Office documents as a inline attachment.It is easy and time saving for end users to access those attachments.
MS-Word
MS-Excel
MS-Powerpoint
But,Sometimes user comes with the requirement saying I wish to view pdf in a same way as office documents.Here are the code and steps to achieve the same.
Error Name : Corrupt data exception , Try Again
Error Description : When you are trying to add new members into room/subroom , It is prompting "Corrupt data exception"
Possible Cause
1- Room/Subroom system document has been deleted or more than one copy has been created automatically .
2- Replication Conflict system document of room/subroom.
2- "h_roomsettings" document of the affected room/subroom has been corrupted or "h_AreaParent" field of this document having wrong parent database name.
Possible Solution
1- Try to remove conflict system document of the room/subroom and check .
2- Replace system document(s) with the other room/subroom system document(s).
3- Check the "h_AreaParent" field of the "h_roomsettings" system document.If it doesn't have the parent database name then change with the parent database name and save the document.
4- Check the UNID of the system document(s).It Should match with the below list.
Problem:
Welcome page has been removed by user or got corrupted.
Impact:
1- When user accessing quickplace its directly redirecting to "Discussion" or "Library" folder (Normally whichever is come first in TOC).
2- If user has cached quickplace link with "welcome" page , They will get error like "Page cannot be found" and they cant access the place anymore ( They can only access if they remember library or discussion folder's UIND, which is not possible).
Here are the steps to create new welcome page:
1- Create a new page in the effected quickplace from web.
2- Create a smart icon toolbar with the following formula :
FIELD h_IsInToc="1";
FIELD h_Position=#;
1
** # , Number can be anything which is smaller than the other TOC items value . Better keep in four digit i.e 1000,2000 etc
3- Open the effected quickplace's main.nsf database in notes client, e.g give path like quickplace\agency\main.nsf.
4- Find the document which you have created in step 1. Select the document and run the smart icon code which you have created in step 2 from "toolbar menu".
5- Goto the view "Table of Contents" ( View list will be available in left side).
6- Select the "Welcome" page you have created and change its UNID as "4DF38292D748069D0525670800167212" ( Every welcome page must have this UNID).
7- Use below code to change UNID of the document :
Dim session As New NotesSession
Dim db As NotesDatabase
Dim olddoc, newdoc As NotesDocument
Dim oldUNID, newUNID As String
Dim coll As NotesDocumentCollection
Dim s As Variant
Dim DefaultUNID As String
DefaultUNID = ""
Set db = session.CurrentDatabase
Set coll = db.UnprocessedDocuments
If coll.count>0 Then
Set olddoc = coll.GetFirstDocument
DefaultUNID = olddoc.UniversalID
End If
oldUNID = Inputbox$("Enter current UNID of document","Reset UNID", DefaultUNID)
If oldUNID = "" Then
Msgbox "Nothing entered. Aborting..."
Exit Sub
End If
newUNID = Inputbox$("Enter NEW UNID of document","Reset UNID")
If newUNID = "" Then
Msgbox "Nothing entered. Aborting..."
Exit Sub
End If
Set newdoc = db.GetDocumentbyUNID(oldUNID)
If Not (newdoc Is Nothing) Then
newdoc.UniversalID=newUNID
s = newdoc.save(True,False)
If s=True Then
Set olddoc = Nothing
Set olddoc = db.GetDocumentByUNID(oldUNID)
Call olddoc.Remove(True)
End If
Else
Msgbox "Unable to find document"
End If
8- Make one agent with this code in the quickplace. Paste the code there ,save the agent and come out from the designer.
9- Select the new "Welcome" page and run the agent from the menu . It will ask the old UNID of document , leave it as it is , Then will ask new UNID of the document , give "4DF38292D748069D0525670800167212" and say ok.
Agent will update the welcome page with correct UNID .
check the welcome page whether its working as expected or not.
When you are opening quckplace or some room/subroom , Its saying "Document has been deleted" , Try again . But try again option doesn't leads you to reach the quickplace welcome page.
Its quite serious issue because user cannot access the quickplace anymore until the currupted or missing document get back to its previous state.
Follow the below steps to resolve this issue:
1- Copy "h_RoomSettings" document from any running quickplace into the damage quickplace , You can find this document in "QDK" system view.
* In quickplace never use traditional copy and paste method to migrate document from one quickplace to other quickplace . Since, Quickplace works on document UNID , If UNID will get change it might leads you to worst situation.
So, Use below program to change the document UNID :
Put this code into the quickplace from where you want to move the document into the damaged place.
Dim Session As New NotesSession
Dim Db As NotesDatabase
Set Db = Session.CurrentDatabase
Dim DocColl As NotesDocumentCollection
Dim Doc As NotesDocument
Dim CDB As NotesDatabase
Dim CDoc As NotesDocument
CONST PARAM_SERVER_NAME="Server01" ' Change the server name if necessary
CONST PARAM_DATABASE_NAME="Quickplace path" ' Put the quickplace name where u need to move the document
Set CDB = New NotesDatabase (PARAM_SERVER_NAME , PARAM_DATABASE_NAME)
Set DocColl = Db.UnprocessedDocuments
Set Doc = DocColl.GetFirstDocument
Do While Not Doc Is Nothing
Set CDOC = New NotesDocument(CDB)
Call Doc.CopyAllItems(CDoc , True)
CDoc.UniversalID = Doc.UniversalID
Call CDoc.Save(True, False)
Set Doc = DocColl.GetNextDocument(Doc)
Loop
2- Now you have "h_RoomSettings" document into the damaged quickplace . Open the document from the "QDK" view into the client .
Change the "h_name" field value to the damaged quickplace name .Save and close the document.
3- Create one smarticon button with following code :
FIELD h_HaikuName:="quickplace name";
1
Now, Select the "h_RoomSettings" document and run this code from tool bar icon .
It may happens there might few more system documents get corrupted . We can follow the same method to fix the issue.
I often face this problem in my quickplace environment.I found the way to get rid from this problem.Here are the steps:
1. Log in to the place (and, if necessary, to the inner room) where the folder displays the error. Record the name of the broken folder. For example, "BrokenFolder."
2. Create a new folder in the same room or place. Give the folder a new name, for this example, "NewWorkingFolder."
3. Create and publish a new test page in the folder "NewWorkingFolder."
4. Using a Lotus Notes client, open the MAIN.NSF file for the place that contains the folder "BrokenFolder." The place files reside on the Team Workplace server itself, under the directory "data\QuickPlace\myplacename." If the broken folder is located in an inner room, then open the PageLibraryXXXX.nsf file (where XXXX is a 16-digit hexadecimal number) that represents the inner room instead of opening the MAIN.NSF. The exact filename for an inner room is specified in the URL address for that room in your web browser.
5. With the place file open in the Lotus Notes client, you should see a list of folders on the left-hand side. Click on the folder "NewWorkingFolder." On the right-hand side, you should see the test page you published in this folder.
6. Right-click on the test page and select "Document Properties."
7. In the Document Properties window, select the second tab (the tab with the picture of a triangle). A list of fields will be displayed.
8. From the list of fields, locate the field called "h_FolderUNID."
9. Copy the value of the field "h_FolderUNID." This value is a 32-digit number which will be used in an agent. You do not have to copy the quotation marks at the beginning and at the end of the number.
10. Close the Document Properties window.
11. From the Create menu in the Lotus Notes client, select Agent.
12. Specify a name for the agent. As an example, you can name the agent "MyAgent to Repair the Folder"
13. Click "Add Action." A new window is displayed with additional options.
a. In the Action field, select "Modify Field," [default]
b. In the Modify by field, select the radio button option "Replacing" [default].
c. In "The value in" field, select the field "h_FolderUNID."
d. In the "With the new value" field, enter the 32-digit number you found and copied from the "h_FolderUNID" field in the new page in the folder "NewWorkingFolder."
14. Click "Add" to store your selections.
15. Save and close the agent. (When you close the agent window, you will be prompted to save the agent)
16. On the left-hand side, select the folder "BrokenFolder."
17. Select all the documents shown inside this folder.
18. With the documents in the broken folder selected, execute the agent. The agent will update the field "h_FolderUNID" on all the documents selected.
19. After executing the agent, use the mouse and 'drag and drop' all the selected documents from the folder "BrokenFolder" to the folder "NewWorkingFolder."
20. Click on the folder "BrokenFolder" (shown on the left hand side of the screen)
21. From the pull-down menu, select Actions, Folder Options, Delete Folder.
22. Select the All Documents view (displayed on the left-hand side) in the place database.
23. On the right-hand side, search for the document with the title of your broken folder, in this example, it's "BrokenFolder." This document must also have the following settings in some of the other columns displayed.
Title=[Name of the Broken Folder]
h_Type=1
24. Select and delete this one document once you confirmed it has the above values.
25. Login to the place that had the broken folder. A refresh of the cache may be needed. The broken folder should now be gone from the Table of Contents.
26. Click on the folder "NewWorkingFolder." You should see all the pages that were moved from the broken folder.
27. Click "Folder Options."
28. Change name of the folder "NewWorkingFolder," to the name previously used by the broken folder.
29. Delete the test page you created in the beginning of these instructions.
