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.

Leave a Reply

preload preload preload